mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Since it is easy to forget calling the base class method at the beginning of the
PageLoaded override in derived classes, enforce it by wrapping the page specific code in a new virtual method, which the derived classes can override and PageLoaded can call after its own logic. Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
parent
7a1b1a6dcc
commit
ee648135f6
@ -131,11 +131,7 @@ namespace XenAdmin.Controls
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Always remember to call the base method in the BEGINNING when overriding this in derived classes
|
||||
/// so the page gets populated
|
||||
/// </summary>
|
||||
public virtual void PageLoaded(PageLoadedDirection direction)
|
||||
public void PageLoaded(PageLoadedDirection direction)
|
||||
{
|
||||
if (direction == PageLoadedDirection.Forward && IsFirstLoad)
|
||||
{
|
||||
@ -145,6 +141,12 @@ namespace XenAdmin.Controls
|
||||
PopulatePage();
|
||||
IsFirstLoad = false;
|
||||
}
|
||||
|
||||
PageLoadedCore(direction);
|
||||
}
|
||||
|
||||
protected virtual void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
}
|
||||
|
||||
public void PageLeave(PageLoadedDirection direction, ref bool cancel)
|
||||
|
@ -88,9 +88,8 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
|
||||
return m_buttonNextEnabled;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
PerformCheck(CheckPathValid, CheckCredentialsEntered);
|
||||
}
|
||||
|
||||
|
@ -77,10 +77,8 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
RunAction(CapabilityList, SelectedHosts);
|
||||
}
|
||||
|
@ -81,9 +81,8 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
|
||||
return wizardCheckAnyChecked();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
{
|
||||
ClearButton.Enabled = wizardCheckAnyChecked();
|
||||
|
@ -78,9 +78,8 @@ namespace XenAdmin.Wizards.BugToolWizardFiles
|
||||
return HostListTreeView.CheckedItems().Count > 0;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
EnableDisableButtons();
|
||||
}
|
||||
|
||||
|
@ -75,9 +75,8 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
var crossPoolRestricted = Helpers.FeatureForbidden(Connection, Host.RestrictCrossPoolMigrate);
|
||||
warningsTable.Visible = crossPoolRestricted;
|
||||
crossPoolRadioButton.Enabled = crossPoolDescriptionLabel.Enabled = !crossPoolRestricted;
|
||||
|
@ -64,9 +64,8 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
|
||||
InitializeText();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
PopulateComboBox();
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,8 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
SetButtonsEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -94,9 +94,8 @@ namespace XenAdmin.Wizards.CrossPoolMigrateWizard
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
SetButtonsEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -113,9 +113,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
get { return selectedPoolMetadata; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
{
|
||||
SetupLabels();
|
||||
|
@ -79,10 +79,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
SetupLabels();
|
||||
}
|
||||
|
@ -132,9 +132,9 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
}
|
||||
|
||||
private BackgroundWorker _worker = null;
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
SetupLabels();
|
||||
|
||||
try
|
||||
|
@ -165,9 +165,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
|
||||
public Dictionary<XenRef<VDI>, PoolMetadata> SelectedPoolMetadata { private get; set; }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Back || actions.Count > 0)
|
||||
return;
|
||||
|
||||
|
@ -99,10 +99,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (SummaryRetreiver == null)
|
||||
return;
|
||||
|
||||
|
@ -114,9 +114,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
SetupLabels();
|
||||
}
|
||||
|
@ -78,9 +78,8 @@ namespace XenAdmin.Wizards.DRWizards
|
||||
return radioButtonFailover.Checked || radioButtonFailback.Checked || radioButtonDryrun.Checked;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
{
|
||||
labelFailoverDescription.Text = String.Format(labelFailoverDescription.Text, Connection.Name);
|
||||
|
@ -107,9 +107,8 @@ namespace XenAdmin.Wizards.ExportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
PerformCheck(CheckPathValid);
|
||||
}
|
||||
|
@ -79,9 +79,8 @@ namespace XenAdmin.Wizards.ExportWizard
|
||||
/// </summary>
|
||||
public override string HelpID { get { return "ExportEula"; } }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
SetAddButtonEnabledState();
|
||||
SetRemoveButtonEnabledState();
|
||||
SetViewButtonEnabledState();
|
||||
|
@ -126,9 +126,8 @@ namespace XenAdmin.Wizards.ExportWizard
|
||||
/// </summary>
|
||||
public override string HelpID { get { return "ExportOptions"; } }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
SetButtonNextEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -111,9 +111,8 @@ namespace XenAdmin.Wizards.ExportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction); //call first so the page gets populated
|
||||
m_ctrlError.HideError();
|
||||
EnableButtons();
|
||||
}
|
||||
|
@ -215,9 +215,8 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
RefreshTab(null);
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,10 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
checksPerConnectionDict.Clear();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
RegisterConnectionEvents();
|
||||
RefreshPage();
|
||||
base.PageLoaded(direction);
|
||||
}
|
||||
|
||||
void Connection_ConnectionResult(object sender, ConnectionResultEventArgs e)
|
||||
|
@ -168,9 +168,8 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
|
||||
#region Base class (XenTabPage) overrides
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
ChosenItem = null;
|
||||
restoreGridHomeServerSelection = (direction == PageLoadedDirection.Back);
|
||||
}
|
||||
|
@ -104,9 +104,8 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
targetConnection = null;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
SetButtonPreviousEnabled(true);
|
||||
SetButtonNextEnabled(true);
|
||||
}
|
||||
|
@ -161,9 +161,8 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
cancel = !PerformCheck(CheckStorageRequirements);
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
SetButtonPreviousEnabled(true);
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,8 @@ namespace XenAdmin.Wizards.GenericPages
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
m_buttonNextEnabled = true;
|
||||
OnPageUpdated();
|
||||
}
|
||||
|
@ -691,9 +691,8 @@ namespace XenAdmin.Wizards.HAWizard_Pages
|
||||
StopNtolUpdate();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
StartNtolUpdate();
|
||||
}
|
||||
|
||||
|
@ -58,10 +58,8 @@ namespace XenAdmin.Wizards.HAWizard_Pages
|
||||
ClearControls();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
labelSr.Text = HeartbeatSrName.Ellipsise(50);
|
||||
labelNtol.Text = Ntol.ToString();
|
||||
labelRestart.Text = GetVmNumber(AlwaysRestart);
|
||||
|
@ -76,9 +76,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
CheckEulaAccepted();
|
||||
}
|
||||
|
||||
|
@ -78,10 +78,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
SetButtonNextEnabled(OkToProceed());
|
||||
}
|
||||
|
@ -72,10 +72,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
{
|
||||
ShowWarning(null);
|
||||
|
@ -84,9 +84,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);//call first so the page gets populated
|
||||
m_buttonNextEnabled = true;
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,8 @@ namespace XenAdmin.Wizards.ImportWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
m_buttonNextText = (direction == PageLoadedDirection.Forward) ? Messages.IMPORT_VM_IMPORT : Messages.WIZARD_BUTTON_NEXT;
|
||||
}
|
||||
|
||||
|
@ -76,9 +76,8 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
|
||||
return Details.Valid;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
}
|
||||
|
@ -64,9 +64,8 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
|
||||
return SelectedInterface != null;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
|
||||
|
@ -66,9 +66,8 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
|
||||
return (SelectedHostNic != null || !comboBoxNICList.Visible) && !labelVlanError.Visible;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
|
||||
|
@ -59,9 +59,8 @@ namespace XenAdmin.Wizards.NewNetworkWizard_Pages
|
||||
return txtName.Text.Trim().Length > 0;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,8 @@ namespace XenAdmin.Wizards.NewPolicyWizard
|
||||
get { return "Finish"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
textBoxSummary.Text = Summary;
|
||||
checkBox1.Enabled = SelectedVMsCount > 0;
|
||||
}
|
||||
|
@ -93,9 +93,8 @@ namespace XenAdmin.Wizards.NewPolicyWizard
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
EnableShapshotTypes(Connection, false);
|
||||
}
|
||||
|
@ -115,9 +115,8 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
|
||||
public override string HelpID { get { return "Location_ISCSI"; } }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
HelpersGUI.PerformIQNCheck();
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
|
@ -106,10 +106,8 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages.Frontends
|
||||
nfsVersionLabel.Visible = nfsVersionTableLayoutPanel.Visible = Helpers.DundeeOrGreater(Connection);
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
|
@ -71,10 +71,8 @@ namespace XenAdmin.Wizards.NewSRWizard_Pages
|
||||
return m_srWizardType.SrToReattach == null || MatchingFrontends > 1;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (direction == PageLoadedDirection.Forward)
|
||||
HelpersGUI.FocusFirstControl(Controls);
|
||||
}
|
||||
|
@ -71,9 +71,8 @@ namespace XenAdmin.Wizards.NewVMApplianceWizard
|
||||
|
||||
public string Summary { private get; set; }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
textBoxSummary.Text = Summary;
|
||||
}
|
||||
}
|
||||
|
@ -91,10 +91,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (SelectedTemplate == vmOrTemplate)
|
||||
return;
|
||||
|
||||
|
@ -49,10 +49,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
VM template = SelectedTemplate;
|
||||
|
||||
if (!template.Equals(_template))
|
||||
|
@ -73,10 +73,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
get { return "CPU&Memory"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (SelectedTemplate == Template)
|
||||
return;
|
||||
|
||||
|
@ -73,9 +73,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
SummaryGridView.Rows.Clear();
|
||||
|
||||
if (SummaryRetreiver == null)
|
||||
|
@ -81,10 +81,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
return affinityPicker1.ValidState();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
// if not using CD, use selected template storage host
|
||||
// if using CD use CD or template storage host);
|
||||
|
||||
|
@ -64,9 +64,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
public bool ShowBootParameters { get { return !SelectedTemplate.IsHVM(); } }
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
VM oldTemplate = m_template;
|
||||
m_template = SelectedTemplate;
|
||||
|
||||
|
@ -73,9 +73,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
return !string.IsNullOrEmpty(SelectedName);
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (SelectedTemplate == Template)
|
||||
return;
|
||||
|
||||
|
@ -76,9 +76,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
VM template = SelectedTemplate;
|
||||
string vmName = SelectedName;
|
||||
|
||||
|
@ -70,9 +70,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
get { return "Storage"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
VM template = SelectedTemplate;
|
||||
bool installMethodIsNetwork = SelectedInstallMethod == InstallMethod.Network;
|
||||
|
||||
|
@ -58,9 +58,8 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
|
||||
#region XentabPage overrides
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
if (!templatesLoaded)
|
||||
PopulateTemplatesBox();
|
||||
templatesLoaded = true;
|
||||
|
@ -122,10 +122,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
base.PageCancelled();
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (_thisPageIsCompleted)
|
||||
{
|
||||
return;
|
||||
|
@ -87,10 +87,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
set;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
textBoxLog.Clear();
|
||||
|
||||
var unknownType = false;
|
||||
|
@ -120,10 +120,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
return _cancelEnabled;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
if (_thisPageHasBeenCompleted)
|
||||
{
|
||||
actionsWorker = null;
|
||||
|
@ -120,9 +120,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
try
|
||||
{
|
||||
RegisterEventHandlers();
|
||||
|
@ -133,9 +133,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
get { return "SelectUpdate"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
Updates.CheckForUpdatesStarted += CheckForUpdates_CheckForUpdatesStarted;
|
||||
Updates.CheckForUpdatesCompleted += CheckForUpdates_CheckForUpdatesCompleted;
|
||||
Updates.RestoreDismissedUpdatesStarted += Updates_RestoreDismissedUpdatesStarted;
|
||||
|
@ -92,9 +92,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
get { return "SelectServers"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
try
|
||||
{
|
||||
poolSelectionOnly = WizardMode == WizardMode.AutomatedUpdates || SelectedUpdateAlert != null || FileFromDiskAlert != null;
|
||||
|
@ -91,10 +91,8 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
|
||||
#endregion
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
canUpload = true;
|
||||
canDownload = true;
|
||||
UpdateButtons();
|
||||
|
@ -105,9 +105,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
return Messages.START_UPGRADE;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
listBox.Items.Clear();
|
||||
foreach (var master in SelectedMasters)
|
||||
{
|
||||
|
@ -110,9 +110,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
return UpgradeStatus == RollingUpgradeStatus.NotStarted || UpgradeStatus == RollingUpgradeStatus.Started;
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
UpgradeStatus = RollingUpgradeStatus.NotStarted;
|
||||
ImageAnimator.Animate(animatedImage, onFrameChanged);
|
||||
if (direction == PageLoadedDirection.Forward && planActions.Count > 0)
|
||||
|
@ -78,7 +78,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
Program.Invoke(Program.MainWindow, RefreshRechecks);
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
if (direction == PageLoadedDirection.Back)
|
||||
{
|
||||
@ -104,7 +104,6 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
AddEventHandlersToMasters();
|
||||
labelPrechecksFirstLine.Text = Messages.ROLLINGUPGRADE_PRECHECKS;
|
||||
RefreshRechecks();
|
||||
return;
|
||||
}
|
||||
|
||||
protected override void PageLeaveCore(PageLoadedDirection direction, ref bool cancel)
|
||||
|
@ -175,10 +175,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
}
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
|
||||
BuildServerList();
|
||||
}
|
||||
|
||||
|
@ -62,9 +62,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
|
||||
get { return "Beforeyoustart"; }
|
||||
}
|
||||
|
||||
public override void PageLoaded(PageLoadedDirection direction)
|
||||
protected override void PageLoadedCore(PageLoadedDirection direction)
|
||||
{
|
||||
base.PageLoaded(direction);
|
||||
labelRunningOnBattery.Visible = PowerManagement.CheckBatteryDischarging();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user