Use Pascal case for method names to match C# conventions.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2022-01-31 11:37:34 +00:00
parent 59486541a5
commit 63c170310d
4 changed files with 23 additions and 23 deletions

View File

@ -87,7 +87,7 @@ namespace XenAdmin.Commands
VM vm = (VM)selection[0].XenObject;
var snapshotAllowed = vm.allowed_operations.Contains(vm_operations.snapshot);
Program.MainWindow.ConsolePanel.setCurrentSource(vm);
Program.MainWindow.ConsolePanel.SetCurrentSource(vm);
using (var dialog = new WarningDialog(string.Format(Messages.SNAPSHOT_REVERT_BLURB, _snapshot.Name()),
ThreeButtonDialog.ButtonYes, ThreeButtonDialog.ButtonNo)

View File

@ -84,7 +84,7 @@ namespace XenAdmin.Commands
{
if (dialog.ShowDialog(Parent) != DialogResult.Cancel && dialog.SnapshotName != null)
{
Program.Invoke(Program.MainWindow, () => Program.MainWindow.ConsolePanel.setCurrentSource(vm));
Program.Invoke(Program.MainWindow, () => Program.MainWindow.ConsolePanel.SetCurrentSource(vm));
return new VMSnapshotCreateAction(vm, dialog.SnapshotName, dialog.SnapshotDescription, dialog.SnapshotType,
(vmToSnapshot, username, password) =>
Program.MainWindow.ConsolePanel.Snapshot(

View File

@ -107,7 +107,7 @@ namespace XenAdmin.Controls
activeVNCView.UpdateRDPResolution(fullscreen);
}
internal void setCurrentSource(VM source)
internal void SetCurrentSource(VM source)
{
Program.AssertOnEventThread();
@ -145,7 +145,7 @@ namespace XenAdmin.Controls
var viewsToRemove = vncViews.Where(v => v.Key.opaque_ref != source.opaque_ref).Take(vncViews.Count - 1 - MAX_ACTIVE_VM_CONSOLES).ToList();
foreach (var view in viewsToRemove)
closeVNCForSource(view.Key);
CloseVncForSource(view.Key);
if (vncViews.ContainsKey(source))
{
@ -162,7 +162,7 @@ namespace XenAdmin.Controls
ClearErrorMessage();
}
internal virtual void setCurrentSource(Host source)
internal virtual void SetCurrentSource(Host source)
{
if (source == null)
{
@ -178,7 +178,7 @@ namespace XenAdmin.Controls
SetErrorMessage(Messages.VNC_COULD_NOT_FIND_CONSOLES);
}
else
setCurrentSource(dom0);
SetCurrentSource(dom0);
}
public static bool RbacDenied(VM source, out List<Role> allowedRoles)
@ -221,7 +221,7 @@ namespace XenAdmin.Controls
view = new VNCView(vm, elevatedUsername, elevatedPassword) { Dock = DockStyle.Fill };
else
{
setCurrentSource(vm);
SetCurrentSource(vm);
if (vncViews.ContainsKey(vm))
view = vncViews[vm];
}
@ -249,7 +249,7 @@ namespace XenAdmin.Controls
return snapshot;
}
public void closeVNCForSource(VM source)
public void CloseVncForSource(VM source)
{
Program.AssertOnEventThread();
@ -265,19 +265,19 @@ namespace XenAdmin.Controls
vncView.Dispose();
}
public void closeVNCForSource(VM source, bool vncOnly)
public void CloseVncForSource(VM source, bool vncOnly)
{
if (!vncViews.ContainsKey(source) || vncViews[source] == null
|| (vncOnly && !vncViews[source].IsVNC))
return;
closeVNCForSource(source);
CloseVncForSource(source);
}
protected void SetErrorMessage(string message)
{
errorLabel.Text = message;
tableLayoutPanelError.Visible = true;
setCurrentSource((VM)null);
SetCurrentSource((VM)null);
}
private void ClearErrorMessage()
@ -331,7 +331,7 @@ namespace XenAdmin.Controls
try
{
log.DebugFormat("ConsolePanel: closeVNCForSource({0}) in delegate", vm.Name());
closeVNCForSource(vm, true);
CloseVncForSource(vm, true);
}
catch (Exception exception)
{
@ -368,7 +368,7 @@ namespace XenAdmin.Controls
internal class CvmConsolePanel : ConsolePanel
{
internal override void setCurrentSource(Host source)
internal override void SetCurrentSource(Host source)
{
if (source == null)
{
@ -384,7 +384,7 @@ namespace XenAdmin.Controls
SetErrorMessage(Messages.VNC_COULD_NOT_FIND_CONSOLES);
}
else
setCurrentSource(cvm);
SetCurrentSource(cvm);
}
public override string HelpID => "TabPageCvmConsole";

View File

@ -290,9 +290,9 @@ namespace XenAdmin
ConsolePanel.ResetAllViews();
if (SelectionManager.Selection.FirstIsRealVM)
ConsolePanel.setCurrentSource((VM)SelectionManager.Selection.First);
ConsolePanel.SetCurrentSource((VM)SelectionManager.Selection.First);
else if (SelectionManager.Selection.FirstIs<Host>())
ConsolePanel.setCurrentSource((Host)SelectionManager.Selection.First);
ConsolePanel.SetCurrentSource((Host)SelectionManager.Selection.First);
UnpauseVNC(sender == TheTabControl);
}
@ -861,15 +861,15 @@ namespace XenAdmin
foreach (VM vm in con.Cache.VMs)
{
ConsolePanel.closeVNCForSource(vm);
ConsolePanel.CloseVncForSource(vm);
}
foreach (Host host in con.Cache.Hosts)
{
ConsolePanel.closeVNCForSource(host.ControlDomainZero());
ConsolePanel.CloseVncForSource(host.ControlDomainZero());
foreach (VM vm in host.OtherControlDomains())
CvmConsolePanel.closeVNCForSource(vm);
CvmConsolePanel.CloseVncForSource(vm);
}
con.EndConnect();
@ -1185,7 +1185,7 @@ namespace XenAdmin
if (o is VM)
{
VM vm = (VM)e.Element;
ConsolePanel.closeVNCForSource(vm);
ConsolePanel.CloseVncForSource(vm);
XenDialogBase.CloseAll(vm);
}
@ -1908,12 +1908,12 @@ namespace XenAdmin
{
if (SelectionManager.Selection.FirstIsRealVM)
{
ConsolePanel.setCurrentSource((VM)SelectionManager.Selection.First);
ConsolePanel.SetCurrentSource((VM)SelectionManager.Selection.First);
UnpauseVNC(e != null && sender == TheTabControl);
}
else if (SelectionManager.Selection.FirstIs<Host>())
{
ConsolePanel.setCurrentSource((Host)SelectionManager.Selection.First);
ConsolePanel.SetCurrentSource((Host)SelectionManager.Selection.First);
UnpauseVNC(e != null && sender == TheTabControl);
}
ConsolePanel.UpdateRDPResolution();
@ -1922,7 +1922,7 @@ namespace XenAdmin
{
if (SelectionManager.Selection.First is SR sr && sr.HasDriverDomain(out var vm))
{
CvmConsolePanel.setCurrentSource(vm);
CvmConsolePanel.SetCurrentSource(vm);
UnpauseVNC(e != null && sender == TheTabControl);
}
}