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:
Konstantina Chremmou 2018-03-09 00:31:46 +00:00 committed by Mihaela Stoica
parent 7a1b1a6dcc
commit ee648135f6
65 changed files with 81 additions and 159 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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;

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();

View File

@ -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();
}

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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();
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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();

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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);
}

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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);

View File

@ -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();
}

View File

@ -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());
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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);
}

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -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))

View File

@ -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;

View File

@ -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)

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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)
{

View File

@ -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)

View File

@ -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)

View File

@ -175,10 +175,8 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
}
}
public override void PageLoaded(PageLoadedDirection direction)
protected override void PageLoadedCore(PageLoadedDirection direction)
{
base.PageLoaded(direction);
BuildServerList();
}

View File

@ -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();
}
}