minor cleanup

This commit is contained in:
Sean Kaim
2019-01-03 11:41:30 -05:00
parent 132713f274
commit 3ab3b79bc7
3 changed files with 4 additions and 9 deletions

View File

@@ -3,7 +3,6 @@ using System.Diagnostics;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.App.Info;
using mRemoteNG.Connection;
namespace mRemoteNG.UI.Menu
{

View File

@@ -445,15 +445,13 @@ namespace mRemoteNG.UI.Menu
if (Runtime.WindowList == null || Runtime.WindowList.Count == 0) return;
foreach (BaseWindow window in Runtime.WindowList)
{
var connectionWindow = window as ConnectionWindow;
if (connectionWindow == null)
if (!(window is ConnectionWindow connectionWindow))
return;
var icList = new List<InterfaceControl>();
foreach (Crownwood.Magic.Controls.TabPage tab in connectionWindow.TabController.TabPages)
{
var tag = tab.Tag as InterfaceControl;
if (tag != null)
if (tab.Tag is InterfaceControl tag)
{
icList.Add(tag);
}

View File

@@ -158,8 +158,7 @@ namespace mRemoteNG.UI.Menu
//
_mMenViewJumpToConnectionsConfig.Image = Resources.Root;
_mMenViewJumpToConnectionsConfig.Name = "mMenViewJumpToConnectionsConfig";
_mMenViewJumpToConnectionsConfig.ShortcutKeys = ((Keys)(((Keys.Control | Keys.Alt)
| Keys.C)));
_mMenViewJumpToConnectionsConfig.ShortcutKeys = Keys.Control | Keys.Alt | Keys.C;
_mMenViewJumpToConnectionsConfig.Size = new System.Drawing.Size(258, 22);
_mMenViewJumpToConnectionsConfig.Text = Language.strMenuConnectionsAndConfig;
_mMenViewJumpToConnectionsConfig.Click += mMenViewJumpToConnectionsConfig_Click;
@@ -168,8 +167,7 @@ namespace mRemoteNG.UI.Menu
//
_mMenViewJumpToErrorsInfos.Image = Resources.InformationSmall;
_mMenViewJumpToErrorsInfos.Name = "mMenViewJumpToErrorsInfos";
_mMenViewJumpToErrorsInfos.ShortcutKeys = ((Keys)(((Keys.Control | Keys.Alt)
| Keys.E)));
_mMenViewJumpToErrorsInfos.ShortcutKeys = Keys.Control | Keys.Alt | Keys.E;
_mMenViewJumpToErrorsInfos.Size = new System.Drawing.Size(258, 22);
_mMenViewJumpToErrorsInfos.Text = Language.strMenuNotifications;
_mMenViewJumpToErrorsInfos.Click += mMenViewJumpToErrorsInfos_Click;