remove references to Windows.TreePanel

This commit is contained in:
David Sparer
2017-02-03 10:43:42 -07:00
parent 745b85a3ac
commit 789e467573
4 changed files with 13 additions and 15 deletions

View File

@@ -25,8 +25,7 @@ namespace mRemoteNG.App
private static ComponentsCheckWindow _componentscheckForm;
private static DockContent _componentscheckPanel = new DockContent();
public static ConnectionTreeWindow TreeForm { get; set; }
public static DockContent TreePanel { get; set; } = new DockContent();
public static ConnectionTreeWindow TreeForm { get; set; } = new ConnectionTreeWindow();
public static ConfigWindow ConfigForm { get; set; } = new ConfigWindow();
public static ErrorAndInfoWindow ErrorsForm { get; set; } = new ErrorAndInfoWindow();
public static ScreenshotManagerWindow ScreenshotForm { get; set; }

View File

@@ -21,8 +21,6 @@ namespace mRemoteNG.Config.Settings
{
try
{
Windows.TreePanel = null;
while (_mainForm.pnlDock.Contents.Count > 0)
{
var dc = (DockContent)_mainForm.pnlDock.Contents[0];
@@ -67,7 +65,7 @@ namespace mRemoteNG.Config.Settings
return Windows.ConfigForm;
if (persistString == typeof(ConnectionTreeWindow).ToString())
return Windows.TreePanel;
return Windows.TreeForm;
if (persistString == typeof(ErrorAndInfoWindow).ToString())
return Windows.ErrorsForm;
@@ -86,10 +84,7 @@ namespace mRemoteNG.Config.Settings
private void CreatePanels()
{
Windows.ConfigForm = new ConfigWindow();
Windows.TreeForm = new ConnectionTreeWindow(Windows.TreePanel);
Windows.TreePanel = Windows.TreeForm;
Windows.TreeForm = new ConnectionTreeWindow();
Windows.ErrorsForm = new ErrorAndInfoWindow();
Windows.ScreenshotForm = new ScreenshotManagerWindow(Windows.ScreenshotPanel);

View File

@@ -227,7 +227,7 @@ namespace mRemoteNG.UI.Forms
if (upgradeMap != null)
ApplyCredentialMapping(upgradeMap);
Windows.TreePanel.Focus();
Windows.TreeForm.Focus();
PuttySessionsManager.Instance.StartWatcher();
if (Settings.Default.StartupComponentsCheck)
@@ -750,12 +750,12 @@ namespace mRemoteNG.UI.Forms
{
if (mMenViewConnections.Checked == false)
{
Windows.TreePanel.Show(pnlDock);
Windows.TreeForm.Show(pnlDock);
mMenViewConnections.Checked = true;
}
else
{
Windows.TreePanel.Hide();
Windows.TreeForm.Hide();
mMenViewConnections.Checked = false;
}
}
@@ -804,7 +804,7 @@ namespace mRemoteNG.UI.Forms
private void mMenViewJumpToConnectionsConfig_Click(object sender, EventArgs e)
{
if (pnlDock.ActiveContent == Windows.TreePanel)
if (pnlDock.ActiveContent == Windows.TreeForm)
{
Windows.ConfigForm.Activate();
}
@@ -1307,9 +1307,9 @@ namespace mRemoteNG.UI.Forms
Default.pnlDock.DockTopPortion = Default.pnlDock.Height * 0.25;
Default.pnlDock.DockBottomPortion = Default.pnlDock.Height * 0.25;
Windows.TreePanel.Show(Default.pnlDock, DockState.DockLeft);
Windows.TreeForm.Show(Default.pnlDock, DockState.DockLeft);
Windows.ConfigForm.Show(Default.pnlDock);
Windows.ConfigForm.DockTo(Windows.TreePanel.Pane, DockStyle.Bottom, -1);
Windows.ConfigForm.DockTo(Windows.TreeForm.Pane, DockStyle.Bottom, -1);
Windows.ErrorsForm.Show(Default.pnlDock, DockState.Document);
Windows.ErrorsForm.Hide();

View File

@@ -25,6 +25,10 @@ namespace mRemoteNG.UI.Window
{
get { return olvConnections; }
set { olvConnections = value; }
}
public ConnectionTreeWindow() : this(new DockContent())
{
}
public ConnectionTreeWindow(DockContent panel)