Merge remote-tracking branch 'refs/remotes/origin/develop' into release_channels

This commit is contained in:
Sean Kaim
2017-01-04 09:15:22 -05:00
3 changed files with 33 additions and 33 deletions

View File

@@ -1,11 +1,4 @@
using mRemoteNG.App.Info;
using mRemoteNG.App.Update;
using mRemoteNG.Config.Connections;
using mRemoteNG.Connection;
using mRemoteNG.Messages;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
using System;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
@@ -14,9 +7,15 @@ using System.IO;
using System.Management;
using System.Threading;
using System.Windows.Forms;
using mRemoteNG.App.Info;
using mRemoteNG.App.Update;
using mRemoteNG.Config.Connections;
using mRemoteNG.Config.Connections.Multiuser;
using mRemoteNG.Connection;
using mRemoteNG.Messages;
using mRemoteNG.Tools;
using mRemoteNG.UI;
using WeifenLuo.WinFormsUI.Docking;
using mRemoteNG.UI.Forms;
namespace mRemoteNG.App
{
@@ -47,24 +46,6 @@ namespace mRemoteNG.App
DefaultConnectionInheritance.Instance.LoadFrom(Settings.Default, a=>"InhDefault"+a);
}
public void SetDefaultLayout()
{
frmMain.Default.pnlDock.Visible = false;
frmMain.Default.pnlDock.DockLeftPortion = frmMain.Default.pnlDock.Width * 0.2;
frmMain.Default.pnlDock.DockRightPortion = frmMain.Default.pnlDock.Width * 0.2;
frmMain.Default.pnlDock.DockTopPortion = frmMain.Default.pnlDock.Height * 0.25;
frmMain.Default.pnlDock.DockBottomPortion = frmMain.Default.pnlDock.Height * 0.25;
Windows.TreePanel.Show(frmMain.Default.pnlDock, DockState.DockLeft);
Windows.ConfigPanel.Show(frmMain.Default.pnlDock);
Windows.ConfigPanel.DockTo(Windows.TreePanel.Pane, DockStyle.Bottom, -1);
Windows.ScreenshotForm.Hide();
frmMain.Default.pnlDock.Visible = true;
}
private static void GetConnectionIcons()
{
var iPath = GeneralAppInfo.HomePath + "\\Icons\\";
@@ -116,7 +97,7 @@ namespace mRemoteNG.App
{
Logger.Instance.WarnFormat($"Error retrieving operating system information from WMI. {ex.Message}");
}
var osData = string.Join(" ", new string[] { osVersion, servicePack });
var osData = string.Join(" ", osVersion, servicePack);
return osData;
}
@@ -209,7 +190,7 @@ namespace mRemoteNG.App
{
if (frmMain.Default.InvokeRequired)
{
frmMain.Default.Invoke(new AsyncCompletedEventHandler(GetUpdateInfoCompleted), new object[] { sender, e });
frmMain.Default.Invoke(new AsyncCompletedEventHandler(GetUpdateInfoCompleted), sender, e);
return;
}
@@ -311,7 +292,7 @@ namespace mRemoteNG.App
Settings.Default.CustomConsPath = GeneralAppInfo.HomePath + "\\" + cmd[ConsParam];
return;
}
else if (File.Exists(ConnectionsFileInfo.DefaultConnectionsPath + "\\" + cmd[ConsParam]))
if (File.Exists(ConnectionsFileInfo.DefaultConnectionsPath + "\\" + cmd[ConsParam]))
{
Settings.Default.LoadConsFromCustomLocation = true;
Settings.Default.CustomConsPath = ConnectionsFileInfo.DefaultConnectionsPath + "\\" + cmd[ConsParam];

View File

@@ -48,7 +48,7 @@ namespace mRemoteNG.Config.Settings
}
else
{
Startup.Instance.SetDefaultLayout();
frmMain.Default.SetDefaultLayout();
}
}
catch (Exception ex)

View File

@@ -164,7 +164,7 @@ namespace mRemoteNG.UI.Forms
ConnectionTreeWindow = Windows.TreeForm;
}
private void ApplyLanguage()
private void ApplyLanguage()
{
mMenFile.Text = Language.strMenuFile;
mMenFileNew.Text = Language.strMenuNewConnectionFile;
@@ -426,6 +426,7 @@ namespace mRemoteNG.UI.Forms
private void mMenFile_DropDownOpening(object sender, EventArgs e)
{
var selectedNodeType = ConnectionTreeWindow.SelectedNode?.GetTreeNodeType();
// ReSharper disable once SwitchStatementMissingSomeCases
switch (selectedNodeType)
{
case TreeNodeType.Root:
@@ -733,7 +734,7 @@ namespace mRemoteNG.UI.Forms
MessageBoxIcon.Question);
if (msgBoxResult == DialogResult.Yes)
{
Startup.Instance.SetDefaultLayout();
Default.SetDefaultLayout();
}
}
@@ -1201,6 +1202,24 @@ namespace mRemoteNG.UI.Forms
_systemMenu.InsertMenuItem(_systemMenu.SystemMenuHandle, 0, SystemMenu.Flags.MF_POPUP | SystemMenu.Flags.MF_BYPOSITION, popMen, Language.strSendTo);
_systemMenu.InsertMenuItem(_systemMenu.SystemMenuHandle, 1, SystemMenu.Flags.MF_BYPOSITION | SystemMenu.Flags.MF_SEPARATOR, IntPtr.Zero, null);
}
public void SetDefaultLayout()
{
Default.pnlDock.Visible = false;
Default.pnlDock.DockLeftPortion = Default.pnlDock.Width * 0.2;
Default.pnlDock.DockRightPortion = Default.pnlDock.Width * 0.2;
Default.pnlDock.DockTopPortion = Default.pnlDock.Height * 0.25;
Default.pnlDock.DockBottomPortion = Default.pnlDock.Height * 0.25;
Windows.TreePanel.Show(Default.pnlDock, DockState.DockLeft);
Windows.ConfigPanel.Show(Default.pnlDock);
Windows.ConfigPanel.DockTo(Windows.TreePanel.Pane, DockStyle.Bottom, -1);
Windows.ScreenshotForm.Hide();
Default.pnlDock.Visible = true;
}
#endregion
#region Events