diff --git a/SharedLibraryNG/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SharedLibraryNG/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index bbaa4fbc5..7588ac976 100644 Binary files a/SharedLibraryNG/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/SharedLibraryNG/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestProject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TestProject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index c26ebc5fe..7cbb75911 100644 Binary files a/TestProject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/TestProject/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/TestProject/obj/Debug/mRemoteNG_Accessor.exe b/TestProject/obj/Debug/mRemoteNG_Accessor.exe index 5be8a69a9..dbdb5524c 100644 Binary files a/TestProject/obj/Debug/mRemoteNG_Accessor.exe and b/TestProject/obj/Debug/mRemoteNG_Accessor.exe differ diff --git a/TestProject/obj/Debug/mRemoteNG_Accessor.pdb b/TestProject/obj/Debug/mRemoteNG_Accessor.pdb index c29d497e0..ee7a1d3a9 100644 Binary files a/TestProject/obj/Debug/mRemoteNG_Accessor.pdb and b/TestProject/obj/Debug/mRemoteNG_Accessor.pdb differ diff --git a/mRemoteV1.ConvertedToC#/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache b/mRemoteV1.ConvertedToC#/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache index a66e27a8c..a14dcf842 100644 Binary files a/mRemoteV1.ConvertedToC#/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache and b/mRemoteV1.ConvertedToC#/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/mRemoteV1.ConvertedToC#/obj/Debug Portable/Interop.WFICALib.dll b/mRemoteV1.ConvertedToC#/obj/Debug Portable/Interop.WFICALib.dll index 52b982dd4..044857dfa 100644 Binary files a/mRemoteV1.ConvertedToC#/obj/Debug Portable/Interop.WFICALib.dll and b/mRemoteV1.ConvertedToC#/obj/Debug Portable/Interop.WFICALib.dll differ diff --git a/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.FileListAbsolute.txt b/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.FileListAbsolute.txt index 4a9f6f9ce..9c43248e6 100644 --- a/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.FileListAbsolute.txt +++ b/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.FileListAbsolute.txt @@ -59,3 +59,11 @@ C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC# C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\mRemoteNG.Language.Language.zh-TW.resources C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\mRemoteV1.Converted.csproj.GenerateResource.Cache C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\mRemoteNG.Properties.Resources.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\bin\Debug Portable\mRemoteNG.exe.config +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\Interop.EOLWTSCOM.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\Interop.MSTSCLib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\Interop.SHDocVw.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\Interop.WFICALib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\AxInterop.MSTSCLib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\AxInterop.WFICALib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1.ConvertedToC#\obj\Debug Portable\mRemoteV1.Converted.csproj.ResolveComReference.cache diff --git a/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.ResolveComReference.cache b/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.ResolveComReference.cache index f02aa7572..1da81edaa 100644 Binary files a/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.ResolveComReference.cache and b/mRemoteV1.ConvertedToC#/obj/Debug Portable/mRemoteV1.Converted.csproj.ResolveComReference.cache differ diff --git a/mRemoteV1.v12.suo b/mRemoteV1.v12.suo index 8ec0fe240..373d8f97c 100644 Binary files a/mRemoteV1.v12.suo and b/mRemoteV1.v12.suo differ diff --git a/mRemoteV1/CS/App/App.Runtime.cs b/mRemoteV1/CS/App/App.Runtime.cs index 6ccad2568..aabd6fc86 100644 --- a/mRemoteV1/CS/App/App.Runtime.cs +++ b/mRemoteV1/CS/App/App.Runtime.cs @@ -26,6 +26,7 @@ using System.Xml; //using System.Environment; using System.Management; using Microsoft.Win32; +using mRemoteNG.Connection.Protocol; //using Timer = System.Timers.Timer; @@ -1679,7 +1680,7 @@ namespace mRemoteNG.App #endregion #region Opening Connection - public static Connection.Info CreateQuickConnect(string connectionString, Protocol.Protocols protocol) + public static Connection.Info CreateQuickConnect(string connectionString, Protocols protocol) { try { @@ -1842,46 +1843,46 @@ namespace mRemoteNG.App } } - Protocol.Base newProtocol = default(Protocol.Base); + Base newProtocol = default(Base); // Create connection based on protocol type switch (newConnectionInfo.Protocol) { - case Protocol.Protocols.RDP: - newProtocol = new Protocol.RDP(); + case Protocols.RDP: + newProtocol = new RDP(); ((RDP) newProtocol).tmrReconnect.Elapsed += ((RDP) newProtocol).tmrReconnect_Elapsed; ((RDP) newProtocol).tmrReconnect.Elapsed += ((RDP) newProtocol).tmrReconnect_Elapsed; break; - case Protocol.Protocols.VNC: - newProtocol = new Protocol.VNC(); + case Protocols.VNC: + newProtocol = new VNC(); break; - case Protocol.Protocols.SSH1: - newProtocol = new Protocol.SSH1(); + case Protocols.SSH1: + newProtocol = new SSH1(); break; - case Protocol.Protocols.SSH2: - newProtocol = new Protocol.SSH2(); + case Protocols.SSH2: + newProtocol = new SSH2(); break; - case Protocol.Protocols.Telnet: - newProtocol = new Protocol.Telnet(); + case Protocols.Telnet: + newProtocol = new Telnet(); break; - case Protocol.Protocols.Rlogin: - newProtocol = new Protocol.Rlogin(); + case Protocols.Rlogin: + newProtocol = new Rlogin(); break; - case Protocol.Protocols.RAW: - newProtocol = new Protocol.RAW(); + case Protocols.RAW: + newProtocol = new RAW(); break; - case Protocol.Protocols.HTTP: - newProtocol = new Protocol.HTTP(newConnectionInfo.RenderingEngine); + case Protocols.HTTP: + newProtocol = new HTTP(newConnectionInfo.RenderingEngine); break; - case Protocol.Protocols.HTTPS: - newProtocol = new Protocol.HTTPS(newConnectionInfo.RenderingEngine); + case Protocols.HTTPS: + newProtocol = new HTTPS(newConnectionInfo.RenderingEngine); break; - case Protocol.Protocols.ICA: - newProtocol = new Protocol.ICA(); + case Protocols.ICA: + newProtocol = new ICA(); ((ICA) newProtocol).tmrReconnect.Elapsed += ((ICA) newProtocol).tmrReconnect_Elapsed; ((ICA) newProtocol).tmrReconnect.Elapsed += ((ICA) newProtocol).tmrReconnect_Elapsed; break; - case Protocol.Protocols.IntApp: - newProtocol = new Protocol.IntegratedProgram(); + case Protocols.IntApp: + newProtocol = new IntegratedProgram(); if (newConnectionInfo.ExtApp == "") { diff --git a/mRemoteV1/CS/Connection/Connection.Info.cs b/mRemoteV1/CS/Connection/Connection.Info.cs index a3f21bdb1..2395f690f 100644 --- a/mRemoteV1/CS/Connection/Connection.Info.cs +++ b/mRemoteV1/CS/Connection/Connection.Info.cs @@ -12,6 +12,7 @@ using System.ComponentModel; using mRemoteNG.Config; using mRemoteNG.Tools; using System.Reflection; +using mRemoteNG.App; namespace mRemoteNG.Connection @@ -658,10 +659,11 @@ namespace mRemoteNG.Connection #endregion #region Misc private string _preExtApp; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. -[LocalizedCategory("strCategoryMiscellaneous", 7), -LocalizedDisplayName("strPropertyNameExternalToolBefore"), -LocalizedDescription("strPropertyDescriptionExternalToolBefore"), -TypeConverter(typeof(Tools.ExternalToolsTypeConverter))]public virtual string PreExtApp + [LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7), + LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolBefore"), + LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalToolBefore"), + TypeConverter(typeof(Tools.ExternalToolsTypeConverter))] + public virtual string PreExtApp { get { @@ -674,10 +676,11 @@ TypeConverter(typeof(Tools.ExternalToolsTypeConverter))]public virtual string Pr } private string _postExtApp; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. -[LocalizedCategory("strCategoryMiscellaneous", 7), -LocalizedDisplayName("strPropertyNameExternalToolAfter"), -LocalizedDescription("strPropertyDescriptionExternalToolAfter"), -TypeConverter(typeof(Tools.ExternalToolsTypeConverter))]public virtual string PostExtApp + [LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7), + LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolAfter"), + LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalToolAfter"), + TypeConverter(typeof(Tools.ExternalToolsTypeConverter))] + public virtual string PostExtApp { get { @@ -690,9 +693,10 @@ TypeConverter(typeof(Tools.ExternalToolsTypeConverter))]public virtual string Po } private string _macAddress; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. -[LocalizedCategory("strCategoryMiscellaneous", 7), -LocalizedDisplayName("strPropertyNameMACAddress"), -LocalizedDescription("strPropertyDescriptionMACAddress")]public virtual string MacAddress + [LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7), + LocalizedAttributes.LocalizedDisplayName("strPropertyNameMACAddress"), + LocalizedAttributes.LocalizedDescription("strPropertyDescriptionMACAddress")] + public virtual string MacAddress { get { @@ -705,9 +709,10 @@ LocalizedDescription("strPropertyDescriptionMACAddress")]public virtual string M } private string _userField; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. -[LocalizedCategory("strCategoryMiscellaneous", 7), -LocalizedDisplayName("strPropertyNameUser1"), -LocalizedDescription("strPropertyDescriptionUser1")]public virtual string UserField + [LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7), + LocalizedAttributes.LocalizedDisplayName("strPropertyNameUser1"), + LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUser1")] + public virtual string UserField { get { @@ -1154,8 +1159,7 @@ LocalizedDescription("strPropertyDescriptionUser1")]public virtual string UserFi } catch (Exception ex) { - mRemoteNG.Messages.Collector - MessageCollector.AddExceptionMessage(My.Language.strConnectionSetDefaultPortFailed, ex, Messages.MessageClass.ErrorMsg); + Runtime.MessageCollector.AddExceptionMessage(My.Language.strConnectionSetDefaultPortFailed, ex, Messages.MessageClass.ErrorMsg); } } #endregion diff --git a/mRemoteV1/CS/Connection/Connection.InterfaceControl.cs b/mRemoteV1/CS/Connection/Connection.InterfaceControl.cs index 6d91b346c..833f9255c 100644 --- a/mRemoteV1/CS/Connection/Connection.InterfaceControl.cs +++ b/mRemoteV1/CS/Connection/Connection.InterfaceControl.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,67 +8,59 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - -//using mRemoteNG.App.Runtime; +using mRemoteNG.App; -namespace mRemoteNG +namespace mRemoteNG.Connection { - namespace Protocol + public partial class InterfaceControl { - public partial class InterfaceControl + #region Properties + private Connection.Protocol.Base _Protocol; + public Connection.Protocol.Base Protocol { -#region Properties - private Connection.Protocol.Base _Protocol; -public Connection.Protocol.Base Protocol + get { - get - { - return this._Protocol; - } - set - { - this._Protocol = value; - } + return this._Protocol; } - - private Info _Info; -public Info Info + set { - get - { - return this._Info; - } - set - { - this._Info = value; - } + this._Protocol = value; } -#endregion - -#region Methods - public InterfaceControl(Control Parent, Connection.Protocol.Base Protocol, Connection.Info Info) - { - try - { - this._Protocol = Protocol; - this._Info = Info; - this.Parent = Parent; - this.Location = new Point(0, 0); - this.Size = this.Parent.Size; - this.Anchor = (System.Windows.Forms.AnchorStyles) (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top); - InitializeComponent(); - } - catch (Exception ex) - { - MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn\'t create new InterfaceControl" + Constants.vbNewLine + ex.Message); - } - } -#endregion } + + private Info _Info; + public Info Info + { + get + { + return this._Info; + } + set + { + this._Info = value; + } + } + #endregion + + #region Methods + public InterfaceControl(Control Parent, Connection.Protocol.Base Protocol, Connection.Info Info) + { + try + { + this._Protocol = Protocol; + this._Info = Info; + this.Parent = Parent; + this.Location = new Point(0, 0); + this.Size = this.Parent.Size; + this.Anchor = (System.Windows.Forms.AnchorStyles) (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top); + InitializeComponent(); + } + catch (Exception ex) + { + Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn\'t create new InterfaceControl" + Constants.vbNewLine + ex.Message); + } + } + #endregion } - - - } diff --git a/mRemoteV1/CS/Connection/PuttySession.Info.cs b/mRemoteV1/CS/Connection/PuttySession.Info.cs index c699d2a7b..17462b704 100644 --- a/mRemoteV1/CS/Connection/PuttySession.Info.cs +++ b/mRemoteV1/CS/Connection/PuttySession.Info.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,127 +8,113 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - using System.ComponentModel; using mRemoteNG.Messages; -//using mRemoteNG.Tools.LocalizedAttributes; using mRemoteNG.My; -//using mRemoteNG.App.Runtime; +using mRemoteNG.App; using mRemoteNG.Tools; -namespace mRemoteNG.PuttySession +namespace mRemoteNG.Connection.PuttySession { public class Info : Connection.Info, IComponent + { + #region Commands + [Command(),LocalizedAttributes.LocalizedDisplayName("strPuttySessionSettings")] + public void SessionSettings() + { + try { - -#region Commands - [Command(),LocalizedAttributes.LocalizedDisplayName("strPuttySessionSettings")] - public void SessionSettings() - { - try - { - PuttyProcessController puttyProcess = new PuttyProcessController(); - if (!puttyProcess.Start()) - { - return ; - } - if (puttyProcess.SelectListBoxItem(PuttySession)) - { - puttyProcess.ClickButton("&Load"); - } - puttyProcess.SetControlText("Button", "&Cancel", "&Close"); - puttyProcess.SetControlVisible("Button", "&Open", false); - puttyProcess.WaitForExit(); - } - catch (Exception ex) - { - MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strErrorCouldNotLaunchPutty + Constants.vbNewLine + ex.Message, false); - } - } -#endregion - -#region Properties - [Browsable(false)]public Root.PuttySessions.Info RootPuttySessionsInfo {get; set;} - - [ReadOnly(true)]public override string PuttySession {get; set;} - - [ReadOnly(true)]public override string - Name {get; set;} - - [ReadOnly(true), - Browsable(false)]public override string Description {get; set;} - -[ReadOnly(true), Browsable(false)]public override string Icon + PuttyProcessController puttyProcess = new PuttyProcessController(); + if (!puttyProcess.Start()) { - get - { - return "PuTTY"; - } - set - { - - } + return ; } - -[ReadOnly(true), Browsable(false)]public override string Panel + if (puttyProcess.SelectListBoxItem(PuttySession)) { - get - { - return RootPuttySessionsInfo.Panel; - } - set - { - - } + puttyProcess.ClickButton("&Load"); } - - [ReadOnly(true)]public override string Hostname {get; set;} - - [ReadOnly(true)]public override string - Username {get; set;} - - [ReadOnly(true), - Browsable(false)]public override string Password {get; set;} - - [ReadOnly(true)]public override Protocol.Protocols Protocol {get; set;} - - [ReadOnly(true)]public override int - Port {get; set;} - - [ReadOnly(true), - Browsable(false)]public override string PreExtApp {get; set;} - - [ReadOnly(true), - Browsable(false)]public override string PostExtApp {get; set;} - - [ReadOnly(true), - Browsable(false)]public override string MacAddress {get; set;} - - [ReadOnly(true), Browsable(false)]public override string UserField {get; set;} -#endregion - -#region IComponent -[Browsable(false)]public ISite Site - { - get - { - return new PropertyGridCommandSite(this); - } - set - { - throw (new NotImplementedException()); - } - } - - public void Dispose() - { - if (Disposed != null) - Disposed(this, EventArgs.Empty); - } - - public event EventHandler Disposed; -#endregion + puttyProcess.SetControlText("Button", "&Cancel", "&Close"); + puttyProcess.SetControlVisible("Button", "&Open", false); + puttyProcess.WaitForExit(); } + catch (Exception ex) + { + Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strErrorCouldNotLaunchPutty + Constants.vbNewLine + ex.Message, false); + } + } + #endregion + + #region Properties + [Browsable(false)] + public Root.PuttySessions.Info RootPuttySessionsInfo {get; set;} + + [ReadOnly(true)] + public override string PuttySession {get; set;} + + [ReadOnly(true)] + public override string Name {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string Description {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string Icon + { + get { return "PuTTY"; } + set { } + } + + [ReadOnly(true), Browsable(false)] + public override string Panel + { + get { return RootPuttySessionsInfo.Panel; } + set { } + } + + [ReadOnly(true)] + public override string Hostname {get; set;} + + [ReadOnly(true)] + public override string Username {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string Password {get; set;} + + [ReadOnly(true)] + public override Protocol.Protocols Protocol {get; set;} + + [ReadOnly(true)] + public override int Port {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string PreExtApp {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string PostExtApp {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string MacAddress {get; set;} + + [ReadOnly(true), Browsable(false)] + public override string UserField {get; set;} + #endregion + + #region IComponent + [Browsable(false)] + public ISite Site + { + get { return new PropertyGridCommandSite(this); } + set { throw (new NotImplementedException()); } + } + + public void Dispose() + { + if (Disposed != null) + Disposed(this, EventArgs.Empty); + } + + public event EventHandler Disposed; + #endregion + } } diff --git a/mRemoteV1/CS/Controls/ListView.cs b/mRemoteV1/CS/Controls/ListView.cs index 3c9828a5f..837836c87 100644 --- a/mRemoteV1/CS/Controls/ListView.cs +++ b/mRemoteV1/CS/Controls/ListView.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,289 +8,284 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - using System.ComponentModel; -namespace mRemoteNG +namespace mRemoteNG.Controls { - namespace Controls + public class ListView : System.Windows.Forms.ListView { - public class ListView : System.Windows.Forms.ListView + #region Public Properties + [Category("Appearance"), DefaultValue(typeof(Color), "HighlightText")] + public Color HighlightForeColor {get; set;} + + [Category("Appearance"), DefaultValue(typeof(Color), "Highlight")] + public Color HighlightBackColor {get; set;} + + [Category("Appearance"), DefaultValue(typeof(Color), "HotTrack")] + public Color HighlightBorderColor {get; set;} + + [Category("Appearance"), DefaultValue(typeof(Color), "ControlText")] + public Color InactiveHighlightForeColor {get; set;} + + [Category("Appearance"), DefaultValue(typeof(Color), "Control")] + public Color InactiveHighlightBackColor {get; set;} + + [Category("Appearance"), DefaultValue(typeof(Color), "ControlDark")] + public Color InactiveHighlightBorderColor {get; set;} + + [Category("Appearance"), DefaultValue(true)] + private bool _ShowFocusCues = true; + public bool ShowFocusCues { - -#region Public Properties - [Category("Appearance"), - DefaultValue(typeof(Color), "HighlightText")]public Color HighlightForeColor {get; set;} - - [Category("Appearance"), - DefaultValue(typeof(Color), "Highlight")]public Color HighlightBackColor {get; set;} - - [Category("Appearance"), - DefaultValue(typeof(Color), "HotTrack")]public Color HighlightBorderColor {get; set;} - - [Category("Appearance"), - DefaultValue(typeof(Color), "ControlText")]public Color InactiveHighlightForeColor {get; set;} - - [Category("Appearance"), - DefaultValue(typeof(Color), "Control")]public Color InactiveHighlightBackColor {get; set;} - - [Category("Appearance"), - DefaultValue(typeof(Color), "ControlDark")]public Color InactiveHighlightBorderColor {get; set;} - - [Category("Appearance"), - DefaultValue(true)]private bool _ShowFocusCues = true; - private bool ShowFocusCues - { - get - { - return _ShowFocusCues; - } - set - { - _ShowFocusCues = value; - } - } - - [Category("Appearance")]private Alignment _LabelAlignment = new Alignment(VerticalAlignment.Top, HorizontalAlignment.Left); -private Alignment LabelAlignment + get { - get - { - return _LabelAlignment; - } - set - { - _LabelAlignment = value; - } + return _ShowFocusCues; } -#endregion - -#region Constructors - public ListView() + set { - // VBConversions Note: Non-static class variable initialization is below. Class variables cannot be initially assigned non-static values in C#. - HighlightForeColor = SystemColors.HighlightText; - HighlightBackColor = SystemColors.Highlight; - HighlightBorderColor = SystemColors.HotTrack; - InactiveHighlightForeColor = SystemColors.ControlText; - InactiveHighlightBackColor = SystemColors.Control; - InactiveHighlightBorderColor = SystemColors.ControlDark; - - OwnerDraw = true; + _ShowFocusCues = value; } -#endregion + } -#region Protected Methods - protected override void OnDrawItem(DrawListViewItemEventArgs e) + [Category("Appearance")] + private Alignment _LabelAlignment = new Alignment(VerticalAlignment.Top, HorizontalAlignment.Left); + public Alignment LabelAlignment + { + get { - if (!(View == View.Tile)) - { - base.OnDrawItem(e); - } - if (e.ItemIndex < 0) - { - base.OnDrawItem(e); - } - - Brush foreColorBrush = null; - Brush backColorBrush = null; - Pen borderPen = null; - try - { - if (Focused) - { - borderPen = new Pen(HighlightBorderColor); - } - else - { - borderPen = new Pen(InactiveHighlightBorderColor); - } - - if (e.Item.Selected) - { - if (Focused) - { - foreColorBrush = new SolidBrush(HighlightForeColor); - backColorBrush = new SolidBrush(HighlightBackColor); - } - else - { - foreColorBrush = new SolidBrush(InactiveHighlightForeColor); - backColorBrush = new SolidBrush(InactiveHighlightBackColor); - } - } - else - { - foreColorBrush = new SolidBrush(e.Item.ForeColor); - backColorBrush = new SolidBrush(BackColor); - } - - e.Graphics.FillRectangle(backColorBrush, e.Bounds); - - if (Focused && ShowFocusCues) - { - e.DrawFocusRectangle(); - } - else if (e.Item.Selected) - { - e.Graphics.DrawRectangle(borderPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height - 1); - } - - Rectangle imageBounds = new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 6, 16, 16); - Rectangle textBounds = e.Bounds; - - if (e.Item.ImageList != null) - { - Image image = null; - if (!string.IsNullOrEmpty(e.Item.ImageKey) && e.Item.ImageList.Images.ContainsKey(e.Item.ImageKey)) - { - image = e.Item.ImageList.Images[e.Item.ImageKey]; - } - else if (!(e.Item.ImageIndex < 0) & e.Item.ImageList.Images.Count > e.Item.ImageIndex) - { - image = e.Item.ImageList.Images[e.Item.ImageIndex]; - } - if (image != null) - { - e.Graphics.DrawImageUnscaledAndClipped(image, imageBounds); - textBounds.X = textBounds.Left + 20; - textBounds.Width = textBounds.Width - 20; - } - } - - e.Graphics.DrawString(e.Item.Text, e.Item.Font, foreColorBrush, textBounds, GetStringFormat()); - } - finally - { - if (foreColorBrush != null) - { - foreColorBrush.Dispose(); - } - if (backColorBrush != null) - { - backColorBrush.Dispose(); - } - if (borderPen != null) - { - borderPen.Dispose(); - } - } + return _LabelAlignment; } -#endregion - -#region Private Methods - private StringFormat GetStringFormat() + set { - StringFormat format = StringFormat.GenericDefault; + _LabelAlignment = value; + } + } + #endregion + + #region Constructors + public ListView() + { + // VBConversions Note: Non-static class variable initialization is below. Class variables cannot be initially assigned non-static values in C#. + HighlightForeColor = SystemColors.HighlightText; + HighlightBackColor = SystemColors.Highlight; + HighlightBorderColor = SystemColors.HotTrack; + InactiveHighlightForeColor = SystemColors.ControlText; + InactiveHighlightBackColor = SystemColors.Control; + InactiveHighlightBorderColor = SystemColors.ControlDark; - switch (LabelAlignment.Vertical) - { - case VerticalAlignment.Top: - format.LineAlignment = StringAlignment.Near; - break; - case VerticalAlignment.Middle: - format.LineAlignment = StringAlignment.Center; - break; - case VerticalAlignment.Bottom: - format.LineAlignment = StringAlignment.Far; - break; - } + OwnerDraw = true; + } + #endregion + + #region Protected Methods + protected override void OnDrawItem(DrawListViewItemEventArgs e) + { + if (!(View == View.Tile)) + { + base.OnDrawItem(e); + } + if (e.ItemIndex < 0) + { + base.OnDrawItem(e); + } - switch (LabelAlignment.Horizontal) + Brush foreColorBrush = null; + Brush backColorBrush = null; + Pen borderPen = null; + try + { + if (Focused) { - case HorizontalAlignment.Left: - format.Alignment = StringAlignment.Near; - break; - case HorizontalAlignment.Center: - format.Alignment = StringAlignment.Center; - break; - case HorizontalAlignment.Right: - format.Alignment = StringAlignment.Far; - break; - } - - if (RightToLeft) - { - format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags | StringFormatFlags.DirectionRightToLeft); - } - - if (LabelWrap) - { - format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags - & ~StringFormatFlags.NoWrap); + borderPen = new Pen(HighlightBorderColor); } else { - format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags | StringFormatFlags.NoWrap); + borderPen = new Pen(InactiveHighlightBorderColor); } - - return format; - } -#endregion - } - - [TypeConverter(typeof(ExpandableObjectConverter))]public class Alignment - { - public Alignment() - { - - } - - public Alignment(VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment) - { - Vertical = verticalAlignment; - Horizontal = horizontalAlignment; - } - - [NotifyParentProperty(true), - DefaultValue(VerticalAlignment.Top)]private VerticalAlignment _Vertical = VerticalAlignment.Top; - private VerticalAlignment Vertical + + if (e.Item.Selected) { - get + if (Focused) { - return _Vertical; + foreColorBrush = new SolidBrush(HighlightForeColor); + backColorBrush = new SolidBrush(HighlightBackColor); } - set + else { - _Vertical = value; + foreColorBrush = new SolidBrush(InactiveHighlightForeColor); + backColorBrush = new SolidBrush(InactiveHighlightBackColor); } } - - [NotifyParentProperty(true), - DefaultValue(HorizontalAlignment.Left)]private HorizontalAlignment _Horizontal = HorizontalAlignment.Left; - private HorizontalAlignment Horizontal + else { - get + foreColorBrush = new SolidBrush(e.Item.ForeColor); + backColorBrush = new SolidBrush(BackColor); + } + + e.Graphics.FillRectangle(backColorBrush, e.Bounds); + + if (Focused && ShowFocusCues) + { + e.DrawFocusRectangle(); + } + else if (e.Item.Selected) + { + e.Graphics.DrawRectangle(borderPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height - 1); + } + + Rectangle imageBounds = new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 6, 16, 16); + Rectangle textBounds = e.Bounds; + + if (e.Item.ImageList != null) + { + Image image = null; + if (!string.IsNullOrEmpty(e.Item.ImageKey) && e.Item.ImageList.Images.ContainsKey(e.Item.ImageKey)) { - return _Horizontal; + image = e.Item.ImageList.Images[e.Item.ImageKey]; } - set + else if (!(e.Item.ImageIndex < 0) & e.Item.ImageList.Images.Count > e.Item.ImageIndex) { - _Horizontal = value; + image = e.Item.ImageList.Images[e.Item.ImageIndex]; + } + if (image != null) + { + e.Graphics.DrawImageUnscaledAndClipped(image, imageBounds); + textBounds.X = textBounds.Left + 20; + textBounds.Width = textBounds.Width - 20; } } - - public override string ToString() + + e.Graphics.DrawString(e.Item.Text, e.Item.Font, foreColorBrush, textBounds, GetStringFormat()); + } + finally { - return string.Format("{0}, {1}", Vertical, Horizontal); + if (foreColorBrush != null) + { + foreColorBrush.Dispose(); + } + if (backColorBrush != null) + { + backColorBrush.Dispose(); + } + if (borderPen != null) + { + borderPen.Dispose(); + } } } - - public enum VerticalAlignment + #endregion + + #region Private Methods + private StringFormat GetStringFormat() { - Top, - Middle, - Bottom + StringFormat format = StringFormat.GenericDefault; + + switch (LabelAlignment.Vertical) + { + case VerticalAlignment.Top: + format.LineAlignment = StringAlignment.Near; + break; + case VerticalAlignment.Middle: + format.LineAlignment = StringAlignment.Center; + break; + case VerticalAlignment.Bottom: + format.LineAlignment = StringAlignment.Far; + break; + } + + switch (LabelAlignment.Horizontal) + { + case HorizontalAlignment.Left: + format.Alignment = StringAlignment.Near; + break; + case HorizontalAlignment.Center: + format.Alignment = StringAlignment.Center; + break; + case HorizontalAlignment.Right: + format.Alignment = StringAlignment.Far; + break; + } + + if (RightToLeft) + { + format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags | StringFormatFlags.DirectionRightToLeft); + } + + if (LabelWrap) + { + format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags + & ~StringFormatFlags.NoWrap); + } + else + { + format.FormatFlags = (System.Drawing.StringFormatFlags) (format.FormatFlags | StringFormatFlags.NoWrap); + } + + return format; } + #endregion + } - public enum HorizontalAlignment + [TypeConverter(typeof(ExpandableObjectConverter))] + public class Alignment + { + public Alignment() { - Left, - Center, - Right + + } + + public Alignment(VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment) + { + Vertical = verticalAlignment; + Horizontal = horizontalAlignment; + } + + [NotifyParentProperty(true), DefaultValue(VerticalAlignment.Top)] + private VerticalAlignment _Vertical = VerticalAlignment.Top; + public VerticalAlignment Vertical + { + get + { + return _Vertical; + } + set + { + _Vertical = value; + } + } + + [NotifyParentProperty(true), DefaultValue(HorizontalAlignment.Left)] + private HorizontalAlignment _Horizontal = HorizontalAlignment.Left; + public HorizontalAlignment Horizontal + { + get + { + return _Horizontal; + } + set + { + _Horizontal = value; + } + } + + public override string ToString() + { + return string.Format("{0}, {1}", Vertical, Horizontal); } } - + + public enum VerticalAlignment + { + Top, + Middle, + Bottom + } + + public enum HorizontalAlignment + { + Left, + Center, + Right + } } diff --git a/mRemoteV1/CS/Controls/QuickConnectComboBox.cs b/mRemoteV1/CS/Controls/QuickConnectComboBox.cs index 5cb5ee713..62e6b3d60 100644 --- a/mRemoteV1/CS/Controls/QuickConnectComboBox.cs +++ b/mRemoteV1/CS/Controls/QuickConnectComboBox.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,273 +8,268 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - -//using mRemoteNG.App.Runtime; +using mRemoteNG.Connection; +using mRemoteNG.Connection.Protocol; +using mRemoteNG.App; -namespace mRemoteNG +namespace mRemoteNG.Controls { - namespace Controls + public class QuickConnectComboBox : ToolStripComboBox { - public class QuickConnectComboBox : ToolStripComboBox + + private ComboBox _comboBox; + private bool _ignoreEnter = false; + + public QuickConnectComboBox() { - - private ComboBox _comboBox; - private bool _ignoreEnter = false; - - public QuickConnectComboBox() - { - _comboBox = ComboBox; - _comboBox.PreviewKeyDown += ComboBox_PreviewKeyDown; - _comboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged; - _comboBox.DrawItem += ComboBox_DrawItem; - _comboBox.DrawMode = DrawMode.OwnerDrawFixed; + _comboBox = ComboBox; + _comboBox.PreviewKeyDown += ComboBox_PreviewKeyDown; + _comboBox.SelectedIndexChanged += ComboBox_SelectedIndexChanged; + _comboBox.DrawItem += ComboBox_DrawItem; + _comboBox.DrawMode = DrawMode.OwnerDrawFixed; - // This makes it so that _ignoreEnter works correctly before any items are added to the combo box - _comboBox.Items.Clear(); - } + // This makes it so that _ignoreEnter works correctly before any items are added to the combo box + _comboBox.Items.Clear(); + } - private void ComboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + private void ComboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) + { + if (e.KeyCode == Keys.Enter & _comboBox.DroppedDown) { - if (e.KeyCode == Keys.Enter & _comboBox.DroppedDown) + _ignoreEnter = true; + } + } + + protected override void OnKeyDown(KeyEventArgs e) + { + base.OnKeyDown(e); + if (e.KeyCode == Keys.Enter) + { + // Only connect if Enter was not pressed while the combo box was dropped down + if (!_ignoreEnter) { - _ignoreEnter = true; + OnConnectRequested(new ConnectRequestedEventArgs(_comboBox.Text)); } + _ignoreEnter = false; + e.Handled = true; } - - protected override void OnKeyDown(KeyEventArgs e) + else if (e.KeyCode == Keys.Delete & _comboBox.DroppedDown) { - base.OnKeyDown(e); - if (e.KeyCode == Keys.Enter) + if (!(_comboBox.SelectedIndex == -1)) { - // Only connect if Enter was not pressed while the combo box was dropped down - if (!_ignoreEnter) + // Items can't be removed from the ComboBox while it is dropped down without possibly causing + // an exception so we must close it, delete the item, and then drop it down again. When we + // close it programmatically, the SelectedItem may revert to Nothing, so we must save it first. + object item = _comboBox.SelectedItem; + _comboBox.DroppedDown = false; + _comboBox.Items.Remove(item); + _comboBox.SelectedIndex = -1; + if (!(_comboBox.Items.Count == 0)) { - OnConnectRequested(new ConnectRequestedEventArgs(_comboBox.Text)); + _comboBox.DroppedDown = true; } - _ignoreEnter = false; - e.Handled = true; - } - else if (e.KeyCode == Keys.Delete & _comboBox.DroppedDown) - { - if (!(_comboBox.SelectedIndex == -1)) - { - // Items can't be removed from the ComboBox while it is dropped down without possibly causing - // an exception so we must close it, delete the item, and then drop it down again. When we - // close it programmatically, the SelectedItem may revert to Nothing, so we must save it first. - object item = _comboBox.SelectedItem; - _comboBox.DroppedDown = false; - _comboBox.Items.Remove(item); - _comboBox.SelectedIndex = -1; - if (!(_comboBox.Items.Count == 0)) - { - _comboBox.DroppedDown = true; - } - } - e.Handled = true; } + e.Handled = true; } + } - private void ComboBox_SelectedIndexChanged(System.Object sender, EventArgs e) + private void ComboBox_SelectedIndexChanged(System.Object sender, EventArgs e) + { + if (!(_comboBox.SelectedItem is HistoryItem)) { - if (!(_comboBox.SelectedItem is HistoryItem)) - { - return ; - } - HistoryItem historyItem = (HistoryItem) _comboBox.SelectedItem; - OnProtocolChanged(new ProtocolChangedEventArgs(historyItem.ConnectionInfo.Protocol)); + return ; } + HistoryItem historyItem = (HistoryItem) _comboBox.SelectedItem; + OnProtocolChanged(new ProtocolChangedEventArgs(historyItem.ConnectionInfo.Protocol)); + } - private static void ComboBox_DrawItem(object sender, DrawItemEventArgs e) + private static void ComboBox_DrawItem(object sender, DrawItemEventArgs e) + { + ComboBox comboBox = sender as ComboBox; + if (comboBox == null) { - ComboBox comboBox = sender as ComboBox; - if (comboBox == null) - { - return ; - } - object drawItem = comboBox.Items[e.Index]; + return ; + } + object drawItem = comboBox.Items[e.Index]; - string drawString = ""; - if (drawItem is HistoryItem) + string drawString = ""; + if (drawItem is HistoryItem) + { + HistoryItem historyItem = (HistoryItem) drawItem; + drawString = historyItem.ToString[true]; + } + else + { + drawString = drawItem.ToString(); + } + + e.DrawBackground(); + e.Graphics.DrawString(drawString, e.Font, new SolidBrush(e.ForeColor), new RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)); + e.DrawFocusRectangle(); + } + + private struct HistoryItem : IEquatable + { + + public Info ConnectionInfo {get; set;} + + public bool Equals(HistoryItem other) + { + if (!(ConnectionInfo.Hostname == other.ConnectionInfo.Hostname)) { - HistoryItem historyItem = (HistoryItem) drawItem; - drawString = historyItem.ToString[true]; + return false; + } + if (!(ConnectionInfo.Port == other.ConnectionInfo.Port)) + { + return false; + } + if (!(ConnectionInfo.Protocol == other.ConnectionInfo.Protocol)) + { + return false; + } + return true; + } + + public override string ToString() + { + return ToString(false); + } + + public string ToString(bool includeProtocol) + { + string port = string.Empty; + if (!(ConnectionInfo.Port == ConnectionInfo.GetDefaultPort())) + { + port = string.Format(":{0}", ConnectionInfo.Port); + } + if (includeProtocol) + { + return string.Format("{0}{1} ({2})", ConnectionInfo.Hostname, port, ConnectionInfo.Protocol); } else { - drawString = drawItem.ToString(); + return string.Format("{0}{1}", ConnectionInfo.Hostname, port); } - - e.DrawBackground(); - e.Graphics.DrawString(drawString, e.Font, new SolidBrush(e.ForeColor), new RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)); - e.DrawFocusRectangle(); } + } - private struct HistoryItem : IEquatable + private bool Exists(HistoryItem searchItem) + { + foreach (object item in _comboBox.Items) { - - public Protocol.Info ConnectionInfo {get; set;} - - public bool Equals(HistoryItem other) + if (!(item is HistoryItem)) + { + continue; + } + HistoryItem historyItem = (HistoryItem) item; + if (historyItem.Equals(searchItem)) { - if (!(ConnectionInfo.Hostname == other.ConnectionInfo.Hostname)) - { - return false; - } - if (!(ConnectionInfo.Port == other.ConnectionInfo.Port)) - { - return false; - } - if (!(ConnectionInfo.Protocol == other.ConnectionInfo.Protocol)) - { - return false; - } return true; } - - public override string ToString() - { - return ToString(false); - } - - public string ToString(bool includeProtocol) - { - string port = string.Empty; - if (!(ConnectionInfo.Port == ConnectionInfo.GetDefaultPort())) - { - port = string.Format(":{0}", ConnectionInfo.Port); - } - if (includeProtocol) - { - return string.Format("{0}{1} ({2})", ConnectionInfo.Hostname, port, ConnectionInfo.Protocol); - } - else - { - return string.Format("{0}{1}", ConnectionInfo.Hostname, port); - } - } } + return false; + } - private bool Exists(HistoryItem searchItem) + public void Add(Info connectionInfo) + { + try { - foreach (object item in _comboBox.Items) + HistoryItem historyItem = new HistoryItem(); + historyItem.ConnectionInfo = connectionInfo; + if (!Exists(historyItem)) { - if (!(item is HistoryItem)) - { - continue; - } - HistoryItem historyItem = (HistoryItem) item; - if (historyItem.Equals(searchItem)) - { - return true; - } - } - return false; - } - - public void Add(Protocol.Info connectionInfo) - { - try - { - HistoryItem historyItem = new HistoryItem(); - historyItem.ConnectionInfo = connectionInfo; - if (!Exists(historyItem)) - { - _comboBox.Items.Insert(0, historyItem); - } - } - catch (Exception ex) - { - MessageCollector.AddExceptionMessage(My.Language.strQuickConnectAddFailed, ex, Messages.MessageClass.ErrorMsg, true); + _comboBox.Items.Insert(0, historyItem); } } + catch (Exception ex) + { + Runtime.MessageCollector.AddExceptionMessage(My.Language.strQuickConnectAddFailed, ex, Messages.MessageClass.ErrorMsg, true); + } + } #region Events - public class ConnectRequestedEventArgs : EventArgs + public class ConnectRequestedEventArgs : EventArgs + { + + public ConnectRequestedEventArgs(string connectionString) { + _connectionString = connectionString; + } - public ConnectRequestedEventArgs(string connectionString) - { - _connectionString = connectionString; - } - - private string _connectionString; + private string _connectionString; public string ConnectionString - { - get - { - return _connectionString; - } - } - } - - public delegate void ConnectRequestedEventHandler(object sender, ConnectRequestedEventArgs e); - private ConnectRequestedEventHandler ConnectRequestedEvent; - - public event ConnectRequestedEventHandler ConnectRequested { - add + get { - ConnectRequestedEvent = (ConnectRequestedEventHandler) System.Delegate.Combine(ConnectRequestedEvent, value); - } - remove - { - ConnectRequestedEvent = (ConnectRequestedEventHandler) System.Delegate.Remove(ConnectRequestedEvent, value); + return _connectionString; } } - - - protected virtual void OnConnectRequested(ConnectRequestedEventArgs e) - { - if (ConnectRequestedEvent != null) - ConnectRequestedEvent(this, new ConnectRequestedEventArgs(e.ConnectionString)); - } - - public class ProtocolChangedEventArgs : EventArgs - { - - public ProtocolChangedEventArgs(Protocol.Protocol.Protocols protocol) - { - _protocol = protocol; - } - - private Protocol.Protocol.Protocols _protocol; - -public Protocol.Protocol.Protocols Protocol - { - get - { - return _protocol; - } - } - } - - public delegate void ProtocolChangedEventHandler(object sender, ProtocolChangedEventArgs e); - private ProtocolChangedEventHandler ProtocolChangedEvent; - - public event ProtocolChangedEventHandler ProtocolChanged - { - add - { - ProtocolChangedEvent = (ProtocolChangedEventHandler) System.Delegate.Combine(ProtocolChangedEvent, value); - } - remove - { - ProtocolChangedEvent = (ProtocolChangedEventHandler) System.Delegate.Remove(ProtocolChangedEvent, value); - } - } - - - protected virtual void OnProtocolChanged(ProtocolChangedEventArgs e) - { - if (ProtocolChangedEvent != null) - ProtocolChangedEvent(this, new ProtocolChangedEventArgs(e.Protocol)); - } -#endregion } + + public delegate void ConnectRequestedEventHandler(object sender, ConnectRequestedEventArgs e); + private ConnectRequestedEventHandler ConnectRequestedEvent; + + public event ConnectRequestedEventHandler ConnectRequested + { + add + { + ConnectRequestedEvent = (ConnectRequestedEventHandler) System.Delegate.Combine(ConnectRequestedEvent, value); + } + remove + { + ConnectRequestedEvent = (ConnectRequestedEventHandler) System.Delegate.Remove(ConnectRequestedEvent, value); + } + } + + + protected virtual void OnConnectRequested(ConnectRequestedEventArgs e) + { + if (ConnectRequestedEvent != null) + ConnectRequestedEvent(this, new ConnectRequestedEventArgs(e.ConnectionString)); + } + + public class ProtocolChangedEventArgs : EventArgs + { + + public ProtocolChangedEventArgs(Protocols protocol) + { + _protocol = protocol; + } + + private Protocols _protocol; + + public Protocols Protocol + { + get + { + return _protocol; + } + } + } + + public delegate void ProtocolChangedEventHandler(object sender, ProtocolChangedEventArgs e); + private ProtocolChangedEventHandler ProtocolChangedEvent; + + public event ProtocolChangedEventHandler ProtocolChanged + { + add + { + ProtocolChangedEvent = (ProtocolChangedEventHandler) System.Delegate.Combine(ProtocolChangedEvent, value); + } + remove + { + ProtocolChangedEvent = (ProtocolChangedEventHandler) System.Delegate.Remove(ProtocolChangedEvent, value); + } + } + + + protected virtual void OnProtocolChanged(ProtocolChangedEventArgs e) + { + if (ProtocolChangedEvent != null) + ProtocolChangedEvent(this, new ProtocolChangedEventArgs(e.Protocol)); + } + #endregion } - - } diff --git a/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.Designer.cs b/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.Designer.cs index c34ff8c23..5a2e0a203 100644 --- a/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.Designer.cs +++ b/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.Designer.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,208 +8,207 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports namespace mRemoteNG.Forms.OptionsPages { [global::Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]public partial class KeyboardPage : OptionsPage + { + + //UserControl overrides dispose to clean up the component list. + [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) { - - //UserControl overrides dispose to clean up the component list. - [System.Diagnostics.DebuggerNonUserCode()]protected override void Dispose(bool disposing) + try { - try + if (disposing && components != null) { - if (disposing && components != null) - { - components.Dispose(); - } - } - finally - { - base.Dispose(disposing); + components.Dispose(); } } - - //Required by the Windows Form Designer - private System.ComponentModel.Container components = null; - - //NOTE: The following procedure is required by the Windows Form Designer - //It can be modified using the Windows Form Designer. - //Do not modify it using the code editor. - [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() + finally { - System.Windows.Forms.GroupBox LineGroupBox = default(System.Windows.Forms.GroupBox); - mRemoteNG.Controls.Alignment Alignment1 = new mRemoteNG.Controls.Alignment(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KeyboardPage)); - this.btnDeleteKeyboardShortcut = new System.Windows.Forms.Button(); - this.btnDeleteKeyboardShortcut.Click += new System.EventHandler(this.btnDeleteKeyboardShortcut_Click); - this.btnNewKeyboardShortcut = new System.Windows.Forms.Button(); - this.btnNewKeyboardShortcut.Click += new System.EventHandler(this.btnNewKeyboardShortcut_Click); - this.grpModifyKeyboardShortcut = new System.Windows.Forms.GroupBox(); - this.hotModifyKeyboardShortcut = new SharedLibraryNG.HotkeyControl(); - this.hotModifyKeyboardShortcut.TextChanged += new System.EventHandler(this.hotModifyKeyboardShortcut_TextChanged); - this.btnResetAllKeyboardShortcuts = new System.Windows.Forms.Button(); - this.btnResetAllKeyboardShortcuts.Click += new System.EventHandler(this.btnResetAllKeyboardShortcuts_Click); - this.btnResetKeyboardShortcuts = new System.Windows.Forms.Button(); - this.btnResetKeyboardShortcuts.Click += new System.EventHandler(this.btnResetKeyboardShortcuts_Click); - this.lblKeyboardCommand = new System.Windows.Forms.Label(); - this.lstKeyboardShortcuts = new System.Windows.Forms.ListBox(); - this.lstKeyboardShortcuts.SelectedIndexChanged += new System.EventHandler(this.lstKeyboardShortcuts_SelectedIndexChanged); - this.lblKeyboardShortcuts = new System.Windows.Forms.Label(); - this.lvKeyboardCommands = new mRemoteNG.Controls.ListView(); - this.lvKeyboardCommands.SelectedIndexChanged += new System.EventHandler(this.lvKeyboardCommands_SelectedIndexChanged); - LineGroupBox = new System.Windows.Forms.GroupBox(); - this.grpModifyKeyboardShortcut.SuspendLayout(); - this.SuspendLayout(); - // - //LineGroupBox - // - LineGroupBox.Location = new System.Drawing.Point(212, 20); - LineGroupBox.Name = "LineGroupBox"; - LineGroupBox.Size = new System.Drawing.Size(398, 3); - LineGroupBox.TabIndex = 19; - LineGroupBox.TabStop = false; - // - //btnDeleteKeyboardShortcut - // - this.btnDeleteKeyboardShortcut.Location = new System.Drawing.Point(293, 151); - this.btnDeleteKeyboardShortcut.Name = "btnDeleteKeyboardShortcut"; - this.btnDeleteKeyboardShortcut.Size = new System.Drawing.Size(75, 23); - this.btnDeleteKeyboardShortcut.TabIndex = 15; - this.btnDeleteKeyboardShortcut.Text = "&Delete"; - this.btnDeleteKeyboardShortcut.UseVisualStyleBackColor = true; - // - //btnNewKeyboardShortcut - // - this.btnNewKeyboardShortcut.Location = new System.Drawing.Point(212, 151); - this.btnNewKeyboardShortcut.Name = "btnNewKeyboardShortcut"; - this.btnNewKeyboardShortcut.Size = new System.Drawing.Size(75, 23); - this.btnNewKeyboardShortcut.TabIndex = 14; - this.btnNewKeyboardShortcut.Text = "&New"; - this.btnNewKeyboardShortcut.UseVisualStyleBackColor = true; - // - //grpModifyKeyboardShortcut - // - this.grpModifyKeyboardShortcut.Controls.Add(this.hotModifyKeyboardShortcut); - this.grpModifyKeyboardShortcut.Location = new System.Drawing.Point(212, 180); - this.grpModifyKeyboardShortcut.Name = "grpModifyKeyboardShortcut"; - this.grpModifyKeyboardShortcut.Size = new System.Drawing.Size(398, 103); - this.grpModifyKeyboardShortcut.TabIndex = 17; - this.grpModifyKeyboardShortcut.TabStop = false; - this.grpModifyKeyboardShortcut.Text = "Modify Shortcut"; - // - //hotModifyKeyboardShortcut - // - this.hotModifyKeyboardShortcut.HotkeyModifiers = System.Windows.Forms.Keys.None; - this.hotModifyKeyboardShortcut.KeyCode = System.Windows.Forms.Keys.None; - this.hotModifyKeyboardShortcut.Location = new System.Drawing.Point(27, 41); - this.hotModifyKeyboardShortcut.Name = "hotModifyKeyboardShortcut"; - this.hotModifyKeyboardShortcut.Size = new System.Drawing.Size(344, 20); - this.hotModifyKeyboardShortcut.TabIndex = 0; - this.hotModifyKeyboardShortcut.Text = "None"; - // - //btnResetAllKeyboardShortcuts - // - this.btnResetAllKeyboardShortcuts.Location = new System.Drawing.Point(3, 466); - this.btnResetAllKeyboardShortcuts.Name = "btnResetAllKeyboardShortcuts"; - this.btnResetAllKeyboardShortcuts.Size = new System.Drawing.Size(120, 23); - this.btnResetAllKeyboardShortcuts.TabIndex = 18; - this.btnResetAllKeyboardShortcuts.Text = "Reset &All to Default"; - this.btnResetAllKeyboardShortcuts.UseVisualStyleBackColor = true; - // - //btnResetKeyboardShortcuts - // - this.btnResetKeyboardShortcuts.Location = new System.Drawing.Point(490, 151); - this.btnResetKeyboardShortcuts.Name = "btnResetKeyboardShortcuts"; - this.btnResetKeyboardShortcuts.Size = new System.Drawing.Size(120, 23); - this.btnResetKeyboardShortcuts.TabIndex = 16; - this.btnResetKeyboardShortcuts.Text = "&Reset to Default"; - this.btnResetKeyboardShortcuts.UseVisualStyleBackColor = true; - // - //lblKeyboardCommand - // - this.lblKeyboardCommand.AutoSize = true; - this.lblKeyboardCommand.Font = new System.Drawing.Font("Microsoft Sans Serif", (float) (10.0F), System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, System.Convert.ToByte(0)); - this.lblKeyboardCommand.Location = new System.Drawing.Point(209, 0); - this.lblKeyboardCommand.Name = "lblKeyboardCommand"; - this.lblKeyboardCommand.Size = new System.Drawing.Size(71, 17); - this.lblKeyboardCommand.TabIndex = 11; - this.lblKeyboardCommand.Text = "Command"; - // - //lstKeyboardShortcuts - // - this.lstKeyboardShortcuts.FormattingEnabled = true; - this.lstKeyboardShortcuts.Location = new System.Drawing.Point(212, 50); - this.lstKeyboardShortcuts.Name = "lstKeyboardShortcuts"; - this.lstKeyboardShortcuts.Size = new System.Drawing.Size(398, 95); - this.lstKeyboardShortcuts.TabIndex = 13; - // - //lblKeyboardShortcuts - // - this.lblKeyboardShortcuts.AutoSize = true; - this.lblKeyboardShortcuts.Location = new System.Drawing.Point(209, 34); - this.lblKeyboardShortcuts.Name = "lblKeyboardShortcuts"; - this.lblKeyboardShortcuts.Size = new System.Drawing.Size(100, 13); - this.lblKeyboardShortcuts.TabIndex = 12; - this.lblKeyboardShortcuts.Text = "Keyboard Shortcuts"; - // - //lvKeyboardCommands - // - this.lvKeyboardCommands.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvKeyboardCommands.HideSelection = false; - this.lvKeyboardCommands.InactiveHighlightBackColor = System.Drawing.SystemColors.Highlight; - this.lvKeyboardCommands.InactiveHighlightBorderColor = System.Drawing.SystemColors.HotTrack; - this.lvKeyboardCommands.InactiveHighlightForeColor = System.Drawing.SystemColors.HighlightText; - Alignment1.Horizontal = mRemoteNG.Controls.HorizontalAlignment.Left; - Alignment1.Vertical = mRemoteNG.Controls.VerticalAlignment.Middle; - this.lvKeyboardCommands.LabelAlignment = Alignment1; - this.lvKeyboardCommands.LabelWrap = false; - this.lvKeyboardCommands.Location = new System.Drawing.Point(3, 0); - this.lvKeyboardCommands.MultiSelect = false; - this.lvKeyboardCommands.Name = "lvKeyboardCommands"; - this.lvKeyboardCommands.OwnerDraw = true; - this.lvKeyboardCommands.Size = new System.Drawing.Size(200, 460); - this.lvKeyboardCommands.TabIndex = 10; - this.lvKeyboardCommands.TileSize = new System.Drawing.Size(196, 20); - this.lvKeyboardCommands.UseCompatibleStateImageBehavior = false; - this.lvKeyboardCommands.View = System.Windows.Forms.View.Tile; - // - //KeyboardPage - // - this.AutoScaleDimensions = new System.Drawing.SizeF((float) (6.0F), (float) (13.0F)); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(LineGroupBox); - this.Controls.Add(this.btnDeleteKeyboardShortcut); - this.Controls.Add(this.btnNewKeyboardShortcut); - this.Controls.Add(this.grpModifyKeyboardShortcut); - this.Controls.Add(this.btnResetAllKeyboardShortcuts); - this.Controls.Add(this.btnResetKeyboardShortcuts); - this.Controls.Add(this.lblKeyboardCommand); - this.Controls.Add(this.lstKeyboardShortcuts); - this.Controls.Add(this.lblKeyboardShortcuts); - this.Controls.Add(this.lvKeyboardCommands); - this.Name = "KeyboardPage"; - this.PageIcon = (System.Drawing.Icon) (resources.GetObject("$this.PageIcon")); - this.Size = new System.Drawing.Size(610, 489); - this.grpModifyKeyboardShortcut.ResumeLayout(false); - this.grpModifyKeyboardShortcut.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - + base.Dispose(disposing); } - internal System.Windows.Forms.Button btnDeleteKeyboardShortcut; - internal System.Windows.Forms.Button btnNewKeyboardShortcut; - internal System.Windows.Forms.GroupBox grpModifyKeyboardShortcut; - internal SharedLibraryNG.HotkeyControl hotModifyKeyboardShortcut; - internal System.Windows.Forms.Button btnResetAllKeyboardShortcuts; - internal System.Windows.Forms.Button btnResetKeyboardShortcuts; - internal System.Windows.Forms.Label lblKeyboardCommand; - internal System.Windows.Forms.ListBox lstKeyboardShortcuts; - internal System.Windows.Forms.Label lblKeyboardShortcuts; - internal mRemoteNG.Controls.ListView lvKeyboardCommands; - } + + //Required by the Windows Form Designer + private System.ComponentModel.Container components = null; + + //NOTE: The following procedure is required by the Windows Form Designer + //It can be modified using the Windows Form Designer. + //Do not modify it using the code editor. + [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() + { + System.Windows.Forms.GroupBox LineGroupBox = default(System.Windows.Forms.GroupBox); + mRemoteNG.Controls.Alignment Alignment1 = new mRemoteNG.Controls.Alignment(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KeyboardPage)); + this.btnDeleteKeyboardShortcut = new System.Windows.Forms.Button(); + this.btnDeleteKeyboardShortcut.Click += new System.EventHandler(this.btnDeleteKeyboardShortcut_Click); + this.btnNewKeyboardShortcut = new System.Windows.Forms.Button(); + this.btnNewKeyboardShortcut.Click += new System.EventHandler(this.btnNewKeyboardShortcut_Click); + this.grpModifyKeyboardShortcut = new System.Windows.Forms.GroupBox(); + this.hotModifyKeyboardShortcut = new SharedLibraryNG.HotkeyControl(); + this.hotModifyKeyboardShortcut.TextChanged += new System.EventHandler(this.hotModifyKeyboardShortcut_TextChanged); + this.btnResetAllKeyboardShortcuts = new System.Windows.Forms.Button(); + this.btnResetAllKeyboardShortcuts.Click += new System.EventHandler(this.btnResetAllKeyboardShortcuts_Click); + this.btnResetKeyboardShortcuts = new System.Windows.Forms.Button(); + this.btnResetKeyboardShortcuts.Click += new System.EventHandler(this.btnResetKeyboardShortcuts_Click); + this.lblKeyboardCommand = new System.Windows.Forms.Label(); + this.lstKeyboardShortcuts = new System.Windows.Forms.ListBox(); + this.lstKeyboardShortcuts.SelectedIndexChanged += new System.EventHandler(this.lstKeyboardShortcuts_SelectedIndexChanged); + this.lblKeyboardShortcuts = new System.Windows.Forms.Label(); + this.lvKeyboardCommands = new mRemoteNG.Controls.ListView(); + this.lvKeyboardCommands.SelectedIndexChanged += new System.EventHandler(this.lvKeyboardCommands_SelectedIndexChanged); + LineGroupBox = new System.Windows.Forms.GroupBox(); + this.grpModifyKeyboardShortcut.SuspendLayout(); + this.SuspendLayout(); + // + //LineGroupBox + // + LineGroupBox.Location = new System.Drawing.Point(212, 20); + LineGroupBox.Name = "LineGroupBox"; + LineGroupBox.Size = new System.Drawing.Size(398, 3); + LineGroupBox.TabIndex = 19; + LineGroupBox.TabStop = false; + // + //btnDeleteKeyboardShortcut + // + this.btnDeleteKeyboardShortcut.Location = new System.Drawing.Point(293, 151); + this.btnDeleteKeyboardShortcut.Name = "btnDeleteKeyboardShortcut"; + this.btnDeleteKeyboardShortcut.Size = new System.Drawing.Size(75, 23); + this.btnDeleteKeyboardShortcut.TabIndex = 15; + this.btnDeleteKeyboardShortcut.Text = "&Delete"; + this.btnDeleteKeyboardShortcut.UseVisualStyleBackColor = true; + // + //btnNewKeyboardShortcut + // + this.btnNewKeyboardShortcut.Location = new System.Drawing.Point(212, 151); + this.btnNewKeyboardShortcut.Name = "btnNewKeyboardShortcut"; + this.btnNewKeyboardShortcut.Size = new System.Drawing.Size(75, 23); + this.btnNewKeyboardShortcut.TabIndex = 14; + this.btnNewKeyboardShortcut.Text = "&New"; + this.btnNewKeyboardShortcut.UseVisualStyleBackColor = true; + // + //grpModifyKeyboardShortcut + // + this.grpModifyKeyboardShortcut.Controls.Add(this.hotModifyKeyboardShortcut); + this.grpModifyKeyboardShortcut.Location = new System.Drawing.Point(212, 180); + this.grpModifyKeyboardShortcut.Name = "grpModifyKeyboardShortcut"; + this.grpModifyKeyboardShortcut.Size = new System.Drawing.Size(398, 103); + this.grpModifyKeyboardShortcut.TabIndex = 17; + this.grpModifyKeyboardShortcut.TabStop = false; + this.grpModifyKeyboardShortcut.Text = "Modify Shortcut"; + // + //hotModifyKeyboardShortcut + // + this.hotModifyKeyboardShortcut.HotkeyModifiers = System.Windows.Forms.Keys.None; + this.hotModifyKeyboardShortcut.KeyCode = System.Windows.Forms.Keys.None; + this.hotModifyKeyboardShortcut.Location = new System.Drawing.Point(27, 41); + this.hotModifyKeyboardShortcut.Name = "hotModifyKeyboardShortcut"; + this.hotModifyKeyboardShortcut.Size = new System.Drawing.Size(344, 20); + this.hotModifyKeyboardShortcut.TabIndex = 0; + this.hotModifyKeyboardShortcut.Text = "None"; + // + //btnResetAllKeyboardShortcuts + // + this.btnResetAllKeyboardShortcuts.Location = new System.Drawing.Point(3, 466); + this.btnResetAllKeyboardShortcuts.Name = "btnResetAllKeyboardShortcuts"; + this.btnResetAllKeyboardShortcuts.Size = new System.Drawing.Size(120, 23); + this.btnResetAllKeyboardShortcuts.TabIndex = 18; + this.btnResetAllKeyboardShortcuts.Text = "Reset &All to Default"; + this.btnResetAllKeyboardShortcuts.UseVisualStyleBackColor = true; + // + //btnResetKeyboardShortcuts + // + this.btnResetKeyboardShortcuts.Location = new System.Drawing.Point(490, 151); + this.btnResetKeyboardShortcuts.Name = "btnResetKeyboardShortcuts"; + this.btnResetKeyboardShortcuts.Size = new System.Drawing.Size(120, 23); + this.btnResetKeyboardShortcuts.TabIndex = 16; + this.btnResetKeyboardShortcuts.Text = "&Reset to Default"; + this.btnResetKeyboardShortcuts.UseVisualStyleBackColor = true; + // + //lblKeyboardCommand + // + this.lblKeyboardCommand.AutoSize = true; + this.lblKeyboardCommand.Font = new System.Drawing.Font("Microsoft Sans Serif", (float) (10.0F), System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, System.Convert.ToByte(0)); + this.lblKeyboardCommand.Location = new System.Drawing.Point(209, 0); + this.lblKeyboardCommand.Name = "lblKeyboardCommand"; + this.lblKeyboardCommand.Size = new System.Drawing.Size(71, 17); + this.lblKeyboardCommand.TabIndex = 11; + this.lblKeyboardCommand.Text = "Command"; + // + //lstKeyboardShortcuts + // + this.lstKeyboardShortcuts.FormattingEnabled = true; + this.lstKeyboardShortcuts.Location = new System.Drawing.Point(212, 50); + this.lstKeyboardShortcuts.Name = "lstKeyboardShortcuts"; + this.lstKeyboardShortcuts.Size = new System.Drawing.Size(398, 95); + this.lstKeyboardShortcuts.TabIndex = 13; + // + //lblKeyboardShortcuts + // + this.lblKeyboardShortcuts.AutoSize = true; + this.lblKeyboardShortcuts.Location = new System.Drawing.Point(209, 34); + this.lblKeyboardShortcuts.Name = "lblKeyboardShortcuts"; + this.lblKeyboardShortcuts.Size = new System.Drawing.Size(100, 13); + this.lblKeyboardShortcuts.TabIndex = 12; + this.lblKeyboardShortcuts.Text = "Keyboard Shortcuts"; + // + //lvKeyboardCommands + // + this.lvKeyboardCommands.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvKeyboardCommands.HideSelection = false; + this.lvKeyboardCommands.InactiveHighlightBackColor = System.Drawing.SystemColors.Highlight; + this.lvKeyboardCommands.InactiveHighlightBorderColor = System.Drawing.SystemColors.HotTrack; + this.lvKeyboardCommands.InactiveHighlightForeColor = System.Drawing.SystemColors.HighlightText; + Alignment1.Horizontal = mRemoteNG.Controls.HorizontalAlignment.Left; + Alignment1.Vertical = mRemoteNG.Controls.VerticalAlignment.Middle; + this.lvKeyboardCommands.LabelAlignment = Alignment1; + this.lvKeyboardCommands.LabelWrap = false; + this.lvKeyboardCommands.Location = new System.Drawing.Point(3, 0); + this.lvKeyboardCommands.MultiSelect = false; + this.lvKeyboardCommands.Name = "lvKeyboardCommands"; + this.lvKeyboardCommands.OwnerDraw = true; + this.lvKeyboardCommands.Size = new System.Drawing.Size(200, 460); + this.lvKeyboardCommands.TabIndex = 10; + this.lvKeyboardCommands.TileSize = new System.Drawing.Size(196, 20); + this.lvKeyboardCommands.UseCompatibleStateImageBehavior = false; + this.lvKeyboardCommands.View = System.Windows.Forms.View.Tile; + // + //KeyboardPage + // + this.AutoScaleDimensions = new System.Drawing.SizeF((float) (6.0F), (float) (13.0F)); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(LineGroupBox); + this.Controls.Add(this.btnDeleteKeyboardShortcut); + this.Controls.Add(this.btnNewKeyboardShortcut); + this.Controls.Add(this.grpModifyKeyboardShortcut); + this.Controls.Add(this.btnResetAllKeyboardShortcuts); + this.Controls.Add(this.btnResetKeyboardShortcuts); + this.Controls.Add(this.lblKeyboardCommand); + this.Controls.Add(this.lstKeyboardShortcuts); + this.Controls.Add(this.lblKeyboardShortcuts); + this.Controls.Add(this.lvKeyboardCommands); + this.Name = "KeyboardPage"; + this.PageIcon = (System.Drawing.Icon) (resources.GetObject("$this.PageIcon")); + this.Size = new System.Drawing.Size(610, 489); + this.grpModifyKeyboardShortcut.ResumeLayout(false); + this.grpModifyKeyboardShortcut.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + internal System.Windows.Forms.Button btnDeleteKeyboardShortcut; + internal System.Windows.Forms.Button btnNewKeyboardShortcut; + internal System.Windows.Forms.GroupBox grpModifyKeyboardShortcut; + internal SharedLibraryNG.HotkeyControl hotModifyKeyboardShortcut; + internal System.Windows.Forms.Button btnResetAllKeyboardShortcuts; + internal System.Windows.Forms.Button btnResetKeyboardShortcuts; + internal System.Windows.Forms.Label lblKeyboardCommand; + internal System.Windows.Forms.ListBox lstKeyboardShortcuts; + internal System.Windows.Forms.Label lblKeyboardShortcuts; + internal mRemoteNG.Controls.ListView lvKeyboardCommands; + + } } diff --git a/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.cs b/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.cs index 4c7fb5d2e..bd136a35e 100644 --- a/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.cs +++ b/mRemoteV1/CS/Forms/OptionsPages/KeyboardPage.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,8 +8,6 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - using mRemoteNG.Config; using mRemoteNG.My; @@ -18,249 +15,245 @@ using mRemoteNG.My; namespace mRemoteNG.Forms.OptionsPages { public partial class KeyboardPage + { + public KeyboardPage() { - public KeyboardPage() - { - InitializeComponent(); - } -public override string PageName - { - get - { - return Language.strOptionsTabKeyboard; - } - set - { - } - } + InitializeComponent(); + } + + public override string PageName + { + get { return Language.strOptionsTabKeyboard; } + set {} + } - public override void ApplyLanguage() - { - base.ApplyLanguage(); + public override void ApplyLanguage() + { + base.ApplyLanguage(); - lblKeyboardShortcuts.Text = Language.strOptionsKeyboardLabelKeyboardShortcuts; - btnNewKeyboardShortcut.Text = Language.strOptionsKeyboardButtonNew; - btnDeleteKeyboardShortcut.Text = Language.strOptionsKeyboardButtonDelete; - btnResetKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonReset; - grpModifyKeyboardShortcut.Text = Language.strOptionsKeyboardGroupModifyShortcut; - btnResetAllKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonResetAll; + lblKeyboardShortcuts.Text = Language.strOptionsKeyboardLabelKeyboardShortcuts; + btnNewKeyboardShortcut.Text = Language.strOptionsKeyboardButtonNew; + btnDeleteKeyboardShortcut.Text = Language.strOptionsKeyboardButtonDelete; + btnResetKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonReset; + grpModifyKeyboardShortcut.Text = Language.strOptionsKeyboardGroupModifyShortcut; + btnResetAllKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonResetAll; + } + + public override void LoadSettings() + { + _tabsListViewGroup = new ListViewGroup(Language.strOptionsKeyboardCommandsGroupTabs); + _previousTabListViewItem = new ListViewItem(Language.strOptionsKeyboardCommandsPreviousTab, _tabsListViewGroup); + _nextTabListViewItem = new ListViewItem(Language.strOptionsKeyboardCommandsNextTab, _tabsListViewGroup); + + _keyboardShortcutMap = KeyboardShortcuts.Map.Clone(); + + lvKeyboardCommands.Groups.Add(_tabsListViewGroup); + lvKeyboardCommands.Items.Add(_previousTabListViewItem); + lvKeyboardCommands.Items.Add(_nextTabListViewItem); + _previousTabListViewItem.Selected = true; + } + + public override void SaveSettings() + { + base.SaveSettings(); + + if (_keyboardShortcutMap != null) + { + KeyboardShortcuts.Map = _keyboardShortcutMap; } + } - public override void LoadSettings() + #region Private Fields + private KeyboardShortcutMap _keyboardShortcutMap; + private ListViewGroup _tabsListViewGroup; + private ListViewItem _previousTabListViewItem; + private ListViewItem _nextTabListViewItem; + private bool _ignoreKeyboardShortcutTextChanged = false; + #endregion + + #region Private Methods + #region Event Handlers + public void lvKeyboardCommands_SelectedIndexChanged(System.Object sender, EventArgs e) + { + bool isItemSelected = lvKeyboardCommands.SelectedItems.Count == 1; + EnableKeyboardShortcutControls(isItemSelected); + + if (!isItemSelected) { - _tabsListViewGroup = new ListViewGroup(Language.strOptionsKeyboardCommandsGroupTabs); - _previousTabListViewItem = new ListViewItem(Language.strOptionsKeyboardCommandsPreviousTab, _tabsListViewGroup); - _nextTabListViewItem = new ListViewItem(Language.strOptionsKeyboardCommandsNextTab, _tabsListViewGroup); - - _keyboardShortcutMap = KeyboardShortcuts.Map.Clone(); - - lvKeyboardCommands.Groups.Add(_tabsListViewGroup); - lvKeyboardCommands.Items.Add(_previousTabListViewItem); - lvKeyboardCommands.Items.Add(_nextTabListViewItem); - _previousTabListViewItem.Selected = true; + return ; } - - public override void SaveSettings() - { - base.SaveSettings(); - if (_keyboardShortcutMap != null) - { - KeyboardShortcuts.Map = _keyboardShortcutMap; - } + ListViewItem selectedItem = lvKeyboardCommands.SelectedItems[0]; + + lblKeyboardCommand.Text = selectedItem.Text; + lstKeyboardShortcuts.Items.Clear(); + + lstKeyboardShortcuts.Items.AddRange(_keyboardShortcutMap.GetShortcutKeys(GetSelectedShortcutCommand())); + + if (lstKeyboardShortcuts.Items.Count > 0) + { + lstKeyboardShortcuts.SelectedIndex = 0; } + } -#region Private Fields - private KeyboardShortcutMap _keyboardShortcutMap; - private ListViewGroup _tabsListViewGroup; - private ListViewItem _previousTabListViewItem; - private ListViewItem _nextTabListViewItem; - private bool _ignoreKeyboardShortcutTextChanged = false; -#endregion - -#region Private Methods -#region Event Handlers - public void lvKeyboardCommands_SelectedIndexChanged(System.Object sender, EventArgs e) + public void lstKeyboardShortcuts_SelectedIndexChanged(System.Object sender, EventArgs e) + { + bool isItemSelected = lstKeyboardShortcuts.SelectedItems.Count == 1; + + btnDeleteKeyboardShortcut.Enabled = isItemSelected; + grpModifyKeyboardShortcut.Enabled = isItemSelected; + hotModifyKeyboardShortcut.Enabled = isItemSelected; + + if (!isItemSelected) { - bool isItemSelected = lvKeyboardCommands.SelectedItems.Count == 1; - EnableKeyboardShortcutControls(isItemSelected); - - if (!isItemSelected) - { - return ; - } - - ListViewItem selectedItem = lvKeyboardCommands.SelectedItems[0]; - - lblKeyboardCommand.Text = selectedItem.Text; - lstKeyboardShortcuts.Items.Clear(); - - lstKeyboardShortcuts.Items.AddRange(_keyboardShortcutMap.GetShortcutKeys(GetSelectedShortcutCommand())); - - if (lstKeyboardShortcuts.Items.Count > 0) - { - lstKeyboardShortcuts.SelectedIndex = 0; - } + hotModifyKeyboardShortcut.Text = string.Empty; + return ; } - - public void lstKeyboardShortcuts_SelectedIndexChanged(System.Object sender, EventArgs e) + + object selectedItem = lstKeyboardShortcuts.SelectedItems[0]; + ShortcutKey shortcutKey = selectedItem as ShortcutKey; + if (shortcutKey == null) { - bool isItemSelected = lstKeyboardShortcuts.SelectedItems.Count == 1; + return ; + } - btnDeleteKeyboardShortcut.Enabled = isItemSelected; - grpModifyKeyboardShortcut.Enabled = isItemSelected; - hotModifyKeyboardShortcut.Enabled = isItemSelected; + Keys keysValue = System.Windows.Forms.Keys.A; + Keys keyCode = System.Windows.Forms.Keys.A; + Keys modifiers = System.Windows.Forms.Keys.A; - if (!isItemSelected) - { - hotModifyKeyboardShortcut.Text = string.Empty; - return ; - } - - object selectedItem = lstKeyboardShortcuts.SelectedItems[0]; - ShortcutKey shortcutKey = selectedItem as ShortcutKey; + _ignoreKeyboardShortcutTextChanged = true; + hotModifyKeyboardShortcut.KeyCode = keyCode; + hotModifyKeyboardShortcut.HotkeyModifiers = modifiers; + _ignoreKeyboardShortcutTextChanged = false; + } + + public void btnNewKeyboardShortcut_Click(System.Object sender, EventArgs e) + { + foreach (object item in lstKeyboardShortcuts.Items) + { + ShortcutKey shortcutKey = item as ShortcutKey; if (shortcutKey == null) { + continue; + } + if (shortcutKey == 0) + { + lstKeyboardShortcuts.SelectedItem = item; return ; } - - Keys keysValue = System.Windows.Forms.Keys.A; - Keys keyCode = System.Windows.Forms.Keys.A; - Keys modifiers = System.Windows.Forms.Keys.A; - - _ignoreKeyboardShortcutTextChanged = true; - hotModifyKeyboardShortcut.KeyCode = keyCode; - hotModifyKeyboardShortcut.HotkeyModifiers = modifiers; - _ignoreKeyboardShortcutTextChanged = false; } - - public void btnNewKeyboardShortcut_Click(System.Object sender, EventArgs e) - { - foreach (object item in lstKeyboardShortcuts.Items) - { - ShortcutKey shortcutKey = item as ShortcutKey; - if (shortcutKey == null) - { - continue; - } - if (shortcutKey == 0) - { - lstKeyboardShortcuts.SelectedItem = item; - return ; - } - } - lstKeyboardShortcuts.SelectedIndex = lstKeyboardShortcuts.Items.Add(new ShortcutKey(Keys.None)); - hotModifyKeyboardShortcut.Focus(); - } - - public void btnDeleteKeyboardShortcut_Click(System.Object sender, EventArgs e) - { - int selectedIndex = lstKeyboardShortcuts.SelectedIndex; - - ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); - ShortcutKey key = lstKeyboardShortcuts.SelectedItem as ShortcutKey; - if (!(command == ShortcutCommand.None) & key != null) - { - _keyboardShortcutMap.Remove(GetSelectedShortcutCommand(), key); - } - - lstKeyboardShortcuts.Items.Remove(lstKeyboardShortcuts.SelectedItem); - - if (selectedIndex >= lstKeyboardShortcuts.Items.Count) - { - selectedIndex = lstKeyboardShortcuts.Items.Count - 1; - } - lstKeyboardShortcuts.SelectedIndex = selectedIndex; - } - - public void btnResetAllKeyboardShortcuts_Click(System.Object sender, EventArgs e) - { - _keyboardShortcutMap = KeyboardShortcuts.DefaultMap.Clone(); - lvKeyboardCommands_SelectedIndexChanged(this, new EventArgs()); - } - - public void btnResetKeyboardShortcuts_Click(System.Object sender, EventArgs e) - { - ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); - if (command == ShortcutCommand.None) - { - return ; - } - _keyboardShortcutMap.SetShortcutKeys(command, KeyboardShortcuts.DefaultMap.GetShortcutKeys(command)); - lvKeyboardCommands_SelectedIndexChanged(this, new EventArgs()); - } - - public void hotModifyKeyboardShortcut_TextChanged(System.Object sender, EventArgs e) - { - if (_ignoreKeyboardShortcutTextChanged || lstKeyboardShortcuts.SelectedIndex < 0 | lstKeyboardShortcuts.SelectedIndex >= lstKeyboardShortcuts.Items.Count) - { - return ; - } - - Keys keysValue = System.Windows.Forms.Keys.A; - - bool hadFocus = hotModifyKeyboardShortcut.ContainsFocus; - - ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); - ShortcutKey newShortcutKey = new ShortcutKey(keysValue); - - if (!(command == ShortcutCommand.None)) - { - ShortcutKey oldShortcutKey = lstKeyboardShortcuts.SelectedItem as ShortcutKey; - if (oldShortcutKey != null) - { - _keyboardShortcutMap.Remove(command, oldShortcutKey); - } - _keyboardShortcutMap.Add(command, newShortcutKey); - } - - lstKeyboardShortcuts.Items[lstKeyboardShortcuts.SelectedIndex] = newShortcutKey; - - if (hadFocus) - { - hotModifyKeyboardShortcut.Focus(); - hotModifyKeyboardShortcut.Select(hotModifyKeyboardShortcut.TextLength, 0); - } - } -#endregion - - private ShortcutCommand GetSelectedShortcutCommand() - { - if (!(lvKeyboardCommands.SelectedItems.Count == 1)) - { - return ShortcutCommand.None; - } - - ListViewItem selectedItem = lvKeyboardCommands.SelectedItems[0]; - if (selectedItem == _previousTabListViewItem) - { - return ShortcutCommand.PreviousTab; - } - else if (selectedItem == _nextTabListViewItem) - { - return ShortcutCommand.NextTab; - } - } - - private void EnableKeyboardShortcutControls(bool enable = true) - { - lblKeyboardCommand.Visible = enable; - lblKeyboardShortcuts.Enabled = enable; - lstKeyboardShortcuts.Enabled = enable; - btnNewKeyboardShortcut.Enabled = enable; - btnResetKeyboardShortcuts.Enabled = enable; - - if (!enable) - { - btnDeleteKeyboardShortcut.Enabled = false; - grpModifyKeyboardShortcut.Enabled = false; - hotModifyKeyboardShortcut.Enabled = false; - - lstKeyboardShortcuts.Items.Clear(); - hotModifyKeyboardShortcut.Text = string.Empty; - } - } -#endregion + lstKeyboardShortcuts.SelectedIndex = lstKeyboardShortcuts.Items.Add(new ShortcutKey(Keys.None)); + hotModifyKeyboardShortcut.Focus(); } + + public void btnDeleteKeyboardShortcut_Click(System.Object sender, EventArgs e) + { + int selectedIndex = lstKeyboardShortcuts.SelectedIndex; + + ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); + ShortcutKey key = lstKeyboardShortcuts.SelectedItem as ShortcutKey; + if (!(command == ShortcutCommand.None) & key != null) + { + _keyboardShortcutMap.Remove(GetSelectedShortcutCommand(), key); + } + + lstKeyboardShortcuts.Items.Remove(lstKeyboardShortcuts.SelectedItem); + + if (selectedIndex >= lstKeyboardShortcuts.Items.Count) + { + selectedIndex = lstKeyboardShortcuts.Items.Count - 1; + } + lstKeyboardShortcuts.SelectedIndex = selectedIndex; + } + + public void btnResetAllKeyboardShortcuts_Click(System.Object sender, EventArgs e) + { + _keyboardShortcutMap = KeyboardShortcuts.DefaultMap.Clone(); + lvKeyboardCommands_SelectedIndexChanged(this, new EventArgs()); + } + + public void btnResetKeyboardShortcuts_Click(System.Object sender, EventArgs e) + { + ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); + if (command == ShortcutCommand.None) + { + return ; + } + _keyboardShortcutMap.SetShortcutKeys(command, KeyboardShortcuts.DefaultMap.GetShortcutKeys(command)); + lvKeyboardCommands_SelectedIndexChanged(this, new EventArgs()); + } + + public void hotModifyKeyboardShortcut_TextChanged(System.Object sender, EventArgs e) + { + if (_ignoreKeyboardShortcutTextChanged || lstKeyboardShortcuts.SelectedIndex < 0 | lstKeyboardShortcuts.SelectedIndex >= lstKeyboardShortcuts.Items.Count) + { + return ; + } + + Keys keysValue = System.Windows.Forms.Keys.A; + + bool hadFocus = hotModifyKeyboardShortcut.ContainsFocus; + + ShortcutCommand command = (ShortcutCommand) (GetSelectedShortcutCommand()); + ShortcutKey newShortcutKey = new ShortcutKey(keysValue); + + if (!(command == ShortcutCommand.None)) + { + ShortcutKey oldShortcutKey = lstKeyboardShortcuts.SelectedItem as ShortcutKey; + if (oldShortcutKey != null) + { + _keyboardShortcutMap.Remove(command, oldShortcutKey); + } + _keyboardShortcutMap.Add(command, newShortcutKey); + } + + lstKeyboardShortcuts.Items[lstKeyboardShortcuts.SelectedIndex] = newShortcutKey; + + if (hadFocus) + { + hotModifyKeyboardShortcut.Focus(); + hotModifyKeyboardShortcut.Select(hotModifyKeyboardShortcut.TextLength, 0); + } + } + #endregion + + private ShortcutCommand GetSelectedShortcutCommand() + { + if (!(lvKeyboardCommands.SelectedItems.Count == 1)) + { + return ShortcutCommand.None; + } + + ListViewItem selectedItem = lvKeyboardCommands.SelectedItems[0]; + if (selectedItem == _previousTabListViewItem) + { + return ShortcutCommand.PreviousTab; + } + else if (selectedItem == _nextTabListViewItem) + { + return ShortcutCommand.NextTab; + } + } + + private void EnableKeyboardShortcutControls(bool enable = true) + { + lblKeyboardCommand.Visible = enable; + lblKeyboardShortcuts.Enabled = enable; + lstKeyboardShortcuts.Enabled = enable; + btnNewKeyboardShortcut.Enabled = enable; + btnResetKeyboardShortcuts.Enabled = enable; + + if (!enable) + { + btnDeleteKeyboardShortcut.Enabled = false; + grpModifyKeyboardShortcut.Enabled = false; + hotModifyKeyboardShortcut.Enabled = false; + + lstKeyboardShortcuts.Items.Clear(); + hotModifyKeyboardShortcut.Text = string.Empty; + } + } + #endregion + } } diff --git a/mRemoteV1/CS/Forms/frmMain.cs b/mRemoteV1/CS/Forms/frmMain.cs index 53e36590e..78fbb7233 100644 --- a/mRemoteV1/CS/Forms/frmMain.cs +++ b/mRemoteV1/CS/Forms/frmMain.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,19 +8,15 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - using System.IO; using mRemoteNG.App; using mRemoteNG.My; using SharedLibraryNG; using System.Text; using WeifenLuo.WinFormsUI.Docking; -//using mRemoteNG.App.Runtime; using System.Reflection; using System.Runtime.InteropServices; using Crownwood; -//using mRemoteNG.App.Native; using PSTaskDialog; using mRemoteNG.Config; using mRemoteNG.Themes; @@ -42,14 +37,14 @@ namespace mRemoteNG defaultInstance = this; } -#region Default Instance + #region Default Instance private static frmMain defaultInstance; /// /// Added by the VB.Net to C# Converter to support default instance behavour in C# /// -public static frmMain Default + public static frmMain Default { get { @@ -72,9 +67,9 @@ public static frmMain Default defaultInstance = null; } -#endregion + #endregion private FormWindowState _previousWindowState; -public FormWindowState PreviousWindowState + public FormWindowState PreviousWindowState { get { @@ -102,9 +97,9 @@ public FormWindowState PreviousWindowState private IntPtr fpChainedWindowHandle; -#region Properties + #region Properties private bool _isClosing = false; -public bool IsClosing + public bool IsClosing { get { @@ -113,7 +108,7 @@ public bool IsClosing } private bool _usingSqlServer = false; -public bool UsingSqlServer + public bool UsingSqlServer { get { @@ -131,7 +126,7 @@ public bool UsingSqlServer } private string _connectionsFileName = null; -public string ConnectionsFileName + public string ConnectionsFileName { get { @@ -149,7 +144,7 @@ public string ConnectionsFileName } private bool _showFullPathInTitle; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. -public bool ShowFullPathInTitle + public bool ShowFullPathInTitle { get { @@ -166,8 +161,8 @@ public bool ShowFullPathInTitle } } - private Protocol.Info _selectedConnection = null; -public Protocol.Info SelectedConnection + private Connection.Info _selectedConnection = null; + public Connection.Info SelectedConnection { get { @@ -183,9 +178,9 @@ public Protocol.Info SelectedConnection UpdateWindowTitle(); } } -#endregion + #endregion -#region Startup & Shutdown + #region Startup & Shutdown public void frmMain_Load(object sender, System.EventArgs e) { MainForm = this; @@ -211,8 +206,8 @@ public Protocol.Info SelectedConnection ApplyThemes(); fpChainedWindowHandle = SetClipboardViewer(this.Handle); - - MessageCollector = new Messages.Collector(Windows.errorsForm); + + Runtime.MessageCollector = new Messages.Collector(Windows.errorsForm); WindowList = new UI.Window.List(); @@ -243,11 +238,11 @@ public Protocol.Info SelectedConnection Windows.Show(UI.Window.Type.ComponentsCheck); } -#if PORTABLE + #if PORTABLE mMenInfoAnnouncements.Visible = false; mMenToolsUpdate.Visible = false; mMenInfoSep2.Visible = false; -#endif + #endif Startup.CreateSQLUpdateHandlerAndStartTimer(); @@ -366,9 +361,9 @@ public Protocol.Info SelectedConnection public void frmMain_Shown(object sender, EventArgs e) { -#if PORTABLE + #if PORTABLE return ; -#endif + #endif // if (!My.Settings.Default.CheckForUpdatesAsked) // { // string[] commandButtons = new string[] {My.Language.strAskUpdatesCommandRecommended, My.Language.strAskUpdatesCommandCustom, My.Language.strAskUpdatesCommandAskLater}; @@ -399,1007 +394,1007 @@ public Protocol.Info SelectedConnection // Startup.CheckForUpdate(); // Startup.CheckForAnnouncement(); // } - } + } - public void frmMain_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) - { - if (!(WindowList == null || WindowList.Count == 0)) - { - UI.Window.Connection connectionWindow = default(UI.Window.Connection); - int openConnections = 0; - foreach (UI.Window.Base window in WindowList) - { - connectionWindow = window as UI.Window.Connection; - if (connectionWindow != null) - { - openConnections = openConnections + connectionWindow.TabController.TabPages.Count; - } - } + public void frmMain_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) + { + if (!(WindowList == null || WindowList.Count == 0)) + { + UI.Window.Connection connectionWindow = default(UI.Window.Connection); + int openConnections = 0; + foreach (UI.Window.Base window in WindowList) + { + connectionWindow = window as UI.Window.Connection; + if (connectionWindow != null) + { + openConnections = openConnections + connectionWindow.TabController.TabPages.Count; + } + } - if (openConnections > 0 && (My.Settings.Default.ConfirmCloseConnection == ConfirmClose.All | (My.Settings.Default.ConfirmCloseConnection == ConfirmClose.Multiple & openConnections > 1) || My.Settings.Default.ConfirmCloseConnection == ConfirmClose.Exit)) - { - DialogResult result = cTaskDialog.MessageBox(this, (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName, My.Language.strConfirmExitMainInstruction, "", "", "", My.Language.strCheckboxDoNotShowThisMessageAgain, eTaskDialogButtons.YesNo, eSysIcons.Question, null); - if (cTaskDialog.VerificationChecked) - { - My.Settings.Default.ConfirmCloseConnection--; - } - if (result == DialogResult.No) - { - e.Cancel = true; - return ; - } - } - } + if (openConnections > 0 && (My.Settings.Default.ConfirmCloseConnection == ConfirmClose.All | (My.Settings.Default.ConfirmCloseConnection == ConfirmClose.Multiple & openConnections > 1) || My.Settings.Default.ConfirmCloseConnection == ConfirmClose.Exit)) + { + DialogResult result = cTaskDialog.MessageBox(this, (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName, My.Language.strConfirmExitMainInstruction, "", "", "", My.Language.strCheckboxDoNotShowThisMessageAgain, eTaskDialogButtons.YesNo, eSysIcons.Question, null); + if (cTaskDialog.VerificationChecked) + { + My.Settings.Default.ConfirmCloseConnection--; + } + if (result == DialogResult.No) + { + e.Cancel = true; + return ; + } + } + } - Shutdown.Cleanup(); + Shutdown.Cleanup(); - _isClosing = true; + _isClosing = true; - if (WindowList != null) - { - foreach (UI.Window.Base window in WindowList) - { - window.Close(); - } - } + if (WindowList != null) + { + foreach (UI.Window.Base window in WindowList) + { + window.Close(); + } + } - Shutdown.StartUpdate(); + Shutdown.StartUpdate(); - Debug.Print("[END] - " + System.Convert.ToString(DateTime.Now)); - } -#endregion + Debug.Print("[END] - " + System.Convert.ToString(DateTime.Now)); + } + #endregion -#region Timer - public void tmrAutoSave_Tick(System.Object sender, System.EventArgs e) - { - MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, "Doing AutoSave", true); - App.Runtime.SaveConnections(); - } -#endregion + #region Timer + public void tmrAutoSave_Tick(System.Object sender, System.EventArgs e) + { + Runtime.MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, "Doing AutoSave", true); + App.Runtime.SaveConnections(); + } + #endregion -#region Ext Apps Toolbar - public void cMenToolbarShowText_Click(System.Object sender, System.EventArgs e) - { - SwitchToolBarText(!cMenToolbarShowText.Checked); - } + #region Ext Apps Toolbar + public void cMenToolbarShowText_Click(System.Object sender, System.EventArgs e) + { + SwitchToolBarText(!cMenToolbarShowText.Checked); + } - public void AddExternalToolsToToolBar() - { - try - { - for (int index = tsExternalTools.Items.Count - 1; index >= 0; index--) - { - tsExternalTools.Items[index].Dispose(); - } - tsExternalTools.Items.Clear(); + public void AddExternalToolsToToolBar() + { + try + { + for (int index = tsExternalTools.Items.Count - 1; index >= 0; index--) + { + tsExternalTools.Items[index].Dispose(); + } + tsExternalTools.Items.Clear(); - ToolStripButton button = default(ToolStripButton); - foreach (Tools.ExternalTool tool in ExternalTools) - { - button = tsExternalTools.Items.Add(tool.DisplayName, tool.Image, tsExtAppEntry_Click); + ToolStripButton button = default(ToolStripButton); + foreach (Tools.ExternalTool tool in ExternalTools) + { + button = tsExternalTools.Items.Add(tool.DisplayName, tool.Image, tsExtAppEntry_Click); - if (cMenToolbarShowText.Checked == true) - { - button.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - } - else - { - if (button.Image != null) - { - button.DisplayStyle = ToolStripItemDisplayStyle.Image; - } - else - { - button.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - } - } + if (cMenToolbarShowText.Checked == true) + { + button.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; + } + else + { + if (button.Image != null) + { + button.DisplayStyle = ToolStripItemDisplayStyle.Image; + } + else + { + button.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; + } + } - button.Tag = tool; - } - } - catch (Exception ex) - { - MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, string.Format(My.Language.strErrorAddExternalToolsToToolBarFailed, ex.Message), true); - } - } + button.Tag = tool; + } + } + catch (Exception ex) + { + Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, string.Format(My.Language.strErrorAddExternalToolsToToolBarFailed, ex.Message), true); + } + } - private void tsExtAppEntry_Click(System.Object sender, System.EventArgs e) - { - Tools.ExternalTool extA = sender.Tag; + private void tsExtAppEntry_Click(System.Object sender, System.EventArgs e) + { + Tools.ExternalTool extA = sender.Tag; - if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Connection | Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttySession) - { - extA.Start(Tree.Node.SelectedNode.Tag); - } - else - { - extA.Start(); - } - } + if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Connection | Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttySession) + { + extA.Start(Tree.Node.SelectedNode.Tag); + } + else + { + extA.Start(); + } + } - public void SwitchToolBarText(bool show) - { - foreach (ToolStripButton tItem in tsExternalTools.Items) - { - if (show == true) - { - tItem.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - } - else - { - if (tItem.Image != null) - { - tItem.DisplayStyle = ToolStripItemDisplayStyle.Image; - } - else - { - tItem.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; - } - } - } + public void SwitchToolBarText(bool show) + { + foreach (ToolStripButton tItem in tsExternalTools.Items) + { + if (show == true) + { + tItem.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; + } + else + { + if (tItem.Image != null) + { + tItem.DisplayStyle = ToolStripItemDisplayStyle.Image; + } + else + { + tItem.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; + } + } + } - cMenToolbarShowText.Checked = show; - } -#endregion + cMenToolbarShowText.Checked = show; + } + #endregion -#region Menu -#region File - public void mMenFile_DropDownOpening(System.Object sender, System.EventArgs e) - { - if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Root) - { - mMenFileNewConnection.Enabled = true; - mMenFileNewFolder.Enabled = true; - mMenFileDelete.Enabled = false; - mMenFileRename.Enabled = true; - mMenFileDuplicate.Enabled = false; - mMenFileDelete.Text = My.Language.strMenuDelete; - mMenFileRename.Text = My.Language.strMenuRenameFolder; - mMenFileDuplicate.Text = My.Language.strMenuDuplicate; - } - else if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Container) - { - mMenFileNewConnection.Enabled = true; - mMenFileNewFolder.Enabled = true; - mMenFileDelete.Enabled = true; - mMenFileRename.Enabled = true; - mMenFileDuplicate.Enabled = true; - mMenFileDelete.Text = My.Language.strMenuDeleteFolder; - mMenFileRename.Text = My.Language.strMenuRenameFolder; - mMenFileDuplicate.Text = My.Language.strMenuDuplicateFolder; - } - else if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Connection) - { - mMenFileNewConnection.Enabled = true; - mMenFileNewFolder.Enabled = true; - mMenFileDelete.Enabled = true; - mMenFileRename.Enabled = true; - mMenFileDuplicate.Enabled = true; - mMenFileDelete.Text = My.Language.strMenuDeleteConnection; - mMenFileRename.Text = My.Language.strMenuRenameConnection; - mMenFileDuplicate.Text = My.Language.strMenuDuplicateConnection; - } - else if ((Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttyRoot) || (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttySession)) - { - mMenFileNewConnection.Enabled = false; - mMenFileNewFolder.Enabled = false; - mMenFileDelete.Enabled = false; - mMenFileRename.Enabled = false; - mMenFileDuplicate.Enabled = false; - mMenFileDelete.Text = My.Language.strMenuDelete; - mMenFileRename.Text = My.Language.strMenuRename; - mMenFileDuplicate.Text = My.Language.strMenuDuplicate; - } - else - { - mMenFileNewConnection.Enabled = true; - mMenFileNewFolder.Enabled = true; - mMenFileDelete.Enabled = false; - mMenFileRename.Enabled = false; - mMenFileDuplicate.Enabled = false; - mMenFileDelete.Text = My.Language.strMenuDelete; - mMenFileRename.Text = My.Language.strMenuRename; - mMenFileDuplicate.Text = My.Language.strMenuDuplicate; - } - } + #region Menu + #region File + public void mMenFile_DropDownOpening(System.Object sender, System.EventArgs e) + { + if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Root) + { + mMenFileNewConnection.Enabled = true; + mMenFileNewFolder.Enabled = true; + mMenFileDelete.Enabled = false; + mMenFileRename.Enabled = true; + mMenFileDuplicate.Enabled = false; + mMenFileDelete.Text = My.Language.strMenuDelete; + mMenFileRename.Text = My.Language.strMenuRenameFolder; + mMenFileDuplicate.Text = My.Language.strMenuDuplicate; + } + else if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Container) + { + mMenFileNewConnection.Enabled = true; + mMenFileNewFolder.Enabled = true; + mMenFileDelete.Enabled = true; + mMenFileRename.Enabled = true; + mMenFileDuplicate.Enabled = true; + mMenFileDelete.Text = My.Language.strMenuDeleteFolder; + mMenFileRename.Text = My.Language.strMenuRenameFolder; + mMenFileDuplicate.Text = My.Language.strMenuDuplicateFolder; + } + else if (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.Connection) + { + mMenFileNewConnection.Enabled = true; + mMenFileNewFolder.Enabled = true; + mMenFileDelete.Enabled = true; + mMenFileRename.Enabled = true; + mMenFileDuplicate.Enabled = true; + mMenFileDelete.Text = My.Language.strMenuDeleteConnection; + mMenFileRename.Text = My.Language.strMenuRenameConnection; + mMenFileDuplicate.Text = My.Language.strMenuDuplicateConnection; + } + else if ((Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttyRoot) || (Tree.Node.GetNodeType(Tree.Node.SelectedNode) == Tree.Node.Type.PuttySession)) + { + mMenFileNewConnection.Enabled = false; + mMenFileNewFolder.Enabled = false; + mMenFileDelete.Enabled = false; + mMenFileRename.Enabled = false; + mMenFileDuplicate.Enabled = false; + mMenFileDelete.Text = My.Language.strMenuDelete; + mMenFileRename.Text = My.Language.strMenuRename; + mMenFileDuplicate.Text = My.Language.strMenuDuplicate; + } + else + { + mMenFileNewConnection.Enabled = true; + mMenFileNewFolder.Enabled = true; + mMenFileDelete.Enabled = false; + mMenFileRename.Enabled = false; + mMenFileDuplicate.Enabled = false; + mMenFileDelete.Text = My.Language.strMenuDelete; + mMenFileRename.Text = My.Language.strMenuRename; + mMenFileDuplicate.Text = My.Language.strMenuDuplicate; + } + } - static public void mMenFileNewConnection_Click(System.Object sender, EventArgs e) - { - Windows.treeForm.AddConnection(); - SaveConnectionsBG(); - } + static public void mMenFileNewConnection_Click(System.Object sender, EventArgs e) + { + Windows.treeForm.AddConnection(); + SaveConnectionsBG(); + } - static public void mMenFileNewFolder_Click(System.Object sender, EventArgs e) - { - Windows.treeForm.AddFolder(); - SaveConnectionsBG(); - } + static public void mMenFileNewFolder_Click(System.Object sender, EventArgs e) + { + Windows.treeForm.AddFolder(); + SaveConnectionsBG(); + } - static public void mMenFileNew_Click(System.Object sender, EventArgs e) - { - SaveFileDialog saveFileDialog = Tools.Controls.ConnectionsSaveAsDialog(); - if (!(saveFileDialog.ShowDialog() == DialogResult.OK)) - { - return ; - } + static public void mMenFileNew_Click(System.Object sender, EventArgs e) + { + SaveFileDialog saveFileDialog = Tools.Controls.ConnectionsSaveAsDialog(); + if (!(saveFileDialog.ShowDialog() == DialogResult.OK)) + { + return ; + } - NewConnections(saveFileDialog.FileName); - } + NewConnections(saveFileDialog.FileName); + } - static public void mMenFileLoad_Click(System.Object sender, EventArgs e) - { - if (IsConnectionsFileLoaded) - { - switch (Interaction.MsgBox(Language.strSaveConnectionsFileBeforeOpeningAnother, (Microsoft.VisualBasic.MsgBoxStyle) (MsgBoxStyle.YesNoCancel | MsgBoxStyle.Question), null)) - { - case MsgBoxResult.Yes: - SaveConnections(); - break; - case MsgBoxResult.Cancel: - return ; - } - } + static public void mMenFileLoad_Click(System.Object sender, EventArgs e) + { + if (IsConnectionsFileLoaded) + { + switch (Interaction.MsgBox(Language.strSaveConnectionsFileBeforeOpeningAnother, (Microsoft.VisualBasic.MsgBoxStyle) (MsgBoxStyle.YesNoCancel | MsgBoxStyle.Question), null)) + { + case MsgBoxResult.Yes: + SaveConnections(); + break; + case MsgBoxResult.Cancel: + return ; + } + } - LoadConnections(true); - } + LoadConnections(true); + } - static public void mMenFileSave_Click(System.Object sender, EventArgs e) - { - SaveConnections(); - } + static public void mMenFileSave_Click(System.Object sender, EventArgs e) + { + SaveConnections(); + } - static public void mMenFileSaveAs_Click(System.Object sender, EventArgs e) - { - SaveConnectionsAs(); - } + static public void mMenFileSaveAs_Click(System.Object sender, EventArgs e) + { + SaveConnectionsAs(); + } - static public void mMenFileDelete_Click(System.Object sender, EventArgs e) - { - Tree.Node.DeleteSelectedNode(); - SaveConnectionsBG(); - } + static public void mMenFileDelete_Click(System.Object sender, EventArgs e) + { + Tree.Node.DeleteSelectedNode(); + SaveConnectionsBG(); + } - static public void mMenFileRename_Click(System.Object sender, EventArgs e) - { - Tree.Node.StartRenameSelectedNode(); - SaveConnectionsBG(); - } + static public void mMenFileRename_Click(System.Object sender, EventArgs e) + { + Tree.Node.StartRenameSelectedNode(); + SaveConnectionsBG(); + } - static public void mMenFileDuplicate_Click(System.Object sender, EventArgs e) - { - Tree.Node.CloneNode(Tree.Node.SelectedNode); - SaveConnectionsBG(); - } + static public void mMenFileDuplicate_Click(System.Object sender, EventArgs e) + { + Tree.Node.CloneNode(Tree.Node.SelectedNode); + SaveConnectionsBG(); + } - static public void mMenFileImportFromFile_Click(System.Object sender, EventArgs e) - { - Import.ImportFromFile(Windows.treeForm.tvConnections.Nodes[0], Windows.treeForm.tvConnections.SelectedNode); - } + static public void mMenFileImportFromFile_Click(System.Object sender, EventArgs e) + { + Import.ImportFromFile(Windows.treeForm.tvConnections.Nodes[0], Windows.treeForm.tvConnections.SelectedNode); + } - static public void mMenFileImportFromActiveDirectory_Click(System.Object sender, EventArgs e) - { - Windows.Show(UI.Window.Type.ActiveDirectoryImport); - } + static public void mMenFileImportFromActiveDirectory_Click(System.Object sender, EventArgs e) + { + Windows.Show(UI.Window.Type.ActiveDirectoryImport); + } - static public void mMenFileImportFromPortScan_Click(System.Object sender, EventArgs e) - { - Windows.Show(UI.Window.Type.PortScan, true); - } + static public void mMenFileImportFromPortScan_Click(System.Object sender, EventArgs e) + { + Windows.Show(UI.Window.Type.PortScan, true); + } - static public void mMenFileExport_Click(System.Object sender, EventArgs e) - { - Export.ExportToFile(Windows.treeForm.tvConnections.Nodes[0], Windows.treeForm.tvConnections.SelectedNode); - } + static public void mMenFileExport_Click(System.Object sender, EventArgs e) + { + Export.ExportToFile(Windows.treeForm.tvConnections.Nodes[0], Windows.treeForm.tvConnections.SelectedNode); + } - static public void mMenFileExit_Click(System.Object sender, EventArgs e) - { - Shutdown.Quit(); - } -#endregion + static public void mMenFileExit_Click(System.Object sender, EventArgs e) + { + Shutdown.Quit(); + } + #endregion -#region View - public void mMenView_DropDownOpening(object sender, System.EventArgs e) - { - this.mMenViewConnections.Checked = !Windows.treeForm.IsHidden; - this.mMenViewConfig.Checked = !Windows.configForm.IsHidden; - this.mMenViewErrorsAndInfos.Checked = !Windows.errorsForm.IsHidden; - this.mMenViewSessions.Checked = !Windows.sessionsForm.IsHidden; - this.mMenViewScreenshotManager.Checked = !Windows.screenshotForm.IsHidden; + #region View + public void mMenView_DropDownOpening(object sender, System.EventArgs e) + { + this.mMenViewConnections.Checked = !Windows.treeForm.IsHidden; + this.mMenViewConfig.Checked = !Windows.configForm.IsHidden; + this.mMenViewErrorsAndInfos.Checked = !Windows.errorsForm.IsHidden; + this.mMenViewSessions.Checked = !Windows.sessionsForm.IsHidden; + this.mMenViewScreenshotManager.Checked = !Windows.screenshotForm.IsHidden; - this.mMenViewExtAppsToolbar.Checked = tsExternalTools.Visible; - this.mMenViewQuickConnectToolbar.Checked = tsQuickConnect.Visible; + this.mMenViewExtAppsToolbar.Checked = tsExternalTools.Visible; + this.mMenViewQuickConnectToolbar.Checked = tsQuickConnect.Visible; - this.mMenViewConnectionPanels.DropDownItems.Clear(); + this.mMenViewConnectionPanels.DropDownItems.Clear(); - for (int i = 0; i <= WindowList.Count - 1; i++) - { - ToolStripMenuItem tItem = new ToolStripMenuItem(System.Convert.ToString(WindowList[i].Text), WindowList[i].Icon.ToBitmap, ConnectionPanelMenuItem_Click); - tItem.Tag = WindowList[i]; + for (int i = 0; i <= WindowList.Count - 1; i++) + { + ToolStripMenuItem tItem = new ToolStripMenuItem(System.Convert.ToString(WindowList[i].Text), WindowList[i].Icon.ToBitmap, ConnectionPanelMenuItem_Click); + tItem.Tag = WindowList[i]; - this.mMenViewConnectionPanels.DropDownItems.Add(tItem); - } + this.mMenViewConnectionPanels.DropDownItems.Add(tItem); + } - if (this.mMenViewConnectionPanels.DropDownItems.Count > 0) - { - this.mMenViewConnectionPanels.Enabled = true; - } - else - { - this.mMenViewConnectionPanels.Enabled = false; - } - } + if (this.mMenViewConnectionPanels.DropDownItems.Count > 0) + { + this.mMenViewConnectionPanels.Enabled = true; + } + else + { + this.mMenViewConnectionPanels.Enabled = false; + } + } - private void ConnectionPanelMenuItem_Click(object sender, System.EventArgs e) - { - (sender.Tag as UI.Window.Base).Show(this.pnlDock); - (sender.Tag as UI.Window.Base).Focus(); - } + private void ConnectionPanelMenuItem_Click(object sender, System.EventArgs e) + { + (sender.Tag as UI.Window.Base).Show(this.pnlDock); + (sender.Tag as UI.Window.Base).Focus(); + } - public void mMenViewSessions_Click(object sender, System.EventArgs e) - { - if (this.mMenViewSessions.Checked == false) - { - Windows.sessionsPanel.Show(this.pnlDock); - this.mMenViewSessions.Checked = true; - } - else - { - Windows.sessionsPanel.Hide(); - this.mMenViewSessions.Checked = false; - } - } + public void mMenViewSessions_Click(object sender, System.EventArgs e) + { + if (this.mMenViewSessions.Checked == false) + { + Windows.sessionsPanel.Show(this.pnlDock); + this.mMenViewSessions.Checked = true; + } + else + { + Windows.sessionsPanel.Hide(); + this.mMenViewSessions.Checked = false; + } + } - public void mMenViewConnections_Click(System.Object sender, System.EventArgs e) - { - if (this.mMenViewConnections.Checked == false) - { - Windows.treePanel.Show(this.pnlDock); - this.mMenViewConnections.Checked = true; - } - else - { - Windows.treePanel.Hide(); - this.mMenViewConnections.Checked = false; - } - } + public void mMenViewConnections_Click(System.Object sender, System.EventArgs e) + { + if (this.mMenViewConnections.Checked == false) + { + Windows.treePanel.Show(this.pnlDock); + this.mMenViewConnections.Checked = true; + } + else + { + Windows.treePanel.Hide(); + this.mMenViewConnections.Checked = false; + } + } - public void mMenViewConfig_Click(System.Object sender, System.EventArgs e) - { - if (this.mMenViewConfig.Checked == false) - { - Windows.configPanel.Show(this.pnlDock); - this.mMenViewConfig.Checked = true; - } - else - { - Windows.configPanel.Hide(); - this.mMenViewConfig.Checked = false; - } - } + public void mMenViewConfig_Click(System.Object sender, System.EventArgs e) + { + if (this.mMenViewConfig.Checked == false) + { + Windows.configPanel.Show(this.pnlDock); + this.mMenViewConfig.Checked = true; + } + else + { + Windows.configPanel.Hide(); + this.mMenViewConfig.Checked = false; + } + } - public void mMenViewErrorsAndInfos_Click(System.Object sender, System.EventArgs e) - { - if (this.mMenViewErrorsAndInfos.Checked == false) - { - Windows.errorsPanel.Show(this.pnlDock); - this.mMenViewErrorsAndInfos.Checked = true; - } - else - { - Windows.errorsPanel.Hide(); - this.mMenViewErrorsAndInfos.Checked = false; - } - } + public void mMenViewErrorsAndInfos_Click(System.Object sender, System.EventArgs e) + { + if (this.mMenViewErrorsAndInfos.Checked == false) + { + Windows.errorsPanel.Show(this.pnlDock); + this.mMenViewErrorsAndInfos.Checked = true; + } + else + { + Windows.errorsPanel.Hide(); + this.mMenViewErrorsAndInfos.Checked = false; + } + } - public void mMenViewScreenshotManager_Click(System.Object sender, System.EventArgs e) - { - if (this.mMenViewScreenshotManager.Checked == false) - { - Windows.screenshotPanel.Show(this.pnlDock); - this.mMenViewScreenshotManager.Checked = true; - } - else - { - Windows.screenshotPanel.Hide(); - this.mMenViewScreenshotManager.Checked = false; - } - } + public void mMenViewScreenshotManager_Click(System.Object sender, System.EventArgs e) + { + if (this.mMenViewScreenshotManager.Checked == false) + { + Windows.screenshotPanel.Show(this.pnlDock); + this.mMenViewScreenshotManager.Checked = true; + } + else + { + Windows.screenshotPanel.Hide(); + this.mMenViewScreenshotManager.Checked = false; + } + } - public void mMenViewJumpToConnectionsConfig_Click(object sender, System.EventArgs e) - { - if (pnlDock.ActiveContent == Windows.treePanel) - { - Windows.configForm.Activate(); - } - else - { - Windows.treeForm.Activate(); - } - } + public void mMenViewJumpToConnectionsConfig_Click(object sender, System.EventArgs e) + { + if (pnlDock.ActiveContent == Windows.treePanel) + { + Windows.configForm.Activate(); + } + else + { + Windows.treeForm.Activate(); + } + } - public void mMenViewJumpToSessionsScreenshots_Click(object sender, System.EventArgs e) - { - if (pnlDock.ActiveContent == Windows.sessionsPanel) - { - Windows.screenshotForm.Activate(); - } - else - { - Windows.sessionsForm.Activate(); - } - } + public void mMenViewJumpToSessionsScreenshots_Click(object sender, System.EventArgs e) + { + if (pnlDock.ActiveContent == Windows.sessionsPanel) + { + Windows.screenshotForm.Activate(); + } + else + { + Windows.sessionsForm.Activate(); + } + } - public void mMenViewJumpToErrorsInfos_Click(object sender, System.EventArgs e) - { - Windows.errorsForm.Activate(); - } + public void mMenViewJumpToErrorsInfos_Click(object sender, System.EventArgs e) + { + Windows.errorsForm.Activate(); + } - public void mMenViewResetLayout_Click(System.Object sender, System.EventArgs e) - { - if (Interaction.MsgBox(My.Language.strConfirmResetLayout, (Microsoft.VisualBasic.MsgBoxStyle) (MsgBoxStyle.Question | MsgBoxStyle.YesNo), null) == MsgBoxResult.Yes) - { - App.Runtime.Startup.SetDefaultLayout(); - } - } + public void mMenViewResetLayout_Click(System.Object sender, System.EventArgs e) + { + if (Interaction.MsgBox(My.Language.strConfirmResetLayout, (Microsoft.VisualBasic.MsgBoxStyle) (MsgBoxStyle.Question | MsgBoxStyle.YesNo), null) == MsgBoxResult.Yes) + { + App.Runtime.Startup.SetDefaultLayout(); + } + } - public void mMenViewAddConnectionPanel_Click(System.Object sender, System.EventArgs e) - { - AddPanel(); - } + public void mMenViewAddConnectionPanel_Click(System.Object sender, System.EventArgs e) + { + AddPanel(); + } - public void mMenViewExtAppsToolbar_Click(System.Object sender, System.EventArgs e) - { - if (mMenViewExtAppsToolbar.Checked == false) - { - tsExternalTools.Visible = true; - mMenViewExtAppsToolbar.Checked = true; - } - else - { - tsExternalTools.Visible = false; - mMenViewExtAppsToolbar.Checked = false; - } - } + public void mMenViewExtAppsToolbar_Click(System.Object sender, System.EventArgs e) + { + if (mMenViewExtAppsToolbar.Checked == false) + { + tsExternalTools.Visible = true; + mMenViewExtAppsToolbar.Checked = true; + } + else + { + tsExternalTools.Visible = false; + mMenViewExtAppsToolbar.Checked = false; + } + } - public void mMenViewQuickConnectToolbar_Click(System.Object sender, System.EventArgs e) - { - if (mMenViewQuickConnectToolbar.Checked == false) - { - tsQuickConnect.Visible = true; - mMenViewQuickConnectToolbar.Checked = true; - } - else - { - tsQuickConnect.Visible = false; - mMenViewQuickConnectToolbar.Checked = false; - } - } + public void mMenViewQuickConnectToolbar_Click(System.Object sender, System.EventArgs e) + { + if (mMenViewQuickConnectToolbar.Checked == false) + { + tsQuickConnect.Visible = true; + mMenViewQuickConnectToolbar.Checked = true; + } + else + { + tsQuickConnect.Visible = false; + mMenViewQuickConnectToolbar.Checked = false; + } + } - public Tools.Misc.Fullscreen Fullscreen; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. - public void mMenViewFullscreen_Click(System.Object sender, System.EventArgs e) - { - Fullscreen.Value = !Fullscreen.Value; - mMenViewFullscreen.Checked = Fullscreen.Value; - } -#endregion + public Tools.Misc.Fullscreen Fullscreen; // VBConversions Note: Initial value cannot be assigned here since it is non-static. Assignment has been moved to the class constructors. + public void mMenViewFullscreen_Click(System.Object sender, System.EventArgs e) + { + Fullscreen.Value = !Fullscreen.Value; + mMenViewFullscreen.Checked = Fullscreen.Value; + } + #endregion -#region Tools - public void mMenToolsUpdate_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.Update); - } + #region Tools + public void mMenToolsUpdate_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.Update); + } - public void mMenToolsSSHTransfer_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.SSHTransfer); - } + public void mMenToolsSSHTransfer_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.SSHTransfer); + } - public void mMenToolsUVNCSC_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.UltraVNCSC); - } + public void mMenToolsUVNCSC_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.UltraVNCSC); + } - public void mMenToolsExternalApps_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.ExternalApps); - } + public void mMenToolsExternalApps_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.ExternalApps); + } - public void mMenToolsPortScan_Click(System.Object sender, EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.PortScan, false); - } + public void mMenToolsPortScan_Click(System.Object sender, EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.PortScan, false); + } - public void mMenToolsComponentsCheck_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.ComponentsCheck); - } + public void mMenToolsComponentsCheck_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.ComponentsCheck); + } - public void mMenToolsOptions_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.Options); - } -#endregion + public void mMenToolsOptions_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.Options); + } + #endregion -#region Quick Connect - private void PopulateQuickConnectProtocolMenu() - { - try - { - mnuQuickConnectProtocol.Items.Clear(); - foreach (FieldInfo fieldInfo in typeof(Connection.Protocol.Protocols).GetFields) - { - if (!(fieldInfo.Name == "value__" || fieldInfo.Name == "IntApp")) - { - ToolStripMenuItem menuItem = new ToolStripMenuItem(fieldInfo.Name); - if (fieldInfo.Name == My.Settings.Default.QuickConnectProtocol) - { - menuItem.Checked = true; - btnQuickConnect.Text = System.Convert.ToString(My.Settings.Default.QuickConnectProtocol); - } - mnuQuickConnectProtocol.Items.Add(menuItem); - } - } - } - catch (Exception ex) - { - MessageCollector.AddExceptionMessage("PopulateQuickConnectProtocolMenu() failed.", ex, Messages.MessageClass.ErrorMsg, true); - } - } + #region Quick Connect + private void PopulateQuickConnectProtocolMenu() + { + try + { + mnuQuickConnectProtocol.Items.Clear(); + foreach (FieldInfo fieldInfo in typeof(Connection.Protocol.Protocols).GetFields) + { + if (!(fieldInfo.Name == "value__" || fieldInfo.Name == "IntApp")) + { + ToolStripMenuItem menuItem = new ToolStripMenuItem(fieldInfo.Name); + if (fieldInfo.Name == My.Settings.Default.QuickConnectProtocol) + { + menuItem.Checked = true; + btnQuickConnect.Text = System.Convert.ToString(My.Settings.Default.QuickConnectProtocol); + } + mnuQuickConnectProtocol.Items.Add(menuItem); + } + } + } + catch (Exception ex) + { + Runtime.MessageCollector.AddExceptionMessage("PopulateQuickConnectProtocolMenu() failed.", ex, Messages.MessageClass.ErrorMsg, true); + } + } - public void lblQuickConnect_Click(System.Object sender, EventArgs e) - { - cmbQuickConnect.Focus(); - } + public void lblQuickConnect_Click(System.Object sender, EventArgs e) + { + cmbQuickConnect.Focus(); + } - public void cmbQuickConnect_ConnectRequested(object sender, Controls.QuickConnectComboBox.ConnectRequestedEventArgs e) - { - btnQuickConnect_ButtonClick(sender, e); - } + public void cmbQuickConnect_ConnectRequested(object sender, Controls.QuickConnectComboBox.ConnectRequestedEventArgs e) + { + btnQuickConnect_ButtonClick(sender, e); + } - public void btnQuickConnect_ButtonClick(object sender, EventArgs e) - { - try - { - Connection.Info connectionInfo = CreateQuickConnect(cmbQuickConnect.Text.Trim(), Connection.Protocol.Converter.StringToProtocol(System.Convert.ToString(My.Settings.Default.QuickConnectProtocol))); - if (connectionInfo == null) - { - cmbQuickConnect.Focus(); - return ; - } + public void btnQuickConnect_ButtonClick(object sender, EventArgs e) + { + try + { + Connection.Info connectionInfo = CreateQuickConnect(cmbQuickConnect.Text.Trim(), Connection.Protocol.Converter.StringToProtocol(System.Convert.ToString(My.Settings.Default.QuickConnectProtocol))); + if (connectionInfo == null) + { + cmbQuickConnect.Focus(); + return ; + } - cmbQuickConnect.Add(connectionInfo); + cmbQuickConnect.Add(connectionInfo); - OpenConnection(connectionInfo, Connection.Info.Force.DoNotJump); - } - catch (Exception ex) - { - MessageCollector.AddExceptionMessage("btnQuickConnect_ButtonClick() failed.", ex, Messages.MessageClass.ErrorMsg, true); - } - } + OpenConnection(connectionInfo, Connection.Info.Force.DoNotJump); + } + catch (Exception ex) + { + MessageCollector.AddExceptionMessage("btnQuickConnect_ButtonClick() failed.", ex, Messages.MessageClass.ErrorMsg, true); + } + } - public void cmbQuickConnect_ProtocolChanged(object sender, Controls.QuickConnectComboBox.ProtocolChangedEventArgs e) - { - SetQuickConnectProtocol(Connection.Protocol.Converter.ProtocolToString(e.Protocol)); - } + public void cmbQuickConnect_ProtocolChanged(object sender, Controls.QuickConnectComboBox.ProtocolChangedEventArgs e) + { + SetQuickConnectProtocol(Connection.Protocol.Converter.ProtocolToString(e.Protocol)); + } - public void btnQuickConnect_DropDownItemClicked(System.Object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e) - { - SetQuickConnectProtocol(e.ClickedItem.Text); - } + public void btnQuickConnect_DropDownItemClicked(System.Object sender, System.Windows.Forms.ToolStripItemClickedEventArgs e) + { + SetQuickConnectProtocol(e.ClickedItem.Text); + } - private void SetQuickConnectProtocol(string protocol) - { - My.Settings.Default.QuickConnectProtocol = protocol; - btnQuickConnect.Text = protocol; - foreach (ToolStripMenuItem menuItem in mnuQuickConnectProtocol.Items) - { - if (menuItem.Text == protocol) - { - menuItem.Checked = true; - } - else - { - menuItem.Checked = false; - } - } - } -#endregion + private void SetQuickConnectProtocol(string protocol) + { + My.Settings.Default.QuickConnectProtocol = protocol; + btnQuickConnect.Text = protocol; + foreach (ToolStripMenuItem menuItem in mnuQuickConnectProtocol.Items) + { + if (menuItem.Text == protocol) + { + menuItem.Checked = true; + } + else + { + menuItem.Checked = false; + } + } + } + #endregion -#region Info - public void mMenInfoHelp_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.Help); - } + #region Info + public void mMenInfoHelp_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.Help); + } - public void mMenInfoForum_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.GoToForum(); - } + public void mMenInfoForum_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.GoToForum(); + } - public void mMenInfoBugReport_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.GoToBugs(); - } + public void mMenInfoBugReport_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.GoToBugs(); + } - public void mMenInfoWebsite_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.GoToWebsite(); - } + public void mMenInfoWebsite_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.GoToWebsite(); + } - public void mMenInfoDonate_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.GoToDonate(); - } + public void mMenInfoDonate_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.GoToDonate(); + } - public void mMenInfoAnnouncements_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.Announcement); - } + public void mMenInfoAnnouncements_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.Announcement); + } - public void mMenInfoAbout_Click(System.Object sender, System.EventArgs e) - { - App.Runtime.Windows.Show(UI.Window.Type.About); - } -#endregion -#endregion - -#region Connections DropDown - public void btnConnections_DropDownOpening(object sender, EventArgs e) - { - btnConnections.DropDownItems.Clear(); + public void mMenInfoAbout_Click(System.Object sender, System.EventArgs e) + { + App.Runtime.Windows.Show(UI.Window.Type.About); + } + #endregion + #endregion + + #region Connections DropDown + public void btnConnections_DropDownOpening(object sender, EventArgs e) + { + btnConnections.DropDownItems.Clear(); - foreach (TreeNode treeNode in Windows.treeForm.tvConnections.Nodes) - { - AddNodeToMenu(treeNode.Nodes, btnConnections); - } - } + foreach (TreeNode treeNode in Windows.treeForm.tvConnections.Nodes) + { + AddNodeToMenu(treeNode.Nodes, btnConnections); + } + } - private static void AddNodeToMenu(TreeNodeCollection treeNodeCollection, ToolStripDropDownItem toolStripMenuItem) - { - try - { - foreach (TreeNode treeNode in treeNodeCollection) - { - ToolStripMenuItem menuItem = new ToolStripMenuItem(); - menuItem.Text = treeNode.Text; - menuItem.Tag = treeNode; + private static void AddNodeToMenu(TreeNodeCollection treeNodeCollection, ToolStripDropDownItem toolStripMenuItem) + { + try + { + foreach (TreeNode treeNode in treeNodeCollection) + { + ToolStripMenuItem menuItem = new ToolStripMenuItem(); + menuItem.Text = treeNode.Text; + menuItem.Tag = treeNode; - if (Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.Container) - { - menuItem.Image = global::My.Resources.Folder; - menuItem.Tag = treeNode.Tag; + if (Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.Container) + { + menuItem.Image = global::My.Resources.Folder; + menuItem.Tag = treeNode.Tag; - toolStripMenuItem.DropDownItems.Add(menuItem); - AddNodeToMenu(treeNode.Nodes, menuItem); - } - else if (Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.Connection | Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.PuttySession) - { - menuItem.Image = Windows.treeForm.imgListTree.Images[treeNode.ImageIndex]; - menuItem.Tag = treeNode.Tag; + toolStripMenuItem.DropDownItems.Add(menuItem); + AddNodeToMenu(treeNode.Nodes, menuItem); + } + else if (Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.Connection | Tree.Node.GetNodeType(treeNode) == Tree.Node.Type.PuttySession) + { + menuItem.Image = Windows.treeForm.imgListTree.Images[treeNode.ImageIndex]; + menuItem.Tag = treeNode.Tag; - toolStripMenuItem.DropDownItems.Add(menuItem); - } + toolStripMenuItem.DropDownItems.Add(menuItem); + } - menuItem.MouseUp += ConnectionsMenuItem_MouseUp; - } - } - catch (Exception ex) - { - MessageCollector.AddExceptionMessage("frmMain.AddNodeToMenu() failed", ex, Messages.MessageClass.ErrorMsg, true); - } - } + menuItem.MouseUp += ConnectionsMenuItem_MouseUp; + } + } + catch (Exception ex) + { + MessageCollector.AddExceptionMessage("frmMain.AddNodeToMenu() failed", ex, Messages.MessageClass.ErrorMsg, true); + } + } - private static void ConnectionsMenuItem_MouseUp(System.Object sender, System.Windows.Forms.MouseEventArgs e) - { - if (e.Button == MouseButtons.Left) - { - if (sender.Tag is Connection.Info) - { - App.Runtime.OpenConnection(sender.Tag); - } - } - } -#endregion + private static void ConnectionsMenuItem_MouseUp(System.Object sender, System.Windows.Forms.MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + if (sender.Tag is Connection.Info) + { + App.Runtime.OpenConnection(sender.Tag); + } + } + } + #endregion + + #region Window Overrides and DockPanel Stuff + private bool _inSizeMove = false; + public void frmMain_ResizeBegin(object sender, EventArgs e) + { + _inSizeMove = true; + } -#region Window Overrides and DockPanel Stuff - private bool _inSizeMove = false; - public void frmMain_ResizeBegin(object sender, EventArgs e) - { - _inSizeMove = true; - } + public void frmMain_Resize(object sender, EventArgs e) + { + if (WindowState == FormWindowState.Minimized) + { + if (My.Settings.Default.MinimizeToTray) + { + if (NotificationAreaIcon == null) + { + NotificationAreaIcon = new Tools.Controls.NotificationAreaIcon(); + } + Hide(); + } + } + else + { + PreviousWindowState = WindowState; + } + } - public void frmMain_Resize(object sender, EventArgs e) - { - if (WindowState == FormWindowState.Minimized) - { - if (My.Settings.Default.MinimizeToTray) - { - if (NotificationAreaIcon == null) - { - NotificationAreaIcon = new Tools.Controls.NotificationAreaIcon(); - } - Hide(); - } - } - else - { - PreviousWindowState = WindowState; - } - } - - public void frmMain_ResizeEnd(object sender, EventArgs e) - { - _inSizeMove = false; + public void frmMain_ResizeEnd(object sender, EventArgs e) + { + _inSizeMove = false; - // This handles activations from clicks that started a size/move operation - ActivateConnection(); - } + // This handles activations from clicks that started a size/move operation + ActivateConnection(); + } - private bool _inMouseActivate = false; - protected override void WndProc(ref Message m) - { - try - { - if (m.Msg == WM_MOUSEACTIVATE) - { - _inMouseActivate = true; - } - else if (m.Msg == WM_ACTIVATEAPP) - { - _inMouseActivate = false; - } - else if (m.Msg == WM_ACTIVATE) - { - // Ingore this message if it wasn't triggered by a click - if (!(LOWORD(m.WParam) == WA_CLICKACTIVE)) - { - } + private bool _inMouseActivate = false; + protected override void WndProc(ref Message m) + { + try + { + if (m.Msg == WM_MOUSEACTIVATE) + { + _inMouseActivate = true; + } + else if (m.Msg == WM_ACTIVATEAPP) + { + _inMouseActivate = false; + } + else if (m.Msg == WM_ACTIVATE) + { + // Ingore this message if it wasn't triggered by a click + if (!(LOWORD(m.WParam) == WA_CLICKACTIVE)) + { + } - Control control = FromChildHandle(WindowFromPoint(MousePosition)); - if (!(control == null)) - { - // Let TreeViews and ComboBoxes get focus but don't simulate a mouse event - if (control is TreeView|| control is ComboBox) - { - } + Control control = FromChildHandle(WindowFromPoint(MousePosition)); + if (!(control == null)) + { + // Let TreeViews and ComboBoxes get focus but don't simulate a mouse event + if (control is TreeView|| control is ComboBox) + { + } - if (control.CanSelect || control is MenuStrip|| control is ToolStrip|| control is Crownwood.Magic.Controls.TabControl|| control is Crownwood.Magic.Controls.InertButton) - { - // Simulate a mouse event since one wasn't generated by Windows - Point clientMousePosition = control.PointToClient(MousePosition); - System.Int32 temp_wLow = clientMousePosition.X; - System.Int32 temp_wHigh = clientMousePosition.Y; - SendMessage(control.Handle, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(ref temp_wLow, ref temp_wHigh)); - clientMousePosition.X = temp_wLow; - clientMousePosition.Y = temp_wHigh; + if (control.CanSelect || control is MenuStrip|| control is ToolStrip|| control is Crownwood.Magic.Controls.TabControl|| control is Crownwood.Magic.Controls.InertButton) + { + // Simulate a mouse event since one wasn't generated by Windows + Point clientMousePosition = control.PointToClient(MousePosition); + System.Int32 temp_wLow = clientMousePosition.X; + System.Int32 temp_wHigh = clientMousePosition.Y; + SendMessage(control.Handle, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(ref temp_wLow, ref temp_wHigh)); + clientMousePosition.X = temp_wLow; + clientMousePosition.Y = temp_wHigh; - control.Focus(); - } - } + control.Focus(); + } + } - // This handles activations from clicks that did not start a size/move operation - ActivateConnection(); - } - else if (m.Msg == WM_WINDOWPOSCHANGED) - { - // Ignore this message if the window wasn't activated - WINDOWPOS windowPos = Marshal.PtrToStructure(m.LParam, typeof(WINDOWPOS)); - if (!((windowPos.flags & SWP_NOACTIVATE) == 0)) - { - } + // This handles activations from clicks that did not start a size/move operation + ActivateConnection(); + } + else if (m.Msg == WM_WINDOWPOSCHANGED) + { + // Ignore this message if the window wasn't activated + WINDOWPOS windowPos = Marshal.PtrToStructure(m.LParam, typeof(WINDOWPOS)); + if (!((windowPos.flags & SWP_NOACTIVATE) == 0)) + { + } - // This handles all other activations - if (!_inMouseActivate && !_inSizeMove) - { - ActivateConnection(); - } - } - else if (m.Msg == WM_SYSCOMMAND) - { - for (int i = 0; i <= SysMenSubItems.Length - 1; i++) - { - if (SysMenSubItems[i] == m.WParam) - { - Screens.SendFormToScreen(Screen.AllScreens[i]); - break; - } - } - } - else if (m.Msg == WM_DRAWCLIPBOARD) - { - SendMessage(fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); - if (clipboardchangeEvent != null) - clipboardchangeEvent(); - } - else if (m.Msg == WM_CHANGECBCHAIN) - { - //Send to the next window - SendMessage(fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); - fpChainedWindowHandle = m.LParam; - } - else if (m.Msg == KeyboardHook.HookKeyMsg) - { - if (!(m.WParam.ToInt32() == Win32.WM_KEYDOWN)) - { - } + // This handles all other activations + if (!_inMouseActivate && !_inSizeMove) + { + ActivateConnection(); + } + } + else if (m.Msg == WM_SYSCOMMAND) + { + for (int i = 0; i <= SysMenSubItems.Length - 1; i++) + { + if (SysMenSubItems[i] == m.WParam) + { + Screens.SendFormToScreen(Screen.AllScreens[i]); + break; + } + } + } + else if (m.Msg == WM_DRAWCLIPBOARD) + { + SendMessage(fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); + if (clipboardchangeEvent != null) + clipboardchangeEvent(); + } + else if (m.Msg == WM_CHANGECBCHAIN) + { + //Send to the next window + SendMessage(fpChainedWindowHandle, m.Msg, m.LParam, m.WParam); + fpChainedWindowHandle = m.LParam; + } + else if (m.Msg == KeyboardHook.HookKeyMsg) + { + if (!(m.WParam.ToInt32() == Win32.WM_KEYDOWN)) + { + } - switch (KeyboardShortcuts.CommandFromHookKeyMessage(m)) - { - case ShortcutCommand.PreviousTab: - SelectTabRelative(-1); - break; - case ShortcutCommand.NextTab: - SelectTabRelative(1); - break; - } - } - } - catch (Exception) - { - } + switch (KeyboardShortcuts.CommandFromHookKeyMessage(m)) + { + case ShortcutCommand.PreviousTab: + SelectTabRelative(-1); + break; + case ShortcutCommand.NextTab: + SelectTabRelative(1); + break; + } + } + } + catch (Exception) + { + } - base.WndProc(ref m); - } + base.WndProc(ref m); + } - private void ActivateConnection() - { - if (pnlDock.ActiveDocument is UI.Window.Connection) - { - UI.Window.Connection cW = pnlDock.ActiveDocument; - if (cW.TabController.SelectedTab != null) - { - Crownwood.Magic.Controls.TabPage tab = cW.TabController.SelectedTab; - Connection.InterfaceControl ifc = tab.Tag as Connection.InterfaceControl; - ifc.Protocol.Focus(); - (ifc.FindForm() as UI.Window.Connection).RefreshIC(); - } - } - } + private void ActivateConnection() + { + if (pnlDock.ActiveDocument is UI.Window.Connection) + { + UI.Window.Connection cW = pnlDock.ActiveDocument; + if (cW.TabController.SelectedTab != null) + { + Crownwood.Magic.Controls.TabPage tab = cW.TabController.SelectedTab; + Connection.InterfaceControl ifc = tab.Tag as Connection.InterfaceControl; + ifc.Protocol.Focus(); + (ifc.FindForm() as UI.Window.Connection).RefreshIC(); + } + } + } - public void pnlDock_ActiveDocumentChanged(object sender, EventArgs e) - { - ActivateConnection(); - UI.Window.Connection connectionWindow = pnlDock.ActiveDocument as UI.Window.Connection; - if (connectionWindow != null) - { - connectionWindow.UpdateSelectedConnection(); - } - } + public void pnlDock_ActiveDocumentChanged(object sender, EventArgs e) + { + ActivateConnection(); + UI.Window.Connection connectionWindow = pnlDock.ActiveDocument as UI.Window.Connection; + if (connectionWindow != null) + { + connectionWindow.UpdateSelectedConnection(); + } + } - private void UpdateWindowTitle() - { - if (InvokeRequired) - { - Invoke(new MethodInvoker(UpdateWindowTitle)); - return ; - } + private void UpdateWindowTitle() + { + if (InvokeRequired) + { + Invoke(new MethodInvoker(UpdateWindowTitle)); + return ; + } - StringBuilder titleBuilder = new StringBuilder(System.Convert.ToInt32(Application.Info.ProductName)); - const string separator = " - "; + StringBuilder titleBuilder = new StringBuilder(System.Convert.ToInt32(Application.Info.ProductName)); + const string separator = " - "; - if (IsConnectionsFileLoaded) - { - if (UsingSqlServer) - { - titleBuilder.Append(separator); - titleBuilder.Append(Language.strSQLServer.TrimEnd(':')); - } - else - { - if (!string.IsNullOrEmpty(ConnectionsFileName)) - { - titleBuilder.Append(separator); - if (My.Settings.Default.ShowCompleteConsPathInTitle) - { - titleBuilder.Append(ConnectionsFileName); - } - else - { - titleBuilder.Append(Path.GetFileName(ConnectionsFileName)); - } - } - } - } + if (IsConnectionsFileLoaded) + { + if (UsingSqlServer) + { + titleBuilder.Append(separator); + titleBuilder.Append(Language.strSQLServer.TrimEnd(':')); + } + else + { + if (!string.IsNullOrEmpty(ConnectionsFileName)) + { + titleBuilder.Append(separator); + if (My.Settings.Default.ShowCompleteConsPathInTitle) + { + titleBuilder.Append(ConnectionsFileName); + } + else + { + titleBuilder.Append(Path.GetFileName(ConnectionsFileName)); + } + } + } + } - if (!(SelectedConnection == null || string.IsNullOrEmpty(SelectedConnection.Name))) - { - titleBuilder.Append(separator); - titleBuilder.Append(SelectedConnection.Name); - } + if (!(SelectedConnection == null || string.IsNullOrEmpty(SelectedConnection.Name))) + { + titleBuilder.Append(separator); + titleBuilder.Append(SelectedConnection.Name); + } - Text = titleBuilder.ToString(); - } + Text = titleBuilder.ToString(); + } - public void ShowHidePanelTabs(DockContent closingDocument = null) - { - DocumentStyle newDocumentStyle = pnlDock.DocumentStyle; + public void ShowHidePanelTabs(DockContent closingDocument = null) + { + DocumentStyle newDocumentStyle = pnlDock.DocumentStyle; - if (My.Settings.Default.AlwaysShowPanelTabs) - { - newDocumentStyle = DocumentStyle.DockingWindow; // Show the panel tabs - } - else - { - int nonConnectionPanelCount = 0; - foreach (DockContent document in pnlDock.Documents) - { - if ((closingDocument == null || document != closingDocument) && !(document is UI.Window.Connection)) - { - nonConnectionPanelCount++; - } - } + if (My.Settings.Default.AlwaysShowPanelTabs) + { + newDocumentStyle = DocumentStyle.DockingWindow; // Show the panel tabs + } + else + { + int nonConnectionPanelCount = 0; + foreach (DockContent document in pnlDock.Documents) + { + if ((closingDocument == null || document != closingDocument) && !(document is UI.Window.Connection)) + { + nonConnectionPanelCount++; + } + } - if (nonConnectionPanelCount == 0) - { - newDocumentStyle = DocumentStyle.DockingSdi; // Hide the panel tabs - } - else - { - newDocumentStyle = DocumentStyle.DockingWindow; // Show the panel tabs - } - } + if (nonConnectionPanelCount == 0) + { + newDocumentStyle = DocumentStyle.DockingSdi; // Hide the panel tabs + } + else + { + newDocumentStyle = DocumentStyle.DockingWindow; // Show the panel tabs + } + } - if (!(pnlDock.DocumentStyle == newDocumentStyle)) - { - pnlDock.DocumentStyle = newDocumentStyle; - pnlDock.Size = new Size(1, 1); - } - } + if (!(pnlDock.DocumentStyle == newDocumentStyle)) + { + pnlDock.DocumentStyle = newDocumentStyle; + pnlDock.Size = new Size(1, 1); + } + } - private void SelectTabRelative(int relativeIndex) - { - if (!(pnlDock.ActiveDocument is UI.Window.Connection)) - { - return ; - } + private void SelectTabRelative(int relativeIndex) + { + if (!(pnlDock.ActiveDocument is UI.Window.Connection)) + { + return ; + } - UI.Window.Connection connectionWindow = pnlDock.ActiveDocument; - Crownwood.Magic.Controls.TabControl tabController = connectionWindow.TabController; + UI.Window.Connection connectionWindow = pnlDock.ActiveDocument; + Crownwood.Magic.Controls.TabControl tabController = connectionWindow.TabController; - int newIndex = tabController.SelectedIndex + relativeIndex; - while (newIndex < 0 | newIndex >= tabController.TabPages.Count) - { - if (newIndex < 0) - { - newIndex = tabController.TabPages.Count + newIndex; - } - if (newIndex >= tabController.TabPages.Count) - { - newIndex = newIndex - tabController.TabPages.Count; - } - } + int newIndex = tabController.SelectedIndex + relativeIndex; + while (newIndex < 0 | newIndex >= tabController.TabPages.Count) + { + if (newIndex < 0) + { + newIndex = tabController.TabPages.Count + newIndex; + } + if (newIndex >= tabController.TabPages.Count) + { + newIndex = newIndex - tabController.TabPages.Count; + } + } - tabController.SelectedIndex = newIndex; - } -#endregion + tabController.SelectedIndex = newIndex; + } + #endregion + + #region Screen Stuff + private void DisplayChanged(object sender, System.EventArgs e) + { + ResetSysMenuItems(); + AddSysMenuItems(); + } -#region Screen Stuff - private void DisplayChanged(object sender, System.EventArgs e) - { - ResetSysMenuItems(); - AddSysMenuItems(); - } + private int[] SysMenSubItems = new int[51]; + private static void ResetSysMenuItems() + { + SystemMenu.Reset(); + } - private int[] SysMenSubItems = new int[51]; - private static void ResetSysMenuItems() - { - SystemMenu.Reset(); - } - - private void AddSysMenuItems() - { - SystemMenu = new Tools.SystemMenu(this.Handle); - IntPtr popMen = SystemMenu.CreatePopupMenuItem(); + private void AddSysMenuItems() + { + SystemMenu = new Tools.SystemMenu(this.Handle); + IntPtr popMen = SystemMenu.CreatePopupMenuItem(); - for (int i = 0; i <= Screen.AllScreens.Length - 1; i++) - { - SysMenSubItems[i] = 200 + i; - SystemMenu.AppendMenuItem(popMen, Tools.SystemMenu.Flags.MF_STRING, SysMenSubItems[i], My.Language.strScreen + " " + System.Convert.ToString(i + 1)); - } + for (int i = 0; i <= Screen.AllScreens.Length - 1; i++) + { + SysMenSubItems[i] = 200 + i; + SystemMenu.AppendMenuItem(popMen, Tools.SystemMenu.Flags.MF_STRING, SysMenSubItems[i], My.Language.strScreen + " " + System.Convert.ToString(i + 1)); + } - SystemMenu.InsertMenuItem(SystemMenu.SystemMenuHandle, 0, Tools.SystemMenu.Flags.MF_POPUP | Tools.SystemMenu.Flags.MF_BYPOSITION, popMen, My.Language.strSendTo); - SystemMenu.InsertMenuItem(SystemMenu.SystemMenuHandle, 1, Tools.SystemMenu.Flags.MF_BYPOSITION | Tools.SystemMenu.Flags.MF_SEPARATOR, IntPtr.Zero, null); - } -#endregion - } + SystemMenu.InsertMenuItem(SystemMenu.SystemMenuHandle, 0, Tools.SystemMenu.Flags.MF_POPUP | Tools.SystemMenu.Flags.MF_BYPOSITION, popMen, My.Language.strSendTo); + SystemMenu.InsertMenuItem(SystemMenu.SystemMenuHandle, 1, Tools.SystemMenu.Flags.MF_BYPOSITION | Tools.SystemMenu.Flags.MF_SEPARATOR, IntPtr.Zero, null); + } + #endregion + } } \ No newline at end of file diff --git a/mRemoteV1/CS/Tools/Tools.WindowPlacement.cs b/mRemoteV1/CS/Tools/Tools.WindowPlacement.cs index 6ae008127..98e483abb 100644 --- a/mRemoteV1/CS/Tools/Tools.WindowPlacement.cs +++ b/mRemoteV1/CS/Tools/Tools.WindowPlacement.cs @@ -1,4 +1,3 @@ -// VBConversions Note: VB project level imports using System.Collections.Generic; using System; using AxWFICALib; @@ -9,153 +8,151 @@ using AxMSTSCLib; using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; -// End of VB project level imports - using System.Runtime.InteropServices; 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 { -#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 Windows.Forms.Form _form; -#endregion - -#region Constructors/Destructors - public WindowPlacement(Windows.Forms.Form form) - { - _form = form; - } -#endregion - -#region Public Properties -public Windows.Forms.Form Form - { - get - { - return _form; - } - set - { - _form = value; - } - } - -public bool RestoreToMaximized - { - get - { - WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); - return windowPlacement.flags & WPF_RESTORETOMAXIMIZED; - } - set - { - WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); - if (value) - { - windowPlacement.flags = windowPlacement.flags | WPF_RESTORETOMAXIMIZED; - } - else - { - windowPlacement.flags = windowPlacement.flags & ~WPF_RESTORETOMAXIMIZED; - } - SetWindowPlacement(windowPlacement); - } - } -#endregion - -#region Private Functions - private WINDOWPLACEMENT GetWindowPlacement() - { - if (_form == null) - { - throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); - } - WINDOWPLACEMENT windowPlacement = new WINDOWPLACEMENT(); - windowPlacement.length = Marshal.SizeOf(windowPlacement); - try - { - GetWindowPlacement(_form.Handle, ref windowPlacement); - return windowPlacement; - } - catch (Exception) - { - throw; - } - } - - private bool SetWindowPlacement(WINDOWPLACEMENT windowPlacement) - { - if (_form == null) - { - throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); - } - windowPlacement.length = Marshal.SizeOf(windowPlacement); - try - { - return SetWindowPlacement(_form.Handle, ref windowPlacement); - } - catch (Exception) - { - throw; - } - } -#endregion + 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 + { + get + { + return _form; + } + set + { + _form = value; + } + } + + public bool RestoreToMaximized + { + get + { + WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); + return windowPlacement.flags & WPF_RESTORETOMAXIMIZED; + } + set + { + WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); + if (value) + { + windowPlacement.flags = windowPlacement.flags | WPF_RESTORETOMAXIMIZED; + } + else + { + windowPlacement.flags = windowPlacement.flags & ~WPF_RESTORETOMAXIMIZED; + } + SetWindowPlacement(windowPlacement); + } + } + #endregion + + #region Private Functions + private WINDOWPLACEMENT GetWindowPlacement() + { + if (_form == null) + { + throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); + } + WINDOWPLACEMENT windowPlacement = new WINDOWPLACEMENT(); + windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); + try + { + GetWindowPlacement(_form.Handle, ref windowPlacement); + return windowPlacement; + } + catch (Exception) + { + throw; + } + } + + private bool SetWindowPlacement(WINDOWPLACEMENT windowPlacement) + { + if (_form == null) + { + throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); + } + windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); + try + { + return SetWindowPlacement(_form.Handle, ref windowPlacement); + } + catch (Exception) + { + throw; + } + } + #endregion + } } diff --git a/mRemoteV1/CS/mRemoteV1.csproj b/mRemoteV1/CS/mRemoteV1.csproj index 3c878e6c2..260697ad0 100644 --- a/mRemoteV1/CS/mRemoteV1.csproj +++ b/mRemoteV1/CS/mRemoteV1.csproj @@ -93,7 +93,6 @@ - False References\ADTree.dll @@ -281,9 +280,7 @@ Connection.InterfaceControl.cs - - Component - + @@ -372,15 +369,21 @@ - + + Form + UI.Window.ActiveDirectoryImport.cs - + + Form + UI.Window.Announcement.cs - + + Form + Form @@ -390,7 +393,9 @@ Form - + + Form + Form @@ -1159,7 +1164,12 @@ False - + + + {0f615504-5f30-4cf2-8341-1de7fec95a23} + SharedLibraryNG + + diff --git a/mRemoteV1/CS/mRemoteV1.sln b/mRemoteV1/CS/mRemoteV1.sln index b235ef9bf..c0dfb8922 100644 --- a/mRemoteV1/CS/mRemoteV1.sln +++ b/mRemoteV1/CS/mRemoteV1.sln @@ -1,9 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.40629.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}" + ProjectSection(ProjectDependencies) = postProject + {0F615504-5F30-4CF2-8341-1DE7FEC95A23} = {0F615504-5F30-4CF2-8341-1DE7FEC95A23} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLibraryNG", "..\..\SharedLibraryNG\SharedLibraryNG.csproj", "{0F615504-5F30-4CF2-8341-1DE7FEC95A23}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -21,6 +26,14 @@ Global {4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|Any CPU.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 + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.Build.0 = Release|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/mRemoteV1/CS/mRemoteV1.v12.suo b/mRemoteV1/CS/mRemoteV1.v12.suo index 5cc193cee..f3b968181 100644 Binary files a/mRemoteV1/CS/mRemoteV1.v12.suo and b/mRemoteV1/CS/mRemoteV1.v12.suo differ diff --git a/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache b/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache index fcb6da7c7..09b2717e1 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache and b/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache differ diff --git a/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache b/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache index 4755e215e..cf1588193 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache and b/mRemoteV1/CS/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/mRemoteV1/CS/obj/Debug Portable/Interop.WFICALib.dll b/mRemoteV1/CS/obj/Debug Portable/Interop.WFICALib.dll index c48c38332..876f40d41 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/Interop.WFICALib.dll and b/mRemoteV1/CS/obj/Debug Portable/Interop.WFICALib.dll differ diff --git a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.FileListAbsolute.txt b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.FileListAbsolute.txt index d144612c0..8b14914a9 100644 --- a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.FileListAbsolute.txt +++ b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.FileListAbsolute.txt @@ -73,3 +73,63 @@ C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Tree.resources C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.UltraVNCSC.resources C:\Users\vsparda\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Update.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\bin\Debug Portable\mRemoteNG.exe.config +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\Interop.EOLWTSCOM.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\Interop.MSTSCLib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\Interop.SHDocVw.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\Interop.WFICALib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\AxInterop.MSTSCLib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\AxInterop.WFICALib.dll +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteV1.csproj.ResolveComReference.cache +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteV1.csprojResolveAssemblyReference.cache +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.frmChoosePanel.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.frmMain.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.PasswordForm.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.AdvancedPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.AppearancePage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.ConnectionsPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsForm.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.KeyboardPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.SqlServerPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.StartupExitPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.TabsPanelsPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.ThemePage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.OptionsPages.UpdatesPage.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Properties.Resources.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.ReconnectGroup.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.About.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.ActiveDirectoryImport.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Announcement.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.ComponentsCheck.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Config.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Connection.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.ErrorsAndInfos.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.ExternalTools.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Help.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.PortScan.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Forms.ExportForm.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.ScreenshotManager.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Sessions.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.SSHTransfer.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Tree.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.UltraVNCSC.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.UI.Window.Update.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.de.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.el.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.en-US.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.es-AR.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.es.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.hu.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.it.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.nb-NO.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.nl.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.pt-BR.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.pt.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.fr.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.pl.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.ru.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.uk.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.zh-CN.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteNG.Language.Language.zh-TW.resources +C:\Users\David\Documents\Repositories\mRemoteNG_MyFork\mRemoteV1\CS\obj\Debug Portable\mRemoteV1.csproj.GenerateResource.Cache diff --git a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.GenerateResource.Cache b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.GenerateResource.Cache index 7396922fe..21a6e438e 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.GenerateResource.Cache and b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.GenerateResource.Cache differ diff --git a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.ResolveComReference.cache b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.ResolveComReference.cache index f02aa7572..1da81edaa 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.ResolveComReference.cache and b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csproj.ResolveComReference.cache differ diff --git a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csprojResolveAssemblyReference.cache b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csprojResolveAssemblyReference.cache index e5edf2996..5575c61bf 100644 Binary files a/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csprojResolveAssemblyReference.cache and b/mRemoteV1/CS/obj/Debug Portable/mRemoteV1.csprojResolveAssemblyReference.cache differ diff --git a/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache b/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache index fb24725dc..1ce41ddac 100644 Binary files a/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache and b/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferences.cache differ diff --git a/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache b/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache index 47aa13a08..d12272501 100644 Binary files a/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache and b/mRemoteV1/obj/Debug Portable/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/mRemoteV1/obj/Debug Portable/Interop.WFICALib.dll b/mRemoteV1/obj/Debug Portable/Interop.WFICALib.dll index f0b43e0df..b0b26acfe 100644 Binary files a/mRemoteV1/obj/Debug Portable/Interop.WFICALib.dll and b/mRemoteV1/obj/Debug Portable/Interop.WFICALib.dll differ diff --git a/mRemoteV1/obj/Debug Portable/mRemoteV1.vbproj.ResolveComReference.cache b/mRemoteV1/obj/Debug Portable/mRemoteV1.vbproj.ResolveComReference.cache index f02aa7572..1da81edaa 100644 Binary files a/mRemoteV1/obj/Debug Portable/mRemoteV1.vbproj.ResolveComReference.cache and b/mRemoteV1/obj/Debug Portable/mRemoteV1.vbproj.ResolveComReference.cache differ