mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #1204 from leaskovski/develop
Added a new option to toggle Connection Tabs
This commit is contained in:
12
mRemoteV1/Properties/Settings.Designer.cs
generated
12
mRemoteV1/Properties/Settings.Designer.cs
generated
@@ -2770,5 +2770,17 @@ namespace mRemoteNG {
|
||||
this["PlaceSearchBarAboveConnectionTree"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool AlwaysShowConnectionTabs {
|
||||
get {
|
||||
return ((bool)(this["AlwaysShowConnectionTabs"]));
|
||||
}
|
||||
set {
|
||||
this["AlwaysShowConnectionTabs"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -689,5 +689,8 @@
|
||||
<Setting Name="PlaceSearchBarAboveConnectionTree" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="AlwaysShowConnectionTabs" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
11
mRemoteV1/Resources/Language/Language.Designer.cs
generated
11
mRemoteV1/Resources/Language/Language.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace mRemoteNG {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Language {
|
||||
@@ -420,6 +420,15 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Always show connection tabs.
|
||||
/// </summary>
|
||||
internal static string strAlwaysShowConnectionTabs {
|
||||
get {
|
||||
return ResourceManager.GetString("strAlwaysShowConnectionTabs", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Always show panel selection dialog when opening connections.
|
||||
/// </summary>
|
||||
|
||||
@@ -2743,4 +2743,7 @@ This page will walk you through the process of upgrading your connections file o
|
||||
<data name="strTrackActiveConnectionInConnectionTree" xml:space="preserve">
|
||||
<value>Track active connection in the connection tree</value>
|
||||
</data>
|
||||
<data name="strAlwaysShowConnectionTabs" xml:space="preserve">
|
||||
<value>Always show connection tabs</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -32,7 +32,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.chkAlwaysShowPanelTabs = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkIdentifyQuickConnectTabs = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkAlwaysShowConnectionTabs = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkIdentifyQuickConnectTabs = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkOpenNewTabRightOfSelected = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkAlwaysShowPanelSelectionDlg = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
this.chkShowLogonInfoOnTabs = new mRemoteNG.UI.Controls.Base.NGCheckBox();
|
||||
@@ -54,13 +55,25 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkAlwaysShowPanelTabs.TabIndex = 0;
|
||||
this.chkAlwaysShowPanelTabs.Text = "Always show panel tabs";
|
||||
this.chkAlwaysShowPanelTabs.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkIdentifyQuickConnectTabs
|
||||
//
|
||||
this.chkIdentifyQuickConnectTabs._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
//
|
||||
// chkAlwaysShowConnectionTabs
|
||||
//
|
||||
this.chkAlwaysShowConnectionTabs._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkAlwaysShowConnectionTabs.AutoSize = true;
|
||||
this.chkAlwaysShowConnectionTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkAlwaysShowConnectionTabs.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkAlwaysShowConnectionTabs.Name = "chkAlwaysShowConnectionTabs";
|
||||
this.chkAlwaysShowConnectionTabs.Size = new System.Drawing.Size(200, 17);
|
||||
this.chkAlwaysShowConnectionTabs.TabIndex = 0;
|
||||
this.chkAlwaysShowConnectionTabs.Text = "Always show connection tabs";
|
||||
this.chkAlwaysShowConnectionTabs.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// chkIdentifyQuickConnectTabs
|
||||
//
|
||||
this.chkIdentifyQuickConnectTabs._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkIdentifyQuickConnectTabs.AutoSize = true;
|
||||
this.chkIdentifyQuickConnectTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkIdentifyQuickConnectTabs.Location = new System.Drawing.Point(3, 95);
|
||||
this.chkIdentifyQuickConnectTabs.Location = new System.Drawing.Point(3, 118);
|
||||
this.chkIdentifyQuickConnectTabs.Name = "chkIdentifyQuickConnectTabs";
|
||||
this.chkIdentifyQuickConnectTabs.Size = new System.Drawing.Size(315, 17);
|
||||
this.chkIdentifyQuickConnectTabs.TabIndex = 4;
|
||||
@@ -72,7 +85,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkOpenNewTabRightOfSelected._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkOpenNewTabRightOfSelected.AutoSize = true;
|
||||
this.chkOpenNewTabRightOfSelected.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkOpenNewTabRightOfSelected.Location = new System.Drawing.Point(3, 26);
|
||||
this.chkOpenNewTabRightOfSelected.Location = new System.Drawing.Point(3, 49);
|
||||
this.chkOpenNewTabRightOfSelected.Name = "chkOpenNewTabRightOfSelected";
|
||||
this.chkOpenNewTabRightOfSelected.Size = new System.Drawing.Size(309, 17);
|
||||
this.chkOpenNewTabRightOfSelected.TabIndex = 1;
|
||||
@@ -84,7 +97,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkAlwaysShowPanelSelectionDlg._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkAlwaysShowPanelSelectionDlg.AutoSize = true;
|
||||
this.chkAlwaysShowPanelSelectionDlg.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkAlwaysShowPanelSelectionDlg.Location = new System.Drawing.Point(3, 141);
|
||||
this.chkAlwaysShowPanelSelectionDlg.Location = new System.Drawing.Point(3, 164);
|
||||
this.chkAlwaysShowPanelSelectionDlg.Name = "chkAlwaysShowPanelSelectionDlg";
|
||||
this.chkAlwaysShowPanelSelectionDlg.Size = new System.Drawing.Size(347, 17);
|
||||
this.chkAlwaysShowPanelSelectionDlg.TabIndex = 6;
|
||||
@@ -96,7 +109,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkShowLogonInfoOnTabs._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkShowLogonInfoOnTabs.AutoSize = true;
|
||||
this.chkShowLogonInfoOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkShowLogonInfoOnTabs.Location = new System.Drawing.Point(3, 49);
|
||||
this.chkShowLogonInfoOnTabs.Location = new System.Drawing.Point(3, 72);
|
||||
this.chkShowLogonInfoOnTabs.Name = "chkShowLogonInfoOnTabs";
|
||||
this.chkShowLogonInfoOnTabs.Size = new System.Drawing.Size(226, 17);
|
||||
this.chkShowLogonInfoOnTabs.TabIndex = 2;
|
||||
@@ -108,7 +121,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkDoubleClickClosesTab._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkDoubleClickClosesTab.AutoSize = true;
|
||||
this.chkDoubleClickClosesTab.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkDoubleClickClosesTab.Location = new System.Drawing.Point(3, 118);
|
||||
this.chkDoubleClickClosesTab.Location = new System.Drawing.Point(3, 141);
|
||||
this.chkDoubleClickClosesTab.Name = "chkDoubleClickClosesTab";
|
||||
this.chkDoubleClickClosesTab.Size = new System.Drawing.Size(170, 17);
|
||||
this.chkDoubleClickClosesTab.TabIndex = 5;
|
||||
@@ -120,7 +133,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkShowProtocolOnTabs._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkShowProtocolOnTabs.AutoSize = true;
|
||||
this.chkShowProtocolOnTabs.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkShowProtocolOnTabs.Location = new System.Drawing.Point(3, 72);
|
||||
this.chkShowProtocolOnTabs.Location = new System.Drawing.Point(3, 95);
|
||||
this.chkShowProtocolOnTabs.Name = "chkShowProtocolOnTabs";
|
||||
this.chkShowProtocolOnTabs.Size = new System.Drawing.Size(180, 17);
|
||||
this.chkShowProtocolOnTabs.TabIndex = 3;
|
||||
@@ -132,7 +145,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.chkCreateEmptyPanelOnStart._mice = mRemoteNG.UI.Controls.Base.NGCheckBox.MouseState.HOVER;
|
||||
this.chkCreateEmptyPanelOnStart.AutoSize = true;
|
||||
this.chkCreateEmptyPanelOnStart.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.chkCreateEmptyPanelOnStart.Location = new System.Drawing.Point(3, 164);
|
||||
this.chkCreateEmptyPanelOnStart.Location = new System.Drawing.Point(3, 187);
|
||||
this.chkCreateEmptyPanelOnStart.Name = "chkCreateEmptyPanelOnStart";
|
||||
this.chkCreateEmptyPanelOnStart.Size = new System.Drawing.Size(271, 17);
|
||||
this.chkCreateEmptyPanelOnStart.TabIndex = 7;
|
||||
@@ -142,7 +155,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
//
|
||||
// txtBoxPanelName
|
||||
//
|
||||
this.txtBoxPanelName.Location = new System.Drawing.Point(43, 200);
|
||||
this.txtBoxPanelName.Location = new System.Drawing.Point(43, 246);
|
||||
this.txtBoxPanelName.Name = "txtBoxPanelName";
|
||||
this.txtBoxPanelName.Size = new System.Drawing.Size(213, 22);
|
||||
this.txtBoxPanelName.TabIndex = 8;
|
||||
@@ -150,7 +163,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
// lblPanelName
|
||||
//
|
||||
this.lblPanelName.AutoSize = true;
|
||||
this.lblPanelName.Location = new System.Drawing.Point(40, 184);
|
||||
this.lblPanelName.Location = new System.Drawing.Point(40, 230);
|
||||
this.lblPanelName.Name = "lblPanelName";
|
||||
this.lblPanelName.Size = new System.Drawing.Size(69, 13);
|
||||
this.lblPanelName.TabIndex = 9;
|
||||
@@ -164,7 +177,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
this.Controls.Add(this.txtBoxPanelName);
|
||||
this.Controls.Add(this.chkCreateEmptyPanelOnStart);
|
||||
this.Controls.Add(this.chkAlwaysShowPanelTabs);
|
||||
this.Controls.Add(this.chkIdentifyQuickConnectTabs);
|
||||
this.Controls.Add(this.chkAlwaysShowConnectionTabs);
|
||||
this.Controls.Add(this.chkIdentifyQuickConnectTabs);
|
||||
this.Controls.Add(this.chkOpenNewTabRightOfSelected);
|
||||
this.Controls.Add(this.chkAlwaysShowPanelSelectionDlg);
|
||||
this.Controls.Add(this.chkShowLogonInfoOnTabs);
|
||||
@@ -178,6 +192,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
|
||||
}
|
||||
internal Controls.Base.NGCheckBox chkAlwaysShowPanelTabs;
|
||||
internal Controls.Base.NGCheckBox chkAlwaysShowConnectionTabs;
|
||||
internal Controls.Base.NGCheckBox chkIdentifyQuickConnectTabs;
|
||||
internal Controls.Base.NGCheckBox chkOpenNewTabRightOfSelected;
|
||||
internal Controls.Base.NGCheckBox chkAlwaysShowPanelSelectionDlg;
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
base.ApplyLanguage();
|
||||
|
||||
chkAlwaysShowPanelTabs.Text = Language.strAlwaysShowPanelTabs;
|
||||
chkOpenNewTabRightOfSelected.Text = Language.strOpenNewTabRight;
|
||||
chkAlwaysShowConnectionTabs.Text = Language.strAlwaysShowConnectionTabs;
|
||||
chkOpenNewTabRightOfSelected.Text = Language.strOpenNewTabRight;
|
||||
chkShowLogonInfoOnTabs.Text = Language.strShowLogonInfoOnTabs;
|
||||
chkShowProtocolOnTabs.Text = Language.strShowProtocolOnTabs;
|
||||
chkIdentifyQuickConnectTabs.Text = Language.strIdentifyQuickConnectTabs;
|
||||
@@ -37,7 +38,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
base.SaveSettings();
|
||||
|
||||
chkAlwaysShowPanelTabs.Checked = Settings.Default.AlwaysShowPanelTabs;
|
||||
chkOpenNewTabRightOfSelected.Checked = Settings.Default.OpenTabsRightOfSelected;
|
||||
chkAlwaysShowConnectionTabs.Checked = Settings.Default.AlwaysShowConnectionTabs;
|
||||
chkOpenNewTabRightOfSelected.Checked = Settings.Default.OpenTabsRightOfSelected;
|
||||
chkShowLogonInfoOnTabs.Checked = Settings.Default.ShowLogonInfoOnTabs;
|
||||
chkShowProtocolOnTabs.Checked = Settings.Default.ShowProtocolOnTabs;
|
||||
chkIdentifyQuickConnectTabs.Checked = Settings.Default.IdentifyQuickConnectTabs;
|
||||
@@ -53,7 +55,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
||||
base.SaveSettings();
|
||||
|
||||
Settings.Default.AlwaysShowPanelTabs = chkAlwaysShowPanelTabs.Checked;
|
||||
FrmMain.Default.ShowHidePanelTabs();
|
||||
Settings.Default.AlwaysShowConnectionTabs = chkAlwaysShowConnectionTabs.Checked;
|
||||
FrmMain.Default.ShowHidePanelTabs();
|
||||
|
||||
Settings.Default.OpenTabsRightOfSelected = chkOpenNewTabRightOfSelected.Checked;
|
||||
Settings.Default.ShowLogonInfoOnTabs = chkShowLogonInfoOnTabs.Checked;
|
||||
|
||||
@@ -27,6 +27,7 @@ using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using TabControl = Crownwood.Magic.Controls.TabControl;
|
||||
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
@@ -594,7 +595,24 @@ namespace mRemoteNG.UI.Forms
|
||||
newDocumentStyle = nonConnectionPanelCount == 0 ? DocumentStyle.DockingSdi : DocumentStyle.DockingWindow;
|
||||
}
|
||||
|
||||
if (pnlDock.DocumentStyle == newDocumentStyle) return;
|
||||
foreach (var dockContent in pnlDock.Documents)
|
||||
{
|
||||
var document = (DockContent)dockContent;
|
||||
if (document is ConnectionWindow)
|
||||
{
|
||||
var connectionWindow = (ConnectionWindow)document;
|
||||
if (Settings.Default.AlwaysShowConnectionTabs == false)
|
||||
{
|
||||
connectionWindow.TabController.HideTabsMode = TabControl.HideTabsModes.HideAlways;
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionWindow.TabController.HideTabsMode = TabControl.HideTabsModes.ShowAlways;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pnlDock.DocumentStyle == newDocumentStyle) return;
|
||||
pnlDock.DocumentStyle = newDocumentStyle;
|
||||
pnlDock.Size = new Size(1, 1);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,10 @@ namespace mRemoteNG.UI.Window
|
||||
else
|
||||
TabController.TabPages.Add(nTab);
|
||||
|
||||
nTab.Selected = true;
|
||||
if (Settings.Default.AlwaysShowConnectionTabs == false)
|
||||
TabController.HideTabsMode = TabControl.HideTabsModes.HideAlways;
|
||||
|
||||
nTab.Selected = true;
|
||||
_ignoreChangeSelectedTabClick = false;
|
||||
|
||||
return nTab;
|
||||
|
||||
@@ -714,6 +714,9 @@
|
||||
<setting name="PlaceSearchBarAboveConnectionTree" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="AlwaysShowConnectionTabs" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</mRemoteNG.Settings>
|
||||
</userSettings>
|
||||
<applicationSettings>
|
||||
|
||||
Reference in New Issue
Block a user