mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
use panel setting from connection info unless empty or overriden
fixes #1425
This commit is contained in:
@@ -162,34 +162,15 @@ namespace mRemoteNG.Connection
|
||||
|
||||
private static string SetConnectionPanel(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
|
||||
{
|
||||
string connectionPanel;
|
||||
if (connectionInfo.Panel == "" || force.HasFlag(ConnectionInfo.Force.OverridePanel) ||
|
||||
Settings.Default.AlwaysShowPanelSelectionDlg)
|
||||
{
|
||||
var frmPnl = new FrmChoosePanel();
|
||||
if (frmPnl.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
connectionPanel = frmPnl.Panel;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Return the current panel if exist, if not return default panel
|
||||
if (TabHelper.Instance.CurrentPanel != null)
|
||||
{
|
||||
connectionPanel = TabHelper.Instance.CurrentPanel.TabText;
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionPanel = connectionInfo.Panel;
|
||||
}
|
||||
}
|
||||
if (connectionInfo.Panel != "" &&
|
||||
!force.HasFlag(ConnectionInfo.Force.OverridePanel) &&
|
||||
!Settings.Default.AlwaysShowPanelSelectionDlg)
|
||||
return connectionInfo.Panel;
|
||||
|
||||
return connectionPanel;
|
||||
var frmPnl = new FrmChoosePanel();
|
||||
return frmPnl.ShowDialog() == DialogResult.OK
|
||||
? frmPnl.Panel
|
||||
: null;
|
||||
}
|
||||
|
||||
private Form SetConnectionForm(Form conForm, string connectionPanel)
|
||||
|
||||
Reference in New Issue
Block a user