CP-10955: rework comments

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
Cheng Zhang 2015-01-28 10:02:19 +08:00
parent 2238b0ac1f
commit c6ccae79d3
2 changed files with 5 additions and 3 deletions

View File

@ -84,6 +84,8 @@ namespace XenAdmin.ConsoleView
private bool RDPControlEnabled { get { return source != null ? source.RDPControlEnabled : false; } }
public bool IsRDPControlEnabled() { return RDPControlEnabled; }
public VNCTabView(VNCView parent, VM source, string elevatedUsername, string elevatedPassword)
{
Program.AssertOnEventThread();
@ -543,7 +545,7 @@ namespace XenAdmin.ConsoleView
{
log.DebugFormat("'{0}' console: Starting RDP polling. (RDP polling is enabled in settings.)", source);
toggleConsoleButton.Visible = true;
if(Helpers.CreamOrGreater(source.Connection))
if(Helpers.CreamOrGreater(source.Connection) && RDPControlEnabled)
toggleConsoleButton.Enabled = true;
else
toggleConsoleButton.Enabled = false;
@ -1192,7 +1194,7 @@ namespace XenAdmin.ConsoleView
}
}
if (vncScreen.rdpIP == null && vncScreen.UseVNC && Properties.Settings.Default.EnableRDPPolling && (!Helpers.CreamOrGreater(source.Connection) || tryToConnectRDP))
if (vncScreen.rdpIP == null && vncScreen.UseVNC && Properties.Settings.Default.EnableRDPPolling && (!(Helpers.CreamOrGreater(source.Connection) && RDPControlEnabled) || tryToConnectRDP))
{
toggleConsoleButton.Enabled = false;
}

View File

@ -686,7 +686,7 @@ namespace XenAdmin.ConsoleView
private void startPolling()
{
//Disable the button first, but only if in text/default console (to allow user to return to the text console - ref. CA-70314)
if (Helpers.CreamOrGreater(Source.Connection))
if (Helpers.CreamOrGreater(Source.Connection) && parentVNCTabView.IsRDPControlEnabled())
{
parentVNCTabView.EnableToggleVNCButton();
}