feat: Add registry settings forTabs and Panel settings

- Added registry settings for the Tabs and Panel Page.
- All settings implemented with async registry logic
- Comment unused settings
- Update documents
This commit is contained in:
xRushG
2024-10-01 12:32:16 +02:00
parent 600ba73f5f
commit 489602ffb3
9 changed files with 1008 additions and 32 deletions

View File

@@ -0,0 +1,140 @@
using System.Runtime.Versioning;
using Microsoft.Win32;
using mRemoteNG.App.Info;
using mRemoteNG.Tools.WindowsRegistry;
namespace mRemoteNG.Config.Settings.Registry
{
[SupportedOSPlatform("windows")]
public sealed partial class OptRegistryTabsPanelsPage
{
/// <summary>
/// Specifies whether panel tabs are always shown.
/// </summary>
public WinRegistryEntry<bool> AlwaysShowPanelTabs { get; private set; }
/// <summary>
/// Specifies whether logon information is shown on tabs.
/// </summary>
public WinRegistryEntry<bool> ShowLogonInfoOnTabs { get; private set; }
/// <summary>
/// Specifies whether protocol information is shown on tabs.
/// </summary>
public WinRegistryEntry<bool> ShowProtocolOnTabs { get; private set; }
/// <summary>
/// Specifies whether quick connect tabs are identified by the prefix "Quick:".
/// </summary>
public WinRegistryEntry<bool> IdentifyQuickConnectTabs { get; private set; }
/// <summary>
/// Specifies whether double-clicking on a tab closes it.
/// </summary>
public WinRegistryEntry<bool> DoubleClickOnTabClosesIt { get; private set; }
/// <summary>
/// Specifies whether the panel selection dialog is always shown.
/// </summary>
public WinRegistryEntry<bool> AlwaysShowPanelSelectionDlg { get; private set; }
/// <summary>
/// Specifies whether an empty panel is created on startup.
/// </summary>
public WinRegistryEntry<bool> CreateEmptyPanelOnStartUp { get; private set; }
/// <summary>
/// Specifies the name of the startup panel.
/// </summary>
public WinRegistryEntry<string> StartUpPanelName { get; private set; }
public OptRegistryTabsPanelsPage()
{
RegistryHive hive = WindowsRegistryInfo.Hive;
string subKey = WindowsRegistryInfo.TabsAndPanelsOptions;
AlwaysShowPanelTabs = new WinRegistryEntry<bool>(hive, subKey, nameof(AlwaysShowPanelTabs)).Read();
ShowLogonInfoOnTabs = new WinRegistryEntry<bool>(hive, subKey, nameof(ShowLogonInfoOnTabs)).Read();
ShowProtocolOnTabs = new WinRegistryEntry<bool>(hive, subKey, nameof(ShowProtocolOnTabs)).Read();
IdentifyQuickConnectTabs = new WinRegistryEntry<bool>(hive, subKey, nameof(IdentifyQuickConnectTabs)).Read();
DoubleClickOnTabClosesIt = new WinRegistryEntry<bool>(hive, subKey, nameof(DoubleClickOnTabClosesIt)).Read();
AlwaysShowPanelSelectionDlg = new WinRegistryEntry<bool>(hive, subKey, nameof(AlwaysShowPanelSelectionDlg)).Read();
CreateEmptyPanelOnStartUp = new WinRegistryEntry<bool>(hive, subKey, nameof(CreateEmptyPanelOnStartUp)).Read();
StartUpPanelName = new WinRegistryEntry<string>(hive, subKey, nameof(StartUpPanelName)).Read();
SetupValidation();
Apply();
}
/// <summary>
/// Configures validation settings for various parameters
/// </summary>
private void SetupValidation()
{
}
/// <summary>
/// Applies registry settings and overrides various properties.
/// </summary>
private void Apply()
{
ApplyAlwaysShowPanelTabs();
ApplyShowLogonInfoOnTabs();
ApplyShowProtocolOnTabs();
ApplyIdentifyQuickConnectTabs();
ApplyDoubleClickOnTabClosesIt();
ApplyAlwaysShowPanelSelectionDlg();
ApplyCreateEmptyPanelOnStartUp();
ApplyStartUpPanelName();
}
private void ApplyAlwaysShowPanelTabs()
{
if (AlwaysShowPanelTabs.IsSet)
Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelTabs = AlwaysShowPanelTabs.Value;
}
private void ApplyShowLogonInfoOnTabs()
{
if (ShowLogonInfoOnTabs.IsSet)
Properties.OptionsTabsPanelsPage.Default.ShowLogonInfoOnTabs = ShowLogonInfoOnTabs.Value;
}
private void ApplyShowProtocolOnTabs()
{
if (ShowProtocolOnTabs.IsSet)
Properties.OptionsTabsPanelsPage.Default.ShowProtocolOnTabs = ShowProtocolOnTabs.Value;
}
private void ApplyIdentifyQuickConnectTabs()
{
if (IdentifyQuickConnectTabs.IsSet)
Properties.OptionsTabsPanelsPage.Default.IdentifyQuickConnectTabs = IdentifyQuickConnectTabs.Value;
}
private void ApplyDoubleClickOnTabClosesIt()
{
if (DoubleClickOnTabClosesIt.IsSet)
Properties.OptionsTabsPanelsPage.Default.DoubleClickOnTabClosesIt = DoubleClickOnTabClosesIt.Value;
}
private void ApplyAlwaysShowPanelSelectionDlg()
{
if (AlwaysShowPanelSelectionDlg.IsSet)
Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelSelectionDlg = AlwaysShowPanelSelectionDlg.Value;
}
private void ApplyCreateEmptyPanelOnStartUp()
{
if (CreateEmptyPanelOnStartUp.IsSet)
Properties.OptionsTabsPanelsPage.Default.CreateEmptyPanelOnStartUp = CreateEmptyPanelOnStartUp.Value;
}
private void ApplyStartUpPanelName()
{
if (StartUpPanelName.IsSet)
Properties.OptionsTabsPanelsPage.Default.StartUpPanelName = StartUpPanelName.Value;
}
}
}

View File

@@ -44,6 +44,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkCreateEmptyPanelOnStart = new MrngCheckBox();
txtBoxPanelName = new MrngTextBox();
lblPanelName = new MrngLabel();
pnlOptions = new System.Windows.Forms.Panel();
lblRegistrySettingsUsedInfo = new System.Windows.Forms.Label();
pnlOptions.SuspendLayout();
SuspendLayout();
//
// chkAlwaysShowPanelTabs
@@ -51,7 +54,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkAlwaysShowPanelTabs._mice = MrngCheckBox.MouseState.OUT;
chkAlwaysShowPanelTabs.AutoSize = true;
chkAlwaysShowPanelTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkAlwaysShowPanelTabs.Location = new System.Drawing.Point(9, 8);
chkAlwaysShowPanelTabs.Location = new System.Drawing.Point(3, 3);
chkAlwaysShowPanelTabs.Name = "chkAlwaysShowPanelTabs";
chkAlwaysShowPanelTabs.Size = new System.Drawing.Size(149, 17);
chkAlwaysShowPanelTabs.TabIndex = 0;
@@ -63,7 +66,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkAlwaysShowConnectionTabs._mice = MrngCheckBox.MouseState.OUT;
chkAlwaysShowConnectionTabs.AutoSize = true;
chkAlwaysShowConnectionTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkAlwaysShowConnectionTabs.Location = new System.Drawing.Point(9, 31);
chkAlwaysShowConnectionTabs.Location = new System.Drawing.Point(3, 26);
chkAlwaysShowConnectionTabs.Name = "chkAlwaysShowConnectionTabs";
chkAlwaysShowConnectionTabs.Size = new System.Drawing.Size(178, 17);
chkAlwaysShowConnectionTabs.TabIndex = 0;
@@ -76,7 +79,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkIdentifyQuickConnectTabs._mice = MrngCheckBox.MouseState.OUT;
chkIdentifyQuickConnectTabs.AutoSize = true;
chkIdentifyQuickConnectTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkIdentifyQuickConnectTabs.Location = new System.Drawing.Point(9, 123);
chkIdentifyQuickConnectTabs.Location = new System.Drawing.Point(3, 118);
chkIdentifyQuickConnectTabs.Name = "chkIdentifyQuickConnectTabs";
chkIdentifyQuickConnectTabs.Size = new System.Drawing.Size(315, 17);
chkIdentifyQuickConnectTabs.TabIndex = 4;
@@ -88,7 +91,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkOpenNewTabRightOfSelected._mice = MrngCheckBox.MouseState.OUT;
chkOpenNewTabRightOfSelected.AutoSize = true;
chkOpenNewTabRightOfSelected.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkOpenNewTabRightOfSelected.Location = new System.Drawing.Point(9, 54);
chkOpenNewTabRightOfSelected.Location = new System.Drawing.Point(3, 49);
chkOpenNewTabRightOfSelected.Name = "chkOpenNewTabRightOfSelected";
chkOpenNewTabRightOfSelected.Size = new System.Drawing.Size(309, 17);
chkOpenNewTabRightOfSelected.TabIndex = 1;
@@ -100,7 +103,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkAlwaysShowPanelSelectionDlg._mice = MrngCheckBox.MouseState.OUT;
chkAlwaysShowPanelSelectionDlg.AutoSize = true;
chkAlwaysShowPanelSelectionDlg.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkAlwaysShowPanelSelectionDlg.Location = new System.Drawing.Point(9, 169);
chkAlwaysShowPanelSelectionDlg.Location = new System.Drawing.Point(3, 164);
chkAlwaysShowPanelSelectionDlg.Name = "chkAlwaysShowPanelSelectionDlg";
chkAlwaysShowPanelSelectionDlg.Size = new System.Drawing.Size(347, 17);
chkAlwaysShowPanelSelectionDlg.TabIndex = 6;
@@ -112,7 +115,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkShowLogonInfoOnTabs._mice = MrngCheckBox.MouseState.OUT;
chkShowLogonInfoOnTabs.AutoSize = true;
chkShowLogonInfoOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkShowLogonInfoOnTabs.Location = new System.Drawing.Point(9, 77);
chkShowLogonInfoOnTabs.Location = new System.Drawing.Point(3, 72);
chkShowLogonInfoOnTabs.Name = "chkShowLogonInfoOnTabs";
chkShowLogonInfoOnTabs.Size = new System.Drawing.Size(226, 17);
chkShowLogonInfoOnTabs.TabIndex = 2;
@@ -124,7 +127,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkDoubleClickClosesTab._mice = MrngCheckBox.MouseState.OUT;
chkDoubleClickClosesTab.AutoSize = true;
chkDoubleClickClosesTab.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkDoubleClickClosesTab.Location = new System.Drawing.Point(9, 146);
chkDoubleClickClosesTab.Location = new System.Drawing.Point(3, 141);
chkDoubleClickClosesTab.Name = "chkDoubleClickClosesTab";
chkDoubleClickClosesTab.Size = new System.Drawing.Size(170, 17);
chkDoubleClickClosesTab.TabIndex = 5;
@@ -136,7 +139,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkShowProtocolOnTabs._mice = MrngCheckBox.MouseState.OUT;
chkShowProtocolOnTabs.AutoSize = true;
chkShowProtocolOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkShowProtocolOnTabs.Location = new System.Drawing.Point(9, 100);
chkShowProtocolOnTabs.Location = new System.Drawing.Point(3, 95);
chkShowProtocolOnTabs.Name = "chkShowProtocolOnTabs";
chkShowProtocolOnTabs.Size = new System.Drawing.Size(180, 17);
chkShowProtocolOnTabs.TabIndex = 3;
@@ -148,7 +151,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkCreateEmptyPanelOnStart._mice = MrngCheckBox.MouseState.OUT;
chkCreateEmptyPanelOnStart.AutoSize = true;
chkCreateEmptyPanelOnStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
chkCreateEmptyPanelOnStart.Location = new System.Drawing.Point(9, 192);
chkCreateEmptyPanelOnStart.Location = new System.Drawing.Point(3, 187);
chkCreateEmptyPanelOnStart.Name = "chkCreateEmptyPanelOnStart";
chkCreateEmptyPanelOnStart.Size = new System.Drawing.Size(271, 17);
chkCreateEmptyPanelOnStart.TabIndex = 7;
@@ -159,7 +162,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// txtBoxPanelName
//
txtBoxPanelName.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
txtBoxPanelName.Location = new System.Drawing.Point(41, 228);
txtBoxPanelName.Location = new System.Drawing.Point(35, 223);
txtBoxPanelName.Name = "txtBoxPanelName";
txtBoxPanelName.Size = new System.Drawing.Size(213, 22);
txtBoxPanelName.TabIndex = 8;
@@ -167,31 +170,55 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// lblPanelName
//
lblPanelName.AutoSize = true;
lblPanelName.Location = new System.Drawing.Point(38, 212);
lblPanelName.Location = new System.Drawing.Point(32, 207);
lblPanelName.Name = "lblPanelName";
lblPanelName.Size = new System.Drawing.Size(69, 13);
lblPanelName.TabIndex = 9;
lblPanelName.Text = "Panel name:";
//
// pnlOptions
//
pnlOptions.Controls.Add(chkAlwaysShowPanelTabs);
pnlOptions.Controls.Add(lblPanelName);
pnlOptions.Controls.Add(chkShowProtocolOnTabs);
pnlOptions.Controls.Add(txtBoxPanelName);
pnlOptions.Controls.Add(chkDoubleClickClosesTab);
pnlOptions.Controls.Add(chkCreateEmptyPanelOnStart);
pnlOptions.Controls.Add(chkShowLogonInfoOnTabs);
pnlOptions.Controls.Add(chkAlwaysShowPanelSelectionDlg);
pnlOptions.Controls.Add(chkAlwaysShowConnectionTabs);
pnlOptions.Controls.Add(chkOpenNewTabRightOfSelected);
pnlOptions.Controls.Add(chkIdentifyQuickConnectTabs);
pnlOptions.Dock = System.Windows.Forms.DockStyle.Top;
pnlOptions.Location = new System.Drawing.Point(0, 30);
pnlOptions.Name = "pnlOptions";
pnlOptions.Size = new System.Drawing.Size(610, 262);
pnlOptions.TabIndex = 10;
//
// lblRegistrySettingsUsedInfo
//
lblRegistrySettingsUsedInfo.BackColor = System.Drawing.SystemColors.ControlLight;
lblRegistrySettingsUsedInfo.Dock = System.Windows.Forms.DockStyle.Top;
lblRegistrySettingsUsedInfo.ForeColor = System.Drawing.SystemColors.ControlText;
lblRegistrySettingsUsedInfo.Location = new System.Drawing.Point(0, 0);
lblRegistrySettingsUsedInfo.Name = "lblRegistrySettingsUsedInfo";
lblRegistrySettingsUsedInfo.Padding = new System.Windows.Forms.Padding(0, 2, 0, 0);
lblRegistrySettingsUsedInfo.Size = new System.Drawing.Size(610, 30);
lblRegistrySettingsUsedInfo.TabIndex = 11;
lblRegistrySettingsUsedInfo.Text = "Some settings are configured by your Administrator. Please contact your administrator for more information.";
lblRegistrySettingsUsedInfo.Visible = false;
//
// TabsPanelsPage
//
AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
Controls.Add(lblPanelName);
Controls.Add(txtBoxPanelName);
Controls.Add(chkCreateEmptyPanelOnStart);
Controls.Add(chkAlwaysShowPanelTabs);
Controls.Add(chkAlwaysShowConnectionTabs);
Controls.Add(chkIdentifyQuickConnectTabs);
Controls.Add(chkOpenNewTabRightOfSelected);
Controls.Add(chkAlwaysShowPanelSelectionDlg);
Controls.Add(chkShowLogonInfoOnTabs);
Controls.Add(chkDoubleClickClosesTab);
Controls.Add(chkShowProtocolOnTabs);
Controls.Add(pnlOptions);
Controls.Add(lblRegistrySettingsUsedInfo);
Name = "TabsPanelsPage";
Size = new System.Drawing.Size(610, 490);
pnlOptions.ResumeLayout(false);
pnlOptions.PerformLayout();
ResumeLayout(false);
PerformLayout();
}
internal MrngCheckBox chkAlwaysShowPanelTabs;
@@ -205,5 +232,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private MrngCheckBox chkCreateEmptyPanelOnStart;
private Controls.MrngTextBox txtBoxPanelName;
private Controls.MrngLabel lblPanelName;
private System.Windows.Forms.Panel pnlOptions;
internal System.Windows.Forms.Label lblRegistrySettingsUsedInfo;
}
}

View File

@@ -1,5 +1,7 @@
using mRemoteNG.Properties;
using mRemoteNG.Config.Settings.Registry;
using mRemoteNG.Properties;
using mRemoteNG.Resources.Language;
using System;
using System.Runtime.Versioning;
namespace mRemoteNG.UI.Forms.OptionsPages
@@ -7,6 +9,12 @@ namespace mRemoteNG.UI.Forms.OptionsPages
[SupportedOSPlatform("windows")]
public sealed partial class TabsPanelsPage
{
#region Private Fields
private OptRegistryTabsPanelsPage pageRegSettingsInstance;
#endregion
public TabsPanelsPage()
{
InitializeComponent();
@@ -25,7 +33,11 @@ namespace mRemoteNG.UI.Forms.OptionsPages
base.ApplyLanguage();
chkAlwaysShowPanelTabs.Text = Language.AlwaysShowPanelTabs;
chkAlwaysShowConnectionTabs.Text = Language.AlwaysShowConnectionTabs;
/*
* Comments added: June 16, 2024
* UI control (chkAlwaysShowConnectionTabs) is not visible and poperty never used
*/
//chkAlwaysShowConnectionTabs.Text = Language.AlwaysShowConnectionTabs;
chkOpenNewTabRightOfSelected.Text = Language.OpenNewTabRight;
chkShowLogonInfoOnTabs.Text = Language.ShowLogonInfoOnTabs;
chkShowProtocolOnTabs.Text = Language.ShowProtocolOnTabs;
@@ -34,13 +46,29 @@ namespace mRemoteNG.UI.Forms.OptionsPages
chkAlwaysShowPanelSelectionDlg.Text = Language.AlwaysShowPanelSelection;
chkCreateEmptyPanelOnStart.Text = Language.CreateEmptyPanelOnStartUp;
lblPanelName.Text = $@"{Language.PanelName}:";
lblRegistrySettingsUsedInfo.Text = Language.OptionsCompanyPolicyMessage;
}
public override void LoadSettings()
{
chkAlwaysShowPanelTabs.Checked = Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelTabs;
chkAlwaysShowConnectionTabs.Checked = Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs;
chkOpenNewTabRightOfSelected.Checked = Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected;
/*
* Comment added: June 16, 2024
* Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs nerver used
* UI control (chkAlwaysShowConnectionTabs) is not visible
*/
//chkAlwaysShowConnectionTabs.Checked = Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs;
/*
* Comment added: June 16, 2024
* Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected nerver used
* Set Visible = false
*/
//chkOpenNewTabRightOfSelected.Checked = Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected;
chkOpenNewTabRightOfSelected.Visible = false;
chkShowLogonInfoOnTabs.Checked = Properties.OptionsTabsPanelsPage.Default.ShowLogonInfoOnTabs;
chkShowProtocolOnTabs.Checked = Properties.OptionsTabsPanelsPage.Default.ShowProtocolOnTabs;
chkIdentifyQuickConnectTabs.Checked = Properties.OptionsTabsPanelsPage.Default.IdentifyQuickConnectTabs;
@@ -56,10 +84,19 @@ namespace mRemoteNG.UI.Forms.OptionsPages
base.SaveSettings();
Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelTabs = chkAlwaysShowPanelTabs.Checked;
Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs = chkAlwaysShowConnectionTabs.Checked;
/*
* Comment added: June 16, 2024
* Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs nerver used
*/
//Properties.OptionsTabsPanelsPage.Default.AlwaysShowConnectionTabs = chkAlwaysShowConnectionTabs.Checked;
FrmMain.Default.ShowHidePanelTabs();
Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected = chkOpenNewTabRightOfSelected.Checked;
/*
* Comment added: June 16, 2024
* Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected nerver used
*/
//Properties.OptionsTabsPanelsPage.Default.OpenTabsRightOfSelected = chkOpenNewTabRightOfSelected.Checked;
Properties.OptionsTabsPanelsPage.Default.ShowLogonInfoOnTabs = chkShowLogonInfoOnTabs.Checked;
Properties.OptionsTabsPanelsPage.Default.ShowProtocolOnTabs = chkShowProtocolOnTabs.Checked;
Properties.OptionsTabsPanelsPage.Default.IdentifyQuickConnectTabs = chkIdentifyQuickConnectTabs.Checked;
@@ -69,9 +106,64 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Properties.OptionsTabsPanelsPage.Default.StartUpPanelName = txtBoxPanelName.Text;
}
public override void LoadRegistrySettings()
{
Type settingsType = typeof(OptRegistryTabsPanelsPage);
RegistryLoader.RegistrySettings.TryGetValue(settingsType, out var settings);
pageRegSettingsInstance = settings as OptRegistryTabsPanelsPage;
RegistryLoader.Cleanup(settingsType);
// ***
// Disable controls based on the registry settings.
//
if (pageRegSettingsInstance.AlwaysShowPanelTabs.IsSet)
DisableControl(chkAlwaysShowPanelTabs);
if (pageRegSettingsInstance.ShowLogonInfoOnTabs.IsSet)
DisableControl(chkShowLogonInfoOnTabs);
if (pageRegSettingsInstance.ShowProtocolOnTabs.IsSet)
DisableControl(chkShowProtocolOnTabs);
if (pageRegSettingsInstance.IdentifyQuickConnectTabs.IsSet)
DisableControl(chkIdentifyQuickConnectTabs);
if (pageRegSettingsInstance.DoubleClickOnTabClosesIt.IsSet)
DisableControl(chkDoubleClickClosesTab);
if (pageRegSettingsInstance.AlwaysShowPanelSelectionDlg.IsSet)
DisableControl(chkAlwaysShowPanelSelectionDlg);
if (pageRegSettingsInstance.CreateEmptyPanelOnStartUp.IsSet)
DisableControl(chkCreateEmptyPanelOnStart);
if (pageRegSettingsInstance.StartUpPanelName.IsSet)
DisableControl(txtBoxPanelName);
// Updates the visibility of the information label indicating whether registry settings are used.
lblRegistrySettingsUsedInfo.Visible = ShowRegistrySettingsUsedInfo();
}
/// <summary>
/// Checks if specific registry settings related to appearence page are used.
/// </summary>
private bool ShowRegistrySettingsUsedInfo()
{
return pageRegSettingsInstance.AlwaysShowPanelTabs.IsSet
|| pageRegSettingsInstance.ShowLogonInfoOnTabs.IsSet
|| pageRegSettingsInstance.ShowProtocolOnTabs.IsSet
|| pageRegSettingsInstance.IdentifyQuickConnectTabs.IsSet
|| pageRegSettingsInstance.DoubleClickOnTabClosesIt.IsSet
|| pageRegSettingsInstance.AlwaysShowPanelSelectionDlg.IsSet
|| pageRegSettingsInstance.CreateEmptyPanelOnStartUp.IsSet
|| pageRegSettingsInstance.StartUpPanelName.IsSet;
}
private void UpdatePanelNameTextBox()
{
txtBoxPanelName.Enabled = chkCreateEmptyPanelOnStart.Checked;
if (! pageRegSettingsInstance.StartUpPanelName.IsSet)
txtBoxPanelName.Enabled = chkCreateEmptyPanelOnStart.Checked;
}
private void chkCreateEmptyPanelOnStart_CheckedChanged(object sender, System.EventArgs e)

View File

@@ -1,4 +1,64 @@
<root>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">

View File

@@ -0,0 +1,95 @@
*******************
Appearance Settings
*******************
.. versionadded:: v1.77.3
.. warning::
Before proceeding with any changes to the Windows Registry, it is imperative that you carefully read and comprehend the
**Modifying the Registry**, **Restricted Registry Settings** and **Disclaimer**
on :doc:`Registry Settings Infromation <registry_settings_information>`.
Options
=======
Configure the options page to modify functionalities as described.
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\Appearance\Options``
Show Description Tooltips In Connection Tree
--------------------------------------------
Specifies whether to show tooltips with descriptions in the connection tree view.
- **Value Name:** ``ShowDescriptionTooltipsInConTree``
- **Value Type:** ``REG_SZ``
- **Values:**
- Show: ``true``
- Hide: ``false``
Show Complete Connection File Path In Title
-------------------------------------------
Specifies whether to show complete connection path in the window title.
- **Value Name:** ``ShowCompleteConFilePathInTitle``
- **Value Type:** ``REG_SZ``
- **Values:**
- Show: ``true``
- Hide: ``false``
Always Show System Tray Icon
----------------------------
Specifies whether to always show the system tray icon.
- **Value Name:** ``AlwaysShowSystemTrayIcon``
- **Value Type:** ``REG_SZ``
- **Values:**
- Show: ``true``
- Hide: ``false``
Minimize To Tray
----------------
Specifies whether the application should minimize to the system tray.
- **Value Name:** ``MinimizeToTray``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Close To Tray
-------------
Specifies whether the application should close to the system tray.
- **Value Name:** ``CloseToTray``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Registry Template
=================
.. code::
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\Appearance]
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\Appearance\Options]
"AlwaysShowSystemTrayIcon"="false"
"CloseToTray"="false"
"MinimizeToTray"="true"
"ShowCompleteConFilePathInTitle"="true"
"ShowDescriptionTooltipsInConTree"="true"

View File

@@ -0,0 +1,345 @@
*********************
Notification Settings
*********************
.. versionadded:: v1.77.3
.. warning::
Before proceeding with any changes to the Windows Registry, it is imperative that you carefully read and comprehend the
**Modifying the Registry**, **Restricted Registry Settings** and **Disclaimer**
on :doc:`Registry Settings Infromation <registry_settings_information>`.
Common
======
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\Notifications``
Allow Logging
-------------
Specifies whether logging to a file is allowed or not.
- **Value Name:** ``AllowLogging``
- **Value Type:** ``REG_SZ``
- **Default value:** ``true``
- **Values:**
- Disallow: ``false``
Allow Notifications
-------------------
Specifies whether notifications are allowed or not.
- **Value Name:** ``AllowNotifications``
- **Value Type:** ``REG_SZ``
- **Default value:** ``true``
- **Values:**
- Disallow: ``false``
Allow Popups
------------
Specifies whether pop-up notifications are allowed or not.
- **Value Name:** ``AllowPopups``
- **Value Type:** ``REG_SZ``
- **Default value:** ``true``
- **Values:**
- Disallow: ``false``
Options: Notification Panel
===========================
Configure the options page to modify functionalities as described. These settings are scoped under the "Notification Panel".
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\Notifications\Options``
.. note::
In some configurations, an initial application restart may be required after the initial launch.
Write Debug Messages
--------------------
Specifies whether debug messages are written to the notification panel.
Show this message types checkbox: Debug
- **Value Name:** ``NfpWriteDebugMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Info Messages
-------------------
Specifies whether information messages are written to the notification panel.
Show this message types checkbox: Information
- **Value Name:** ``NfpWriteInfoMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Warning Messages
----------------------
Specifies whether warning messages are written to the notification panel.
Show this message types checkbox: Warning
- **Value Name:** ``NfpWriteWarningMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Error Messages
--------------------
Specifies whether error messages are written to the notification panel.
Show this message types checkbox: Error
- **Value Name:** ``NfpWriteErrorMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Switch To Notification Panel On Information
-------------------------------------------
Specifies whether to switch to notification panel when information messages are received.
Switch to notifications panel checkbox: Information
- **Value Name:** ``SwitchToMCOnInformation``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Switch To Notification Panel On Warning
---------------------------------------
Specifies whether to switch to notification panel when warning messages are received.
Switch to notifications panel checkbox: Warning
- **Value Name:** ``SwitchToMCOnWarning``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Switch To Notification Panel On Error
-------------------------------------
Specifies whether to switch to notification panel when error messages are received.
Switch to notifications panel checkbox: Error
- **Value Name:** ``SwitchToMCOnError``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Options: Logging Panel
======================
Configure the options page to modify functionalities as described. These settings are scoped under the "Logging Panel".
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\Notifications\Options``
.. note::
In some configurations, an initial application restart may be required after the initial launch.
Log To Application Directory
----------------------------
Specifies whether logs should be written to the application directory.
- **Value Name:** ``LogToApplicationDirectory``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
.. warning::
Users must have permissions to the application dir!
.. note::
If set to true, LogFilePath cannot be configured.
Log File Path
-------------
Specifies the file path for logging.
- **Value Name:** ``LogFilePath``
- **Value Type:** ``REG_SZ``
.. warning::
Users must have permissions to write to the file!
.. note::
If LogToApplicationDirectory is set to true, this setting has no effect; LogToApplicationDirectory must be set to false. If only LogFilePath is present, LogToApplicationDirectory will be automatically set to false.
Write Debug Messages
--------------------
Specifies whether debug messages should be written to the text log.
- **Value Name:** ``LfWriteDebugMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Info Messages
-------------------
Specifies whether information messages should be written to the text log.
- **Value Name:** ``LfWriteInfoMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Warning Messages
----------------------
Specifies whether warning messages should be written to the text log.
- **Value Name:** ``LfWriteWarningMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Error Messages
--------------------
Specifies whether error messages should be written to the text log.
- **Value Name:** ``LfWriteErrorMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Options: Popup Panel
====================
Configure the options page to modify functionalities as described. These settings are scoped under the "Popup Panel".
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\Notifications\Options``
.. warning::
Settings could affect the user experience.
.. note::
In some configurations, an initial application restart may be required after the initial launch.
Write Debug Messages
--------------------
Specifies whether debug messages should be displayed as popups.
- **Value Name:** ``PuWriteDebugMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
.. warning::
Activating could lead to the program becoming unusable. Suitable only for debugging purposes.
Write Info Messages
-------------------
Specifies whether information messages should be displayed as popups.
- **Value Name:** ``PuWriteInfoMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Warning Messages
----------------------
Specifies whether warning messages should be displayed as popups.
- **Value Name:** ``PuWriteWarningMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Write Error Messages
--------------------
Specifies whether error messages should be displayed as popups.
- **Value Name:** ``PuWriteErrorMsgs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Registry Template
=================
.. code::
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\Notifications]
"AllowLogging"="false"
"AllowNotifications"="false"
"AllowPopups"="false"
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\Notifications\Options]
"NfpWriteDebugMsgs"="true"
"NfpWriteInfoMsgs"="true"
"NfpWriteWarningMsgs"="true"
"NfpWriteErrorMsgs"="true"
"SwitchToMCOnInformation"="false"
"SwitchToMCOnWarning"="false"
"SwitchToMCOnError"="false"
"LfWriteDebugMsgs"="true"
"LfWriteErrorMsgs"="true"
"LfWriteInfoMsgs"="true"
"LfWriteWarningMsgs"="true"
"LogFilePath"="c:\...."
"LogToApplicationDirectory"="false"
"PuWriteDebugMsgs"="false"
"PuWriteErrorMsgs"="false"
"PuWriteInfoMsgs"="false"
"PuWriteWarningMsgs"="false"

View File

@@ -0,0 +1,76 @@
*************************
Startup and Exit Settings
*************************
.. versionadded:: v1.77.3
.. warning::
Before proceeding with any changes to the Windows Registry, it is imperative that you carefully read and comprehend the
**Modifying the Registry**, **Restricted Registry Settings** and **Disclaimer**
on :doc:`Registry Settings Infromation <registry_settings_information>`.
Options
=======
Configure the options page to modify functionalities as described.
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\StartupExit\Options``
Startup Behavior
----------------
Specifies the startup behavior of the application:
- None: The application starts without any specific behavior, using the last closed resolution or position.
- Minimized: The application starts minimized.
- FullScreen: The application starts in fullscreen mode.
- **Value Name:** ``StartupBehavior``
- **Value Type:** ``REG_SZ``
- **Values:**
- ``None``
- ``Minimized``
- ``FullScreen``
Open Connections From Last Session
----------------------------------
Specifies whether sessions should be automatically reconnected on application startup.
- **Value Name:** ``OpenConnectionsFromLastSession``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Enforce Single Application Instance
-----------------------------------
Ensures that only a single instance of the application is allowed to run.
- **Value Name:** ``EnforceSingleApplicationInstance``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Registry Template
=================
.. code::
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\StartupExit]
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\StartupExit\Options]
"EnforceSingleApplicationInstance"="true"
"OpenConnectionsFromLastSession"="true"
"StartupBehavior"="FullScreen"

View File

@@ -0,0 +1,136 @@
***********************
Tabs and Panel Settings
***********************
.. versionadded:: v1.77.3
.. warning::
Before proceeding with any changes to the Windows Registry, it is imperative that you carefully read and comprehend the
**Modifying the Registry**, **Restricted Registry Settings** and **Disclaimer**
on :doc:`Registry Settings Infromation <registry_settings_information>`.
Options
=======
Configure the options page to modify functionalities as described.
- **Registry Hive:** ``HKEY_LOCAL_MACHINE``
- **Registry Path:** ``SOFTWARE\mRemoteNG\TabsAndPanels\Options``
Always Show Panel Tabs
----------------------
Specifies whether panel tabs are always shown or not. This is useful when the panel attribute in a connection is set to group open connections.
- **Value Name:** ``AlwaysShowPanelTabs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Show Logon Info On Tabs
-----------------------
Specifies whether logon information (username) is shown on tabs.
- **Value Name:** ``ShowLogonInfoOnTabs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Show Protocol On Tabs
---------------------
Specifies whether protocol information is displayed on tabs (e.g., RDP:).
- **Value Name:** ``ShowProtocolOnTabs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Marking Quick Connect Tabs
--------------------------
Specifies whether quick connect tabs are marked by the prefix "Quick:".
- **Value Name:** ``IdentifyQuickConnectTabs``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Double Click To Close Tab
-------------------------
Specifies whether double-clicking on a tab closes it.
- **Value Name:** ``DoubleClickOnTabClosesIt``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Always Show Panel Selection Dialog
----------------------------------
Specifies whether the panel selection dialog is always shown.
When set to true, initiating a connection will prompt a dialog to appear, allowing the user to choose the panel to which the connection will be added or create a new one.
- **Value Name:** ``AlwaysShowPanelSelectionDlg``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Create Empty Panel On Start Up
------------------------------
Specifies whether an empty panel is created on startup.
- **Value Name:** ``CreateEmptyPanelOnStartUp``
- **Value Type:** ``REG_SZ``
- **Values:**
- Enable: ``true``
- Disable: ``false``
Start Up Panel Name
-------------------
Specifies the name of the startup panel.
- **Value Name:** ``StartUpPanelName``
- **Value Type:** ``REG_SZ``
- **Values:**
.. note::
It doesn't take effect if 'CreateEmptyPanelOnStartUp' is unchecked.
Registry Template
=================
.. code::
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\TabsAndPanels]
[HKEY_LOCAL_MACHINE\SOFTWARE\mRemoteNG\TabsAndPanels\Options]
"AlwaysShowPanelTabs"="true"
"ShowLogonInfoOnTabs"="true"
"ShowProtocolOnTabs"="true"
"IdentifyQuickConnectTabs"="true"
"DoubleClickOnTabClosesIt"="true"
"AlwaysShowPanelSelectionDlg"="true"
"CreateEmptyPanelOnStartUp"="true"
"StartUpPanelName"=""

View File

@@ -22,6 +22,9 @@ Make changes with caution and ensure that you have backups before making any adj
.. toctree::
:maxdepth: 4
registry/credential_settings
registry/startupExit_settings.rst
registry/appearance_settings.rst
registry/tabsPanels_settings.rst
registry/notification_settings.rst
registry/credential_settings.rst
registry/updates_settings.rst