From d511976ba652d11d1f5b813db86e96e234951ebb Mon Sep 17 00:00:00 2001 From: Faryan Rezagholi Date: Mon, 25 May 2020 20:51:57 +0200 Subject: [PATCH] converted components check page into options page --- mRemoteV1/App/Windows.cs | 8 - mRemoteV1/Properties/Settings.Designer.cs | 14 +- mRemoteV1/Properties/Settings.settings | 3 - .../Resources/Language/Language.Designer.cs | 79 +- mRemoteV1/Resources/Language/Language.resx | 5 +- .../OptionsPages/ComponentsPage.Designer.cs | 399 ++++++++++ .../UI/Forms/OptionsPages/ComponentsPage.cs | 237 ++++++ .../OptionsPages/ComponentsPage.resx} | 0 .../UI/Forms/OptionsPages/StartupExitPage.cs | 2 - mRemoteV1/UI/Forms/frmMain.cs | 2 - mRemoteV1/UI/Forms/frmOptions.Designer.cs | 2 +- mRemoteV1/UI/Forms/frmOptions.cs | 6 +- mRemoteV1/UI/Menu/ToolsMenu.cs | 17 - mRemoteV1/UI/Window/ComponentsCheckWindow.cs | 724 ------------------ mRemoteV1/UI/WindowType.cs | 3 +- mRemoteV1/mRemoteV1.csproj | 11 +- 16 files changed, 669 insertions(+), 843 deletions(-) create mode 100644 mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.Designer.cs create mode 100644 mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.cs rename mRemoteV1/UI/{Window/ComponentsCheckWindow.resx => Forms/OptionsPages/ComponentsPage.resx} (100%) delete mode 100644 mRemoteV1/UI/Window/ComponentsCheckWindow.cs diff --git a/mRemoteV1/App/Windows.cs b/mRemoteV1/App/Windows.cs index d4ec8c9a..d9a4ba78 100644 --- a/mRemoteV1/App/Windows.cs +++ b/mRemoteV1/App/Windows.cs @@ -15,7 +15,6 @@ namespace mRemoteNG.App private static PortScanWindow _portscanForm; private static ScreenshotManagerWindow _screenshotmanagerForm; private static UltraVNCWindow _ultravncscForm; - private static ComponentsCheckWindow _componentscheckForm; private static ConnectionTreeWindow _treeForm; internal static ConnectionTreeWindow TreeForm @@ -89,13 +88,6 @@ namespace mRemoteNG.App _ultravncscForm = new UltraVNCWindow(); _ultravncscForm.Show(dockPanel); break; - case WindowType.ComponentsCheck: - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, - "Showing ComponentsCheck window", true); - if (_componentscheckForm == null || _componentscheckForm.IsDisposed) - _componentscheckForm = new ComponentsCheckWindow(); - _componentscheckForm.Show(dockPanel); - break; } } catch (Exception ex) diff --git a/mRemoteV1/Properties/Settings.Designer.cs b/mRemoteV1/Properties/Settings.Designer.cs index 86ccdeb3..d060e2a8 100644 --- a/mRemoteV1/Properties/Settings.Designer.cs +++ b/mRemoteV1/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace mRemoteNG { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -1535,18 +1535,6 @@ namespace mRemoteNG { } } - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - public bool StartupComponentsCheck { - get { - return ((bool)(this["StartupComponentsCheck"])); - } - set { - this["StartupComponentsCheck"] = value; - } - } - [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Configuration.DefaultSettingValueAttribute("")] diff --git a/mRemoteV1/Properties/Settings.settings b/mRemoteV1/Properties/Settings.settings index 13e7bba1..b81bb62b 100644 --- a/mRemoteV1/Properties/Settings.settings +++ b/mRemoteV1/Properties/Settings.settings @@ -380,9 +380,6 @@ 5500 - - False - diff --git a/mRemoteV1/Resources/Language/Language.Designer.cs b/mRemoteV1/Resources/Language/Language.Designer.cs index 71330447..113c428f 100644 --- a/mRemoteV1/Resources/Language/Language.Designer.cs +++ b/mRemoteV1/Resources/Language/Language.Designer.cs @@ -126,14 +126,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to Connection failed!. /// - internal static string ConnectionFailed - { - get - { + internal static string ConnectionFailed { + get { return ResourceManager.GetString("ConnectionFailed", resourceCulture); } } - + /// /// Looks up a localized string similar to The connection file could not be found.. /// @@ -997,9 +995,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ - ///If you have the XenDesktop Online Plugin installed and the check still fails, try to register wfica.ocx manually. - ///To do this open up the run dialog (Start - Run) and enter the following: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (Where c:\Program Files\Citrix\ICA Client\ is the path to your XenDesktop Online Plugin install [rest of string was truncated]";. + /// Looks up a localized string similar to ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/. /// internal static string strCcICAFailed { get { @@ -1259,14 +1255,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to Close to notification area. /// - internal static string strCloseToSysTray - { - get - { + internal static string strCloseToSysTray { + get { return ResourceManager.GetString("strCloseToSysTray", resourceCulture); } } - + /// /// Looks up a localized string similar to Collapse all folders. /// @@ -1619,15 +1613,6 @@ namespace mRemoteNG { } } - /// - /// Looks up a localized string similar to Connection failed!. - /// - internal static string strConnectionEventConnectionFailed { - get { - return ResourceManager.GetString("strConnectionEventConnectionFailed", resourceCulture); - } - } - /// /// Looks up a localized string similar to A connection protocol error occurred. Host: "{1}"; Error code: "{2}"; Error Description: "{0}". /// @@ -2897,15 +2882,6 @@ namespace mRemoteNG { } } - /// - /// Looks up a localized string similar to Connection failed!. - /// - internal static string strIntAppConnectionFailed { - get { - return ResourceManager.GetString("strIntAppConnectionFailed", resourceCulture); - } - } - /// /// Looks up a localized string similar to Dispose of Int App process failed!. /// @@ -4692,14 +4668,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to PowerShell. /// - internal static string strPowerShell - { - get - { + internal static string strPowerShell { + get { return ResourceManager.GetString("strPowerShell", resourceCulture); } } - + /// /// Looks up a localized string similar to (These properties will only be saved if you select mRemote/mRemoteNG XML as output file format!). /// @@ -5009,14 +4983,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to Specifies the password of the Remote Desktop Gateway server.. /// - internal static string strPropertyDescriptionRDGatewayPassword - { - get - { + internal static string strPropertyDescriptionRDGatewayPassword { + get { return ResourceManager.GetString("strPropertyDescriptionRDGatewayPassword", resourceCulture); } } - + /// /// Looks up a localized string similar to Specifies when to use a Remote Desktop Gateway (RD Gateway) server.. /// @@ -5110,14 +5082,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to Select whether microphones should be shared.. /// - internal static string strPropertyDescriptionRedirectMicrophones - { - get - { + internal static string strPropertyDescriptionRedirectMicrophones { + get { return ResourceManager.GetString("strPropertyDescriptionRedirectMicrophones", resourceCulture); } } - + /// /// Looks up a localized string similar to Select whether local ports (ie. com, parallel) should be shown on the remote host.. /// @@ -5965,15 +5935,6 @@ namespace mRemoteNG { } } - /// - /// Looks up a localized string similar to Connection failed!. - /// - internal static string strPuttyConnectionFailed { - get { - return ResourceManager.GetString("strPuttyConnectionFailed", resourceCulture); - } - } - /// /// Looks up a localized string similar to Dispose of Putty process failed!. /// @@ -8194,14 +8155,12 @@ namespace mRemoteNG { /// /// Looks up a localized string similar to Windows. /// - internal static string strWindows - { - get - { + internal static string strWindows { + get { return ResourceManager.GetString("strWindows", resourceCulture); } } - + /// /// Looks up a localized string similar to Working directory. /// diff --git a/mRemoteV1/Resources/Language/Language.resx b/mRemoteV1/Resources/Language/Language.resx index d24399d1..7ee136e5 100644 --- a/mRemoteV1/Resources/Language/Language.resx +++ b/mRemoteV1/Resources/Language/Language.resx @@ -305,10 +305,7 @@ If you are still not able to pass this check or use the Gecko Engine in mRemoteN GeckoFx was found and seems to be installed properly. - ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ -If you have the XenDesktop Online Plugin installed and the check still fails, try to register wfica.ocx manually. -To do this open up the run dialog (Start - Run) and enter the following: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (Where c:\Program Files\Citrix\ICA Client\ is the path to your XenDesktop Online Plugin installation). -If you are still not able to pass this check or use ICA in mRemoteNG please consult the at {0}. + ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ All ICA components were found and seem to be registered properly. diff --git a/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.Designer.cs b/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.Designer.cs new file mode 100644 index 00000000..627db247 --- /dev/null +++ b/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.Designer.cs @@ -0,0 +1,399 @@ + + +namespace mRemoteNG.UI.Forms.OptionsPages +{ + + public sealed partial class ComponentsPage : OptionsPage + { + + //UserControl overrides dispose to clean up the component list. + [System.Diagnostics.DebuggerNonUserCode()] + protected override void Dispose(bool disposing) + { + try + { + if (disposing && components != null) + { + components.Dispose(); + } + } + finally + { + base.Dispose(disposing); + } + } + + //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() + { + this.pnlCheck1 = new System.Windows.Forms.Panel(); + this.txtCheck1 = new mRemoteNG.UI.Controls.Base.NGTextBox(); + this.lblCheck1 = new mRemoteNG.UI.Controls.Base.NGLabel(); + this.pbCheck1 = new System.Windows.Forms.PictureBox(); + this.pnlCheck2 = new System.Windows.Forms.Panel(); + this.txtCheck2 = new mRemoteNG.UI.Controls.Base.NGTextBox(); + this.lblCheck2 = new mRemoteNG.UI.Controls.Base.NGLabel(); + this.pbCheck2 = new System.Windows.Forms.PictureBox(); + this.pnlCheck3 = new System.Windows.Forms.Panel(); + this.txtCheck3 = new mRemoteNG.UI.Controls.Base.NGTextBox(); + this.lblCheck3 = new mRemoteNG.UI.Controls.Base.NGLabel(); + this.pbCheck3 = new System.Windows.Forms.PictureBox(); + this.pnlCheck4 = new System.Windows.Forms.Panel(); + this.txtCheck4 = new mRemoteNG.UI.Controls.Base.NGTextBox(); + this.lblCheck4 = new mRemoteNG.UI.Controls.Base.NGLabel(); + this.pbCheck4 = new System.Windows.Forms.PictureBox(); + this.pnlCheck5 = new System.Windows.Forms.Panel(); + this.txtCheck5 = new mRemoteNG.UI.Controls.Base.NGTextBox(); + this.lblCheck5 = new mRemoteNG.UI.Controls.Base.NGLabel(); + this.pbCheck5 = new System.Windows.Forms.PictureBox(); + this.btnCheckAgain = new mRemoteNG.UI.Controls.Base.NGButton(); + this.tblCheck = new System.Windows.Forms.TableLayoutPanel(); + this.pnlCheck1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck1)).BeginInit(); + this.pnlCheck2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck2)).BeginInit(); + this.pnlCheck3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck3)).BeginInit(); + this.pnlCheck4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck4)).BeginInit(); + this.pnlCheck5.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck5)).BeginInit(); + this.tblCheck.SuspendLayout(); + this.SuspendLayout(); + // + // pnlCheck1 + // + this.pnlCheck1.Controls.Add(this.txtCheck1); + this.pnlCheck1.Controls.Add(this.lblCheck1); + this.pnlCheck1.Controls.Add(this.pbCheck1); + this.pnlCheck1.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlCheck1.Location = new System.Drawing.Point(3, 3); + this.pnlCheck1.Name = "pnlCheck1"; + this.pnlCheck1.Size = new System.Drawing.Size(604, 84); + this.pnlCheck1.TabIndex = 10; + this.pnlCheck1.Visible = false; + // + // txtCheck1 + // + this.txtCheck1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCheck1.BackColor = System.Drawing.SystemColors.Control; + this.txtCheck1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtCheck1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCheck1.Location = new System.Drawing.Point(35, 25); + this.txtCheck1.Multiline = true; + this.txtCheck1.Name = "txtCheck1"; + this.txtCheck1.ReadOnly = true; + this.txtCheck1.Size = new System.Drawing.Size(566, 55); + this.txtCheck1.TabIndex = 2; + // + // lblCheck1 + // + this.lblCheck1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblCheck1.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCheck1.ForeColor = System.Drawing.SystemColors.ControlText; + this.lblCheck1.Location = new System.Drawing.Point(32, -1); + this.lblCheck1.Name = "lblCheck1"; + this.lblCheck1.Size = new System.Drawing.Size(493, 23); + this.lblCheck1.TabIndex = 1; + this.lblCheck1.Text = "RDP check succeeded!"; + // + // pbCheck1 + // + this.pbCheck1.Location = new System.Drawing.Point(0, 0); + this.pbCheck1.Name = "pbCheck1"; + this.pbCheck1.Size = new System.Drawing.Size(30, 30); + this.pbCheck1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbCheck1.TabIndex = 0; + this.pbCheck1.TabStop = false; + // + // pnlCheck2 + // + this.pnlCheck2.Controls.Add(this.txtCheck2); + this.pnlCheck2.Controls.Add(this.lblCheck2); + this.pnlCheck2.Controls.Add(this.pbCheck2); + this.pnlCheck2.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlCheck2.Location = new System.Drawing.Point(3, 93); + this.pnlCheck2.Name = "pnlCheck2"; + this.pnlCheck2.Size = new System.Drawing.Size(604, 84); + this.pnlCheck2.TabIndex = 20; + this.pnlCheck2.Visible = false; + // + // txtCheck2 + // + this.txtCheck2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCheck2.BackColor = System.Drawing.SystemColors.Control; + this.txtCheck2.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtCheck2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCheck2.Location = new System.Drawing.Point(35, 25); + this.txtCheck2.Multiline = true; + this.txtCheck2.Name = "txtCheck2"; + this.txtCheck2.ReadOnly = true; + this.txtCheck2.Size = new System.Drawing.Size(566, 55); + this.txtCheck2.TabIndex = 2; + // + // lblCheck2 + // + this.lblCheck2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblCheck2.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCheck2.Location = new System.Drawing.Point(32, -1); + this.lblCheck2.Name = "lblCheck2"; + this.lblCheck2.Size = new System.Drawing.Size(489, 23); + this.lblCheck2.TabIndex = 1; + this.lblCheck2.Text = "RDP check succeeded!"; + // + // pbCheck2 + // + this.pbCheck2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pbCheck2.Location = new System.Drawing.Point(0, -1); + this.pbCheck2.Name = "pbCheck2"; + this.pbCheck2.Size = new System.Drawing.Size(30, 31); + this.pbCheck2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbCheck2.TabIndex = 0; + this.pbCheck2.TabStop = false; + // + // pnlCheck3 + // + this.pnlCheck3.Controls.Add(this.txtCheck3); + this.pnlCheck3.Controls.Add(this.lblCheck3); + this.pnlCheck3.Controls.Add(this.pbCheck3); + this.pnlCheck3.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlCheck3.Location = new System.Drawing.Point(3, 183); + this.pnlCheck3.Name = "pnlCheck3"; + this.pnlCheck3.Size = new System.Drawing.Size(604, 84); + this.pnlCheck3.TabIndex = 30; + this.pnlCheck3.Visible = false; + // + // txtCheck3 + // + this.txtCheck3.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCheck3.BackColor = System.Drawing.SystemColors.Control; + this.txtCheck3.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtCheck3.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCheck3.Location = new System.Drawing.Point(35, 25); + this.txtCheck3.Multiline = true; + this.txtCheck3.Name = "txtCheck3"; + this.txtCheck3.ReadOnly = true; + this.txtCheck3.Size = new System.Drawing.Size(566, 55); + this.txtCheck3.TabIndex = 2; + // + // lblCheck3 + // + this.lblCheck3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblCheck3.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCheck3.Location = new System.Drawing.Point(32, -1); + this.lblCheck3.Name = "lblCheck3"; + this.lblCheck3.Size = new System.Drawing.Size(489, 23); + this.lblCheck3.TabIndex = 1; + this.lblCheck3.Text = "RDP check succeeded!"; + // + // pbCheck3 + // + this.pbCheck3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pbCheck3.Location = new System.Drawing.Point(0, -1); + this.pbCheck3.Name = "pbCheck3"; + this.pbCheck3.Size = new System.Drawing.Size(30, 31); + this.pbCheck3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbCheck3.TabIndex = 0; + this.pbCheck3.TabStop = false; + // + // pnlCheck4 + // + this.pnlCheck4.Controls.Add(this.txtCheck4); + this.pnlCheck4.Controls.Add(this.lblCheck4); + this.pnlCheck4.Controls.Add(this.pbCheck4); + this.pnlCheck4.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlCheck4.Location = new System.Drawing.Point(3, 273); + this.pnlCheck4.Name = "pnlCheck4"; + this.pnlCheck4.Size = new System.Drawing.Size(604, 84); + this.pnlCheck4.TabIndex = 40; + this.pnlCheck4.Visible = false; + // + // txtCheck4 + // + this.txtCheck4.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCheck4.BackColor = System.Drawing.SystemColors.Control; + this.txtCheck4.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtCheck4.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCheck4.Location = new System.Drawing.Point(35, 25); + this.txtCheck4.Multiline = true; + this.txtCheck4.Name = "txtCheck4"; + this.txtCheck4.ReadOnly = true; + this.txtCheck4.Size = new System.Drawing.Size(566, 55); + this.txtCheck4.TabIndex = 2; + // + // lblCheck4 + // + this.lblCheck4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblCheck4.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCheck4.Location = new System.Drawing.Point(32, -1); + this.lblCheck4.Name = "lblCheck4"; + this.lblCheck4.Size = new System.Drawing.Size(489, 23); + this.lblCheck4.TabIndex = 1; + this.lblCheck4.Text = "RDP check succeeded!"; + // + // pbCheck4 + // + this.pbCheck4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pbCheck4.Location = new System.Drawing.Point(0, 0); + this.pbCheck4.Name = "pbCheck4"; + this.pbCheck4.Size = new System.Drawing.Size(30, 31); + this.pbCheck4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbCheck4.TabIndex = 0; + this.pbCheck4.TabStop = false; + // + // pnlCheck5 + // + this.pnlCheck5.Controls.Add(this.txtCheck5); + this.pnlCheck5.Controls.Add(this.lblCheck5); + this.pnlCheck5.Controls.Add(this.pbCheck5); + this.pnlCheck5.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlCheck5.Location = new System.Drawing.Point(3, 363); + this.pnlCheck5.Name = "pnlCheck5"; + this.pnlCheck5.Size = new System.Drawing.Size(604, 84); + this.pnlCheck5.TabIndex = 50; + this.pnlCheck5.Visible = false; + // + // txtCheck5 + // + this.txtCheck5.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtCheck5.BackColor = System.Drawing.SystemColors.Control; + this.txtCheck5.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtCheck5.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtCheck5.Location = new System.Drawing.Point(35, 25); + this.txtCheck5.Multiline = true; + this.txtCheck5.Name = "txtCheck5"; + this.txtCheck5.ReadOnly = true; + this.txtCheck5.Size = new System.Drawing.Size(566, 55); + this.txtCheck5.TabIndex = 2; + // + // lblCheck5 + // + this.lblCheck5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblCheck5.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCheck5.Location = new System.Drawing.Point(32, -1); + this.lblCheck5.Name = "lblCheck5"; + this.lblCheck5.Size = new System.Drawing.Size(489, 23); + this.lblCheck5.TabIndex = 1; + this.lblCheck5.Text = "RDP check succeeded!"; + // + // pbCheck5 + // + this.pbCheck5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pbCheck5.Location = new System.Drawing.Point(0, -1); + this.pbCheck5.Name = "pbCheck5"; + this.pbCheck5.Size = new System.Drawing.Size(30, 31); + this.pbCheck5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbCheck5.TabIndex = 0; + this.pbCheck5.TabStop = false; + // + // btnCheckAgain + // + this.btnCheckAgain._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.OUT; + this.btnCheckAgain.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnCheckAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnCheckAgain.Location = new System.Drawing.Point(503, 453); + this.btnCheckAgain.Name = "btnCheckAgain"; + this.btnCheckAgain.Size = new System.Drawing.Size(104, 23); + this.btnCheckAgain.TabIndex = 0; + this.btnCheckAgain.Text = "Check again"; + this.btnCheckAgain.UseVisualStyleBackColor = true; + this.btnCheckAgain.Click += new System.EventHandler(this.BtnCheckAgain_Click); + // + // tblCheck + // + this.tblCheck.ColumnCount = 1; + this.tblCheck.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.tblCheck.Controls.Add(this.pnlCheck5, 0, 4); + this.tblCheck.Controls.Add(this.pnlCheck2, 0, 1); + this.tblCheck.Controls.Add(this.pnlCheck3, 0, 2); + this.tblCheck.Controls.Add(this.pnlCheck4, 0, 3); + this.tblCheck.Controls.Add(this.pnlCheck1, 0, 0); + this.tblCheck.Controls.Add(this.btnCheckAgain, 0, 5); + this.tblCheck.Dock = System.Windows.Forms.DockStyle.Fill; + this.tblCheck.Location = new System.Drawing.Point(0, 0); + this.tblCheck.Name = "tblCheck"; + this.tblCheck.RowCount = 6; + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F)); + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F)); + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F)); + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F)); + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 90F)); + this.tblCheck.RowStyles.Add(new System.Windows.Forms.RowStyle()); + this.tblCheck.Size = new System.Drawing.Size(610, 490); + this.tblCheck.TabIndex = 51; + // + // ComponentsPage + // + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.Controls.Add(this.tblCheck); + this.Name = "ComponentsPage"; + this.Size = new System.Drawing.Size(610, 490); + this.pnlCheck1.ResumeLayout(false); + this.pnlCheck1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck1)).EndInit(); + this.pnlCheck2.ResumeLayout(false); + this.pnlCheck2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck2)).EndInit(); + this.pnlCheck3.ResumeLayout(false); + this.pnlCheck3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck3)).EndInit(); + this.pnlCheck4.ResumeLayout(false); + this.pnlCheck4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck4)).EndInit(); + this.pnlCheck5.ResumeLayout(false); + this.pnlCheck5.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbCheck5)).EndInit(); + this.tblCheck.ResumeLayout(false); + this.ResumeLayout(false); + + } + private System.Windows.Forms.PictureBox pbCheck1; + private Controls.Base.NGLabel lblCheck1; + private System.Windows.Forms.Panel pnlCheck2; + private Controls.Base.NGLabel lblCheck2; + private System.Windows.Forms.PictureBox pbCheck2; + private System.Windows.Forms.Panel pnlCheck3; + private Controls.Base.NGLabel lblCheck3; + private System.Windows.Forms.PictureBox pbCheck3; + private System.Windows.Forms.Panel pnlCheck4; + private Controls.Base.NGLabel lblCheck4; + private System.Windows.Forms.PictureBox pbCheck4; + private System.Windows.Forms.Panel pnlCheck5; + private Controls.Base.NGLabel lblCheck5; + private System.Windows.Forms.PictureBox pbCheck5; + private Controls.Base.NGButton btnCheckAgain; + private Controls.Base.NGTextBox txtCheck1; + private Controls.Base.NGTextBox txtCheck2; + private Controls.Base.NGTextBox txtCheck3; + private Controls.Base.NGTextBox txtCheck4; + private Controls.Base.NGTextBox txtCheck5; + private System.Windows.Forms.Panel pnlCheck1; + private System.Windows.Forms.TableLayoutPanel tblCheck; + } +} diff --git a/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.cs b/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.cs new file mode 100644 index 00000000..530fed5a --- /dev/null +++ b/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.cs @@ -0,0 +1,237 @@ +using System; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Threading; +using AxWFICALib; +using Gecko; +using mRemoteNG.App; +using mRemoteNG.App.Info; +using mRemoteNG.Connection.Protocol.RDP; +using mRemoteNG.Messages; +using mRemoteNG.Themes; + +namespace mRemoteNG.UI.Forms.OptionsPages +{ + public partial class ComponentsPage + { + public ComponentsPage() + { + ApplyTheme(); + PageIcon = Resources.ComponentsCheck_Icon; + InitializeComponent(); + CheckComponents(); + FontOverrider.FontOverride(this); + ThemeManager.getInstance().ThemeChanged += ApplyTheme; + } + + public override string PageName + { + get => Language.strComponentsCheck; + set { } + } + + #region Form Stuff + + public override void ApplyLanguage() + { + base.ApplyLanguage(); + + Text = Language.strComponentsCheck; + btnCheckAgain.Text = Language.strCcCheckAgain; + } + + private void BtnCheckAgain_Click(object sender, EventArgs e) + { + CheckComponents(); + } + + #endregion + + private void CheckComponents() + { + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Beginning component check", true); + CheckRdp(); + CheckVnc(); + CheckPutty(); + CheckIca(); + CheckGeckoBrowser(); + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Finished component check", true); + } + + private void CheckRdp() + { + pnlCheck1.Visible = true; + var rdpProtocolFactory = new RdpProtocolFactory(); + var supportedVersions = rdpProtocolFactory.GetSupportedVersions(); + + if (supportedVersions.Any()) + { + pbCheck1.Image = Resources.Good_Symbol; + lblCheck1.ForeColor = Color.DarkOliveGreen; + lblCheck1.Text = "RDP (Remote Desktop) " + Language.strCcCheckSucceeded; + txtCheck1.Text = string.Format(Language.strCcRDPOK, string.Join(", ", supportedVersions)); + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "RDP versions installed: "+ string.Join(",", supportedVersions), true); + } + else + { + pbCheck1.Image = Resources.Bad_Symbol; + lblCheck1.ForeColor = Color.Firebrick; + lblCheck1.Text = "RDP (Remote Desktop) " + Language.strCcCheckFailed; + txtCheck1.Text = string.Format(Language.strCcRDPFailed, GeneralAppInfo.UrlForum); + + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, + "RDP " + Language.strCcNotInstalledProperly, true); + } + } + + private void CheckVnc() + { + pnlCheck2.Visible = true; + + try + { + using (var vnc = new VncSharp.RemoteDesktop()) + { + vnc.CreateControl(); + + while (!vnc.Created) + { + Thread.Sleep(10); + System.Windows.Forms.Application.DoEvents(); + } + + pbCheck2.Image = Resources.Good_Symbol; + lblCheck2.ForeColor = Color.DarkOliveGreen; + lblCheck2.Text = "VNC (Virtual Network Computing) " + Language.strCcCheckSucceeded; + txtCheck2.Text = string.Format(Language.strCcVNCOK, vnc.ProductVersion); + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "VNC installed", true); + } + } + catch (Exception) + { + pbCheck2.Image = Resources.Bad_Symbol; + lblCheck2.ForeColor = Color.Firebrick; + lblCheck2.Text = "VNC (Virtual Network Computing) " + Language.strCcCheckFailed; + txtCheck2.Text = string.Format(Language.strCcVNCFailed, GeneralAppInfo.UrlForum); + + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, + "VNC " + Language.strCcNotInstalledProperly, true); + } + } + + private void CheckPutty() + { + pnlCheck3.Visible = true; + string pPath; + if (Settings.Default.UseCustomPuttyPath == false) + { + pPath = GeneralAppInfo.HomePath + "\\PuTTYNG.exe"; + } + else + { + pPath = Settings.Default.CustomPuttyPath; + } + + if (File.Exists(pPath)) + { + var versionInfo = FileVersionInfo.GetVersionInfo(pPath); + + pbCheck3.Image = Resources.Good_Symbol; + lblCheck3.ForeColor = Color.DarkOliveGreen; + lblCheck3.Text = "PuTTY (SSH/Telnet/Rlogin/RAW) " + Language.strCcCheckSucceeded; + txtCheck3.Text = + $"{Language.strCcPuttyOK}{Environment.NewLine}Version: {versionInfo.ProductName} Release: {versionInfo.FileVersion}"; + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "PuTTY installed", true); + } + else + { + pbCheck3.Image = Resources.Bad_Symbol; + lblCheck3.ForeColor = Color.Firebrick; + lblCheck3.Text = "PuTTY (SSH/Telnet/Rlogin/RAW) " + Language.strCcCheckFailed; + txtCheck3.Text = Language.strCcPuttyFailed; + + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, + "PuTTY " + Language.strCcNotInstalledProperly, true); + Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "File " + pPath + " does not exist.", + true); + } + } + + private void CheckIca() + { + pnlCheck4.Visible = true; + + try + { + using (var ica = new AxICAClient()) + { + ica.Parent = this; + + pbCheck4.Image = Resources.Good_Symbol; + lblCheck4.ForeColor = Color.DarkOliveGreen; + lblCheck4.Text = @"ICA (Citrix ICA) " + Language.strCcCheckSucceeded; + txtCheck4.Text = string.Format(Language.strCcICAOK, ica.Version); + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "ICA installed", true); + } + } + catch (Exception ex) + { + pbCheck4.Image = Resources.Bad_Symbol; + lblCheck4.ForeColor = Color.Firebrick; + lblCheck4.Text = @"ICA (Citrix ICA) " + Language.strCcCheckFailed; + txtCheck4.Text = string.Format(Language.strCcICAFailed, GeneralAppInfo.UrlForum); + + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, + "ICA " + Language.strCcNotInstalledProperly, true); + Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, ex.Message, true); + } + } + + private void CheckGeckoBrowser() + { + pnlCheck5.Visible = true; + var geckoBad = false; + var geckoFxPath = Path.Combine(GeneralAppInfo.HomePath, "Firefox"); + + if (File.Exists(Path.Combine(GeneralAppInfo.HomePath, "Geckofx-Core.dll"))) + { + if (Directory.Exists(geckoFxPath)) + { + if (!File.Exists(Path.Combine(geckoFxPath, "xul.dll"))) + { + geckoBad = true; + } + } + else + { + geckoBad = true; + } + } + + if (geckoBad == false) + { + pbCheck5.Image = Resources.Good_Symbol; + lblCheck5.ForeColor = Color.DarkOliveGreen; + lblCheck5.Text = @"Gecko (Firefox) Rendering Engine (HTTP/S) " + Language.strCcCheckSucceeded; + if (!Xpcom.IsInitialized) + Xpcom.Initialize("Firefox"); + txtCheck5.Text = Language.strCcGeckoOK + " Version: " + Xpcom.XulRunnerVersion; + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Gecko Browser installed", true); + } + else + { + pbCheck5.Image = Resources.Bad_Symbol; + lblCheck5.ForeColor = Color.Firebrick; + lblCheck5.Text = @"Gecko (Firefox) Rendering Engine (HTTP/S) " + Language.strCcCheckFailed; + txtCheck5.Text = string.Format(Language.strCcGeckoFailed, GeneralAppInfo.UrlForum); + + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, + "Gecko " + Language.strCcNotInstalledProperly, true); + Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, + "GeckoFx was not found in " + geckoFxPath, true); + } + } + } +} \ No newline at end of file diff --git a/mRemoteV1/UI/Window/ComponentsCheckWindow.resx b/mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.resx similarity index 100% rename from mRemoteV1/UI/Window/ComponentsCheckWindow.resx rename to mRemoteV1/UI/Forms/OptionsPages/ComponentsPage.resx diff --git a/mRemoteV1/UI/Forms/OptionsPages/StartupExitPage.cs b/mRemoteV1/UI/Forms/OptionsPages/StartupExitPage.cs index 42dc5c74..956441cb 100644 --- a/mRemoteV1/UI/Forms/OptionsPages/StartupExitPage.cs +++ b/mRemoteV1/UI/Forms/OptionsPages/StartupExitPage.cs @@ -36,7 +36,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages Settings.Default.OpenConsFromLastSession = chkReconnectOnStart.Checked; Settings.Default.SingleInstance = chkSingleInstance.Checked; Settings.Default.StartMinimized = chkStartMinimized.Checked; - Settings.Default.StartupComponentsCheck = chkProperInstallationOfComponentsAtStartup.Checked; } private void StartupExitPage_Load(object sender, EventArgs e) @@ -45,7 +44,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages chkReconnectOnStart.Checked = Settings.Default.OpenConsFromLastSession; chkSingleInstance.Checked = Settings.Default.SingleInstance; chkStartMinimized.Checked = Settings.Default.StartMinimized; - chkProperInstallationOfComponentsAtStartup.Checked = Settings.Default.StartupComponentsCheck; } } } \ No newline at end of file diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index be81bb35..aa1b279a 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -177,8 +177,6 @@ namespace mRemoteNG.UI.Forms Windows.TreeForm.Focus(); PuttySessionsManager.Instance.StartWatcher(); - if (Settings.Default.StartupComponentsCheck) - Windows.Show(WindowType.ComponentsCheck); Startup.Instance.CreateConnectionsProvider(messageCollector); diff --git a/mRemoteV1/UI/Forms/frmOptions.Designer.cs b/mRemoteV1/UI/Forms/frmOptions.Designer.cs index be002a12..d602befa 100644 --- a/mRemoteV1/UI/Forms/frmOptions.Designer.cs +++ b/mRemoteV1/UI/Forms/frmOptions.Designer.cs @@ -169,7 +169,7 @@ this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "mRemoteNG Options"; - this.Load += new System.EventHandler(this.frmOptions_Load); + this.Load += new System.EventHandler(this.FrmOptions_Load); this.pnlBottom.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.lstOptionPages)).EndInit(); this.ResumeLayout(false); diff --git a/mRemoteV1/UI/Forms/frmOptions.cs b/mRemoteV1/UI/Forms/frmOptions.cs index 80db8f1e..3e408885 100644 --- a/mRemoteV1/UI/Forms/frmOptions.cs +++ b/mRemoteV1/UI/Forms/frmOptions.cs @@ -5,7 +5,6 @@ using System.Diagnostics; using System.Linq; using System.Windows.Forms; using mRemoteNG.Themes; -using mRemoteNG.Tools; namespace mRemoteNG.UI.Forms { @@ -28,7 +27,7 @@ namespace mRemoteNG.UI.Forms Cursor.Current = Cursors.Default; } - private void frmOptions_Load(object sender, EventArgs e) + private void FrmOptions_Load(object sender, EventArgs e) { CompileListOfOptionsPages(); FontOverrider.FontOverride(this); @@ -78,7 +77,8 @@ namespace mRemoteNG.UI.Forms {typeof(UpdatesPage).Name, new UpdatesPage {Dock = DockStyle.Fill}}, {typeof(ThemePage).Name, new ThemePage {Dock = DockStyle.Fill}}, {typeof(SecurityPage).Name, new SecurityPage {Dock = DockStyle.Fill}}, - {typeof(AdvancedPage).Name, new AdvancedPage {Dock = DockStyle.Fill}} + {typeof(AdvancedPage).Name, new AdvancedPage {Dock = DockStyle.Fill}}, + {typeof(ComponentsPage).Name, new ComponentsPage {Dock = DockStyle.Fill}}, }; } diff --git a/mRemoteV1/UI/Menu/ToolsMenu.cs b/mRemoteV1/UI/Menu/ToolsMenu.cs index e8ba4486..635dedee 100644 --- a/mRemoteV1/UI/Menu/ToolsMenu.cs +++ b/mRemoteV1/UI/Menu/ToolsMenu.cs @@ -13,7 +13,6 @@ namespace mRemoteNG.UI.Menu private ToolStripMenuItem _mMenToolsExternalApps; private ToolStripMenuItem _mMenToolsPortScan; private ToolStripMenuItem _mMenToolsUvncsc; - private ToolStripMenuItem _mMenToolsComponentsCheck; private ToolStripMenuItem _mMenViewScreenshotManager; public Form MainForm { get; set; } @@ -31,7 +30,6 @@ namespace mRemoteNG.UI.Menu _mMenToolsExternalApps = new ToolStripMenuItem(); _mMenToolsPortScan = new ToolStripMenuItem(); _mMenToolsSep1 = new ToolStripSeparator(); - _mMenToolsComponentsCheck = new ToolStripMenuItem(); _mMenToolsOptions = new ToolStripMenuItem(); _mMenViewScreenshotManager = new ToolStripMenuItem(); // @@ -45,7 +43,6 @@ namespace mRemoteNG.UI.Menu _mMenToolsPortScan, _mMenViewScreenshotManager, _mMenToolsSep1, - _mMenToolsComponentsCheck, _mMenToolsOptions }); Name = "mMenTools"; @@ -98,14 +95,6 @@ namespace mRemoteNG.UI.Menu _mMenToolsSep1.Name = "mMenToolsSep1"; _mMenToolsSep1.Size = new System.Drawing.Size(181, 6); // - // mMenToolsComponentsCheck - // - _mMenToolsComponentsCheck.Image = Resources.cog_error; - _mMenToolsComponentsCheck.Name = "mMenToolsComponentsCheck"; - _mMenToolsComponentsCheck.Size = new System.Drawing.Size(184, 22); - _mMenToolsComponentsCheck.Text = Language.strComponentsCheck; - _mMenToolsComponentsCheck.Click += mMenToolsComponentsCheck_Click; - // // mMenToolsOptions // _mMenToolsOptions.Image = Resources.Options; @@ -122,7 +111,6 @@ namespace mRemoteNG.UI.Menu _mMenToolsExternalApps.Text = Language.strMenuExternalTools; _mMenToolsPortScan.Text = Language.strMenuPortScan; _mMenViewScreenshotManager.Text = Language.strScreenshots; - _mMenToolsComponentsCheck.Text = Language.strComponentsCheck; _mMenToolsOptions.Text = Language.strMenuOptions; } @@ -153,11 +141,6 @@ namespace mRemoteNG.UI.Menu Windows.Show(WindowType.ScreenshotManager); } - private void mMenToolsComponentsCheck_Click(object sender, EventArgs e) - { - Windows.Show(WindowType.ComponentsCheck); - } - private void mMenToolsOptions_Click(object sender, EventArgs e) { Windows.Show(WindowType.Options); diff --git a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs b/mRemoteV1/UI/Window/ComponentsCheckWindow.cs deleted file mode 100644 index 211c0aa7..00000000 --- a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs +++ /dev/null @@ -1,724 +0,0 @@ -using System; -using System.Diagnostics; -using System.Drawing; -using System.IO; -using System.Linq; -using System.Threading; -using AxWFICALib; -using Gecko; -using mRemoteNG.App; -using mRemoteNG.App.Info; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Messages; -using mRemoteNG.Themes; -using WeifenLuo.WinFormsUI.Docking; - -namespace mRemoteNG.UI.Window -{ - public class ComponentsCheckWindow : BaseWindow - { - private readonly Image _successImage; - private readonly Image _failureImage; - - #region Form Stuff - - private System.Windows.Forms.PictureBox pbCheck1; - private Controls.Base.NGLabel lblCheck1; - private System.Windows.Forms.Panel pnlCheck2; - private Controls.Base.NGLabel lblCheck2; - private System.Windows.Forms.PictureBox pbCheck2; - private System.Windows.Forms.Panel pnlCheck3; - private Controls.Base.NGLabel lblCheck3; - private System.Windows.Forms.PictureBox pbCheck3; - private System.Windows.Forms.Panel pnlCheck4; - private Controls.Base.NGLabel lblCheck4; - private System.Windows.Forms.PictureBox pbCheck4; - private System.Windows.Forms.Panel pnlCheck5; - private Controls.Base.NGLabel lblCheck5; - private System.Windows.Forms.PictureBox pbCheck5; - private Controls.Base.NGButton btnCheckAgain; - private Controls.Base.NGTextBox txtCheck1; - private Controls.Base.NGTextBox txtCheck2; - private Controls.Base.NGTextBox txtCheck3; - private Controls.Base.NGTextBox txtCheck4; - private Controls.Base.NGTextBox txtCheck5; - private Controls.Base.NGCheckBox chkAlwaysShow; - private System.Windows.Forms.Panel pnlChecks; - private System.Windows.Forms.Panel pnlCheck1; - - private void InitializeComponent() - { - this.pnlCheck1 = new System.Windows.Forms.Panel(); - this.txtCheck1 = new mRemoteNG.UI.Controls.Base.NGTextBox(); - this.lblCheck1 = new mRemoteNG.UI.Controls.Base.NGLabel(); - this.pbCheck1 = new System.Windows.Forms.PictureBox(); - this.pnlCheck2 = new System.Windows.Forms.Panel(); - this.txtCheck2 = new mRemoteNG.UI.Controls.Base.NGTextBox(); - this.lblCheck2 = new mRemoteNG.UI.Controls.Base.NGLabel(); - this.pbCheck2 = new System.Windows.Forms.PictureBox(); - this.pnlCheck3 = new System.Windows.Forms.Panel(); - this.txtCheck3 = new mRemoteNG.UI.Controls.Base.NGTextBox(); - this.lblCheck3 = new mRemoteNG.UI.Controls.Base.NGLabel(); - this.pbCheck3 = new System.Windows.Forms.PictureBox(); - this.pnlCheck4 = new System.Windows.Forms.Panel(); - this.txtCheck4 = new mRemoteNG.UI.Controls.Base.NGTextBox(); - this.lblCheck4 = new mRemoteNG.UI.Controls.Base.NGLabel(); - this.pbCheck4 = new System.Windows.Forms.PictureBox(); - this.pnlCheck5 = new System.Windows.Forms.Panel(); - this.txtCheck5 = new mRemoteNG.UI.Controls.Base.NGTextBox(); - this.lblCheck5 = new mRemoteNG.UI.Controls.Base.NGLabel(); - this.pbCheck5 = new System.Windows.Forms.PictureBox(); - this.btnCheckAgain = new mRemoteNG.UI.Controls.Base.NGButton(); - this.chkAlwaysShow = new mRemoteNG.UI.Controls.Base.NGCheckBox(); - this.pnlChecks = new System.Windows.Forms.Panel(); - this.pnlCheck1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck1)).BeginInit(); - this.pnlCheck2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck2)).BeginInit(); - this.pnlCheck3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck3)).BeginInit(); - this.pnlCheck4.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck4)).BeginInit(); - this.pnlCheck5.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck5)).BeginInit(); - this.pnlChecks.SuspendLayout(); - this.SuspendLayout(); - // - // pnlCheck1 - // - this.pnlCheck1.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlCheck1.Controls.Add(this.txtCheck1); - this.pnlCheck1.Controls.Add(this.lblCheck1); - this.pnlCheck1.Controls.Add(this.pbCheck1); - this.pnlCheck1.Location = new System.Drawing.Point(3, 3); - this.pnlCheck1.Name = "pnlCheck1"; - this.pnlCheck1.Size = new System.Drawing.Size(562, 130); - this.pnlCheck1.TabIndex = 10; - this.pnlCheck1.Visible = false; - // - // txtCheck1 - // - this.txtCheck1.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCheck1.BackColor = System.Drawing.SystemColors.Control; - this.txtCheck1.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCheck1.Location = new System.Drawing.Point(129, 29); - this.txtCheck1.Multiline = true; - this.txtCheck1.Name = "txtCheck1"; - this.txtCheck1.ReadOnly = true; - this.txtCheck1.Size = new System.Drawing.Size(430, 97); - this.txtCheck1.TabIndex = 2; - // - // lblCheck1 - // - this.lblCheck1.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblCheck1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCheck1.ForeColor = System.Drawing.SystemColors.ControlText; - this.lblCheck1.Location = new System.Drawing.Point(108, 3); - this.lblCheck1.Name = "lblCheck1"; - this.lblCheck1.Size = new System.Drawing.Size(451, 23); - this.lblCheck1.TabIndex = 1; - this.lblCheck1.Text = "RDP check succeeded!"; - // - // pbCheck1 - // - this.pbCheck1.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pbCheck1.Location = new System.Drawing.Point(3, 3); - this.pbCheck1.Name = "pbCheck1"; - this.pbCheck1.Size = new System.Drawing.Size(72, 123); - this.pbCheck1.TabIndex = 0; - this.pbCheck1.TabStop = false; - // - // pnlCheck2 - // - this.pnlCheck2.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlCheck2.Controls.Add(this.txtCheck2); - this.pnlCheck2.Controls.Add(this.lblCheck2); - this.pnlCheck2.Controls.Add(this.pbCheck2); - this.pnlCheck2.Location = new System.Drawing.Point(3, 139); - this.pnlCheck2.Name = "pnlCheck2"; - this.pnlCheck2.Size = new System.Drawing.Size(562, 130); - this.pnlCheck2.TabIndex = 20; - this.pnlCheck2.Visible = false; - // - // txtCheck2 - // - this.txtCheck2.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCheck2.BackColor = System.Drawing.SystemColors.Control; - this.txtCheck2.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCheck2.Location = new System.Drawing.Point(129, 29); - this.txtCheck2.Multiline = true; - this.txtCheck2.Name = "txtCheck2"; - this.txtCheck2.ReadOnly = true; - this.txtCheck2.Size = new System.Drawing.Size(430, 97); - this.txtCheck2.TabIndex = 2; - // - // lblCheck2 - // - this.lblCheck2.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblCheck2.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCheck2.Location = new System.Drawing.Point(112, 3); - this.lblCheck2.Name = "lblCheck2"; - this.lblCheck2.Size = new System.Drawing.Size(447, 23); - this.lblCheck2.TabIndex = 1; - this.lblCheck2.Text = "RDP check succeeded!"; - // - // pbCheck2 - // - this.pbCheck2.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pbCheck2.Location = new System.Drawing.Point(3, 3); - this.pbCheck2.Name = "pbCheck2"; - this.pbCheck2.Size = new System.Drawing.Size(72, 123); - this.pbCheck2.TabIndex = 0; - this.pbCheck2.TabStop = false; - // - // pnlCheck3 - // - this.pnlCheck3.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlCheck3.Controls.Add(this.txtCheck3); - this.pnlCheck3.Controls.Add(this.lblCheck3); - this.pnlCheck3.Controls.Add(this.pbCheck3); - this.pnlCheck3.Location = new System.Drawing.Point(3, 275); - this.pnlCheck3.Name = "pnlCheck3"; - this.pnlCheck3.Size = new System.Drawing.Size(562, 130); - this.pnlCheck3.TabIndex = 30; - this.pnlCheck3.Visible = false; - // - // txtCheck3 - // - this.txtCheck3.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCheck3.BackColor = System.Drawing.SystemColors.Control; - this.txtCheck3.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCheck3.Location = new System.Drawing.Point(129, 29); - this.txtCheck3.Multiline = true; - this.txtCheck3.Name = "txtCheck3"; - this.txtCheck3.ReadOnly = true; - this.txtCheck3.Size = new System.Drawing.Size(430, 97); - this.txtCheck3.TabIndex = 2; - // - // lblCheck3 - // - this.lblCheck3.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblCheck3.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCheck3.Location = new System.Drawing.Point(112, 3); - this.lblCheck3.Name = "lblCheck3"; - this.lblCheck3.Size = new System.Drawing.Size(447, 23); - this.lblCheck3.TabIndex = 1; - this.lblCheck3.Text = "RDP check succeeded!"; - // - // pbCheck3 - // - this.pbCheck3.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pbCheck3.Location = new System.Drawing.Point(3, 3); - this.pbCheck3.Name = "pbCheck3"; - this.pbCheck3.Size = new System.Drawing.Size(72, 123); - this.pbCheck3.TabIndex = 0; - this.pbCheck3.TabStop = false; - // - // pnlCheck4 - // - this.pnlCheck4.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlCheck4.Controls.Add(this.txtCheck4); - this.pnlCheck4.Controls.Add(this.lblCheck4); - this.pnlCheck4.Controls.Add(this.pbCheck4); - this.pnlCheck4.Location = new System.Drawing.Point(3, 411); - this.pnlCheck4.Name = "pnlCheck4"; - this.pnlCheck4.Size = new System.Drawing.Size(562, 130); - this.pnlCheck4.TabIndex = 40; - this.pnlCheck4.Visible = false; - // - // txtCheck4 - // - this.txtCheck4.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCheck4.BackColor = System.Drawing.SystemColors.Control; - this.txtCheck4.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCheck4.Location = new System.Drawing.Point(129, 30); - this.txtCheck4.Multiline = true; - this.txtCheck4.Name = "txtCheck4"; - this.txtCheck4.ReadOnly = true; - this.txtCheck4.Size = new System.Drawing.Size(430, 97); - this.txtCheck4.TabIndex = 2; - // - // lblCheck4 - // - this.lblCheck4.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblCheck4.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCheck4.Location = new System.Drawing.Point(112, 3); - this.lblCheck4.Name = "lblCheck4"; - this.lblCheck4.Size = new System.Drawing.Size(447, 23); - this.lblCheck4.TabIndex = 1; - this.lblCheck4.Text = "RDP check succeeded!"; - // - // pbCheck4 - // - this.pbCheck4.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pbCheck4.Location = new System.Drawing.Point(3, 3); - this.pbCheck4.Name = "pbCheck4"; - this.pbCheck4.Size = new System.Drawing.Size(72, 123); - this.pbCheck4.TabIndex = 0; - this.pbCheck4.TabStop = false; - // - // pnlCheck5 - // - this.pnlCheck5.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlCheck5.Controls.Add(this.txtCheck5); - this.pnlCheck5.Controls.Add(this.lblCheck5); - this.pnlCheck5.Controls.Add(this.pbCheck5); - this.pnlCheck5.Location = new System.Drawing.Point(3, 547); - this.pnlCheck5.Name = "pnlCheck5"; - this.pnlCheck5.Size = new System.Drawing.Size(562, 130); - this.pnlCheck5.TabIndex = 50; - this.pnlCheck5.Visible = false; - // - // txtCheck5 - // - this.txtCheck5.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtCheck5.BackColor = System.Drawing.SystemColors.Control; - this.txtCheck5.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtCheck5.Location = new System.Drawing.Point(129, 29); - this.txtCheck5.Multiline = true; - this.txtCheck5.Name = "txtCheck5"; - this.txtCheck5.ReadOnly = true; - this.txtCheck5.Size = new System.Drawing.Size(430, 97); - this.txtCheck5.TabIndex = 2; - // - // lblCheck5 - // - this.lblCheck5.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblCheck5.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblCheck5.Location = new System.Drawing.Point(112, 3); - this.lblCheck5.Name = "lblCheck5"; - this.lblCheck5.Size = new System.Drawing.Size(447, 23); - this.lblCheck5.TabIndex = 1; - this.lblCheck5.Text = "RDP check succeeded!"; - // - // pbCheck5 - // - this.pbCheck5.Anchor = - ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.pbCheck5.Location = new System.Drawing.Point(3, 3); - this.pbCheck5.Name = "pbCheck5"; - this.pbCheck5.Size = new System.Drawing.Size(72, 123); - this.pbCheck5.TabIndex = 0; - this.pbCheck5.TabStop = false; - // - // btnCheckAgain - // - this.btnCheckAgain._mice = mRemoteNG.UI.Controls.Base.NGButton.MouseState.HOVER; - this.btnCheckAgain.Anchor = - ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | - System.Windows.Forms.AnchorStyles.Right))); - this.btnCheckAgain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCheckAgain.Location = new System.Drawing.Point(476, 810); - this.btnCheckAgain.Name = "btnCheckAgain"; - this.btnCheckAgain.Size = new System.Drawing.Size(104, 23); - this.btnCheckAgain.TabIndex = 0; - this.btnCheckAgain.Text = "Check again"; - this.btnCheckAgain.UseVisualStyleBackColor = true; - this.btnCheckAgain.Click += new System.EventHandler(this.btnCheckAgain_Click); - // - // chkAlwaysShow - // - this.chkAlwaysShow._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER; - this.chkAlwaysShow.Anchor = - ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | - System.Windows.Forms.AnchorStyles.Left))); - this.chkAlwaysShow.AutoSize = true; - this.chkAlwaysShow.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.chkAlwaysShow.Location = new System.Drawing.Point(12, 814); - this.chkAlwaysShow.Name = "chkAlwaysShow"; - this.chkAlwaysShow.Size = new System.Drawing.Size(200, 17); - this.chkAlwaysShow.TabIndex = 51; - this.chkAlwaysShow.Text = "Always show this screen at startup"; - this.chkAlwaysShow.UseVisualStyleBackColor = true; - this.chkAlwaysShow.CheckedChanged += new System.EventHandler(this.chkAlwaysShow_CheckedChanged); - // - // pnlChecks - // - this.pnlChecks.Anchor = - ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | - System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlChecks.AutoScroll = true; - this.pnlChecks.Controls.Add(this.pnlCheck1); - this.pnlChecks.Controls.Add(this.pnlCheck2); - this.pnlChecks.Controls.Add(this.pnlCheck3); - this.pnlChecks.Controls.Add(this.pnlCheck5); - this.pnlChecks.Controls.Add(this.pnlCheck4); - this.pnlChecks.Location = new System.Drawing.Point(12, 12); - this.pnlChecks.Name = "pnlChecks"; - this.pnlChecks.Size = new System.Drawing.Size(568, 792); - this.pnlChecks.TabIndex = 52; - // - // ComponentsCheckWindow - // - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(592, 845); - this.Controls.Add(this.pnlChecks); - this.Controls.Add(this.chkAlwaysShow); - this.Controls.Add(this.btnCheckAgain); - this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, - System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Icon = global::mRemoteNG.Resources.ComponentsCheck_Icon; - this.Name = "ComponentsCheckWindow"; - this.TabText = "Components Check"; - this.Text = "Components Check"; - this.Load += new System.EventHandler(this.ComponentsCheck_Load); - this.pnlCheck1.ResumeLayout(false); - this.pnlCheck1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck1)).EndInit(); - this.pnlCheck2.ResumeLayout(false); - this.pnlCheck2.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck2)).EndInit(); - this.pnlCheck3.ResumeLayout(false); - this.pnlCheck3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck3)).EndInit(); - this.pnlCheck4.ResumeLayout(false); - this.pnlCheck4.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck4)).EndInit(); - this.pnlCheck5.ResumeLayout(false); - this.pnlCheck5.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbCheck5)).EndInit(); - this.pnlChecks.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - } - - #endregion - - #region Public Methods - - public ComponentsCheckWindow() - { - WindowType = WindowType.ComponentsCheck; - DockPnl = new DockContent(); - InitializeComponent(); - var display = new DisplayProperties(); - _successImage = display.ScaleImage(Resources.Good_Symbol); - _failureImage = display.ScaleImage(Resources.Bad_Symbol); - FontOverrider.FontOverride(this); - ThemeManager.getInstance().ThemeChanged += ApplyTheme; - } - - #endregion - - #region Form Stuff - - private void ComponentsCheck_Load(object sender, EventArgs e) - { - ApplyLanguage(); - ApplyTheme(); - chkAlwaysShow.Checked = Settings.Default.StartupComponentsCheck; - CheckComponents(); - } - - private void ApplyLanguage() - { - TabText = Language.strComponentsCheck; - Text = Language.strComponentsCheck; - chkAlwaysShow.Text = Language.strCcAlwaysShowScreen; - btnCheckAgain.Text = Language.strCcCheckAgain; - } - - private new void ApplyTheme() - { - if (!ThemeManager.getInstance().ThemingActive) return; - base.ApplyTheme(); - - if (!ThemeManager.getInstance().ActiveAndExtended) return; - pnlCheck1.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCheck1.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlCheck2.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCheck2.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlCheck3.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCheck3.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlCheck4.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCheck4.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlCheck5.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlCheck5.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - pnlChecks.BackColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Background"); - pnlChecks.ForeColor = ThemeManager.getInstance().ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground"); - } - - private void btnCheckAgain_Click(object sender, EventArgs e) - { - CheckComponents(); - } - - private void chkAlwaysShow_CheckedChanged(object sender, EventArgs e) - { - Settings.Default.StartupComponentsCheck = chkAlwaysShow.Checked; - } - - public new void Show(DockPanel panel) - { - try - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to show the components window", - true); - base.Show(panel); - } - catch (Exception ex) - { - Runtime.MessageCollector.AddExceptionMessage("Failed to properly show the ComponentsWindow", ex); - } - } - - #endregion - - private void CheckComponents() - { - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Beginning component check", true); - CheckRdp(); - CheckVnc(); - CheckPutty(); - CheckIca(); - CheckGeckoBrowser(); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Finished component check", true); - } - - private void CheckRdp() - { - pnlCheck1.Visible = true; - var rdpProtocolFactory = new RdpProtocolFactory(); - var supportedVersions = rdpProtocolFactory.GetSupportedVersions(); - - if (supportedVersions.Any()) - { - pbCheck1.Image = _successImage; - lblCheck1.ForeColor = Color.DarkOliveGreen; - lblCheck1.Text = "RDP (Remote Desktop) " + Language.strCcCheckSucceeded; - txtCheck1.Text = string.Format(Language.strCcRDPOK, string.Join(", ", supportedVersions)); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "RDP versions installed: "+ string.Join(",", supportedVersions), true); - } - else - { - pbCheck1.Image = _failureImage; - lblCheck1.ForeColor = Color.Firebrick; - lblCheck1.Text = "RDP (Remote Desktop) " + Language.strCcCheckFailed; - txtCheck1.Text = string.Format(Language.strCcRDPFailed, GeneralAppInfo.UrlForum); - - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "RDP " + Language.strCcNotInstalledProperly, true); - } - } - - private void CheckVnc() - { - pnlCheck2.Visible = true; - - try - { - using (var vnc = new VncSharp.RemoteDesktop()) - { - vnc.CreateControl(); - - while (!vnc.Created) - { - Thread.Sleep(10); - System.Windows.Forms.Application.DoEvents(); - } - - pbCheck2.Image = _successImage; - lblCheck2.ForeColor = Color.DarkOliveGreen; - lblCheck2.Text = "VNC (Virtual Network Computing) " + Language.strCcCheckSucceeded; - txtCheck2.Text = string.Format(Language.strCcVNCOK, vnc.ProductVersion); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "VNC installed", true); - } - } - catch (Exception) - { - pbCheck2.Image = _failureImage; - lblCheck2.ForeColor = Color.Firebrick; - lblCheck2.Text = "VNC (Virtual Network Computing) " + Language.strCcCheckFailed; - txtCheck2.Text = string.Format(Language.strCcVNCFailed, GeneralAppInfo.UrlForum); - - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "VNC " + Language.strCcNotInstalledProperly, true); - } - } - - private void CheckPutty() - { - pnlCheck3.Visible = true; - string pPath; - if (Settings.Default.UseCustomPuttyPath == false) - { - pPath = GeneralAppInfo.HomePath + "\\PuTTYNG.exe"; - } - else - { - pPath = Settings.Default.CustomPuttyPath; - } - - if (File.Exists(pPath)) - { - var versionInfo = FileVersionInfo.GetVersionInfo(pPath); - - pbCheck3.Image = _successImage; - lblCheck3.ForeColor = Color.DarkOliveGreen; - lblCheck3.Text = "PuTTY (SSH/Telnet/Rlogin/RAW) " + Language.strCcCheckSucceeded; - txtCheck3.Text = - $"{Language.strCcPuttyOK}{Environment.NewLine}Version: {versionInfo.ProductName} Release: {versionInfo.FileVersion}"; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "PuTTY installed", true); - } - else - { - pbCheck3.Image = _failureImage; - lblCheck3.ForeColor = Color.Firebrick; - lblCheck3.Text = "PuTTY (SSH/Telnet/Rlogin/RAW) " + Language.strCcCheckFailed; - txtCheck3.Text = Language.strCcPuttyFailed; - - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "PuTTY " + Language.strCcNotInstalledProperly, true); - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "File " + pPath + " does not exist.", - true); - } - } - - private void CheckIca() - { - pnlCheck4.Visible = true; - - try - { - using (var ica = new AxICAClient()) - { - ica.Parent = this; - - pbCheck4.Image = _successImage; - lblCheck4.ForeColor = Color.DarkOliveGreen; - lblCheck4.Text = @"ICA (Citrix ICA) " + Language.strCcCheckSucceeded; - txtCheck4.Text = string.Format(Language.strCcICAOK, ica.Version); - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "ICA installed", true); - } - } - catch (Exception ex) - { - pbCheck4.Image = _failureImage; - lblCheck4.ForeColor = Color.Firebrick; - lblCheck4.Text = @"ICA (Citrix ICA) " + Language.strCcCheckFailed; - txtCheck4.Text = string.Format(Language.strCcICAFailed, GeneralAppInfo.UrlForum); - - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "ICA " + Language.strCcNotInstalledProperly, true); - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, ex.Message, true); - } - } - - private void CheckGeckoBrowser() - { - pnlCheck5.Visible = true; - var geckoBad = false; - var geckoFxPath = Path.Combine(GeneralAppInfo.HomePath, "Firefox"); - - if (File.Exists(Path.Combine(GeneralAppInfo.HomePath, "Geckofx-Core.dll"))) - { - if (Directory.Exists(geckoFxPath)) - { - if (!File.Exists(Path.Combine(geckoFxPath, "xul.dll"))) - { - geckoBad = true; - } - } - else - { - geckoBad = true; - } - } - - if (geckoBad == false) - { - pbCheck5.Image = _successImage; - lblCheck5.ForeColor = Color.DarkOliveGreen; - lblCheck5.Text = @"Gecko (Firefox) Rendering Engine (HTTP/S) " + Language.strCcCheckSucceeded; - if (!Xpcom.IsInitialized) - Xpcom.Initialize("Firefox"); - txtCheck5.Text = Language.strCcGeckoOK + " Version: " + Xpcom.XulRunnerVersion; - Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Gecko Browser installed", true); - } - else - { - pbCheck5.Image = _failureImage; - lblCheck5.ForeColor = Color.Firebrick; - lblCheck5.Text = @"Gecko (Firefox) Rendering Engine (HTTP/S) " + Language.strCcCheckFailed; - txtCheck5.Text = string.Format(Language.strCcGeckoFailed, GeneralAppInfo.UrlForum); - - Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, - "Gecko " + Language.strCcNotInstalledProperly, true); - Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, - "GeckoFx was not found in " + geckoFxPath, true); - } - } - } -} \ No newline at end of file diff --git a/mRemoteV1/UI/WindowType.cs b/mRemoteV1/UI/WindowType.cs index 4921365d..c7b1a283 100644 --- a/mRemoteV1/UI/WindowType.cs +++ b/mRemoteV1/UI/WindowType.cs @@ -1,4 +1,4 @@ -namespace mRemoteNG.UI +namespace mRemoteNG.UI { public enum WindowType { @@ -16,6 +16,5 @@ namespace mRemoteNG.UI ExternalApps = 13, PortScan = 14, UltraVNCSC = 16, - ComponentsCheck = 17, } } \ No newline at end of file diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index 80380c73..8464afcd 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -610,6 +610,9 @@ UserControl + + ComponentsPage.cs + UserControl @@ -815,8 +818,8 @@ Form - - Form + + UserControl Form @@ -1111,8 +1114,8 @@ BaseWindow.cs - - ComponentsCheckWindow.cs + + ComponentsPage.cs Designer