mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
refactoring menu (preparation for RBAC)
This commit is contained in:
@@ -249,9 +249,7 @@ namespace mRemoteNG.Config.Settings
|
||||
|
||||
private void SetToolstripGripStyle(ToolStrip toolbar)
|
||||
{
|
||||
toolbar.GripStyle = Properties.Settings.Default.LockToolbars
|
||||
? ToolStripGripStyle.Hidden
|
||||
: ToolStripGripStyle.Visible;
|
||||
toolbar.GripStyle = Properties.Settings.Default.LockToolbars ? ToolStripGripStyle.Hidden : ToolStripGripStyle.Visible;
|
||||
}
|
||||
|
||||
private ToolStripPanel ToolStripPanelFromString(string panel)
|
||||
|
||||
@@ -249,13 +249,10 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
private void LockToolbarPositions(bool shouldBeLocked)
|
||||
{
|
||||
var toolbars = new ToolStrip[]
|
||||
{_quickConnectToolStrip, _multiSshToolStrip, _externalToolsToolStrip, msMain};
|
||||
var toolbars = new ToolStrip[] {_quickConnectToolStrip, _multiSshToolStrip, _externalToolsToolStrip, msMain};
|
||||
foreach (var toolbar in toolbars)
|
||||
{
|
||||
toolbar.GripStyle = shouldBeLocked
|
||||
? ToolStripGripStyle.Hidden
|
||||
: ToolStripGripStyle.Visible;
|
||||
toolbar.GripStyle = shouldBeLocked ? ToolStripGripStyle.Hidden : ToolStripGripStyle.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,8 +312,7 @@ namespace mRemoteNG.UI.Forms
|
||||
vsToolStripExtender.SetStyle(_multiSshToolStrip, _themeManager.ActiveTheme.Version, _themeManager.ActiveTheme.Theme);
|
||||
|
||||
if (!_themeManager.ActiveAndExtended) return;
|
||||
tsContainer.TopToolStripPanel.BackColor =
|
||||
_themeManager.ActiveTheme.ExtendedPalette.getColor("CommandBarMenuDefault_Background");
|
||||
tsContainer.TopToolStripPanel.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("CommandBarMenuDefault_Background");
|
||||
BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
@@ -120,14 +119,14 @@
|
||||
<metadata name="msMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>688, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_quickConnectToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>905, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_multiSshToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1010, 17</value>
|
||||
</metadata>
|
||||
<metadata name="_externalToolsToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>510, 17</value>
|
||||
<metadata name="toolStrip3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1115, 17</value>
|
||||
</metadata>
|
||||
<metadata name="tmrAutoSave.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>783, 17</value>
|
||||
|
||||
33
mRemoteNG/UI/Menu/msExternalTools/externalToolsMenu.cs
Normal file
33
mRemoteNG/UI/Menu/msExternalTools/externalToolsMenu.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using mRemoteNG.UI.Window;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Panels;
|
||||
|
||||
namespace mRemoteNG.UI.Menu.msExternalTools
|
||||
{
|
||||
public partial class externalToolsMenu : ToolStripMenuItem
|
||||
{
|
||||
public externalToolsMenu()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
public externalToolsMenu(IContainer container)
|
||||
{
|
||||
container.Add(this);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
23
mRemoteNG/UI/Menu/msMultiSSH/multiSsh.cs
Normal file
23
mRemoteNG/UI/Menu/msMultiSSH/multiSsh.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace mRemoteNG.UI.Menu.msMultiSSH
|
||||
{
|
||||
public partial class multiSsh : ToolStripMenuItem
|
||||
{
|
||||
public multiSsh()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
23
mRemoteNG/UI/Menu/msQuickConnect/quickConnect.cs
Normal file
23
mRemoteNG/UI/Menu/msQuickConnect/quickConnect.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace mRemoteNG.UI.Menu.msQuickConnect
|
||||
{
|
||||
public partial class quickConnect : ToolStripMenuItem
|
||||
{
|
||||
public quickConnect()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user