public override void PageLeave(XenAdmin.Controls.PageLoadedDirection direction, ref bool cancel) { if (!cancel) { bool targetDisconnected = cancel; Program.Invoke(Program.MainWindow, delegate { if (Connection == null || !Connection.IsConnected) { CrossPoolMigrateWizard.ShowWarningMessageBox(Messages.CPM_WIZARD_ERROR_TARGET_DISCONNECTED); targetDisconnected = true; } }); cancel = targetDisconnected; } if (!cancel && !CrossPoolMigrateWizard.AllVMsAvailable(selectedVMs)) { cancel = true; SetButtonNextEnabled(false); } base.PageLeave(direction, ref cancel); }
public override void PageLeave(XenAdmin.Controls.PageLoadedDirection direction, ref bool cancel) { if (!cancel) { bool targetDisconnected = cancel; Program.Invoke(Program.MainWindow, delegate { if (Connection == null || !Connection.IsConnected) { ShowWarningMessageBox(Messages.CPM_WIZARD_ERROR_TARGET_DISCONNECTED); targetDisconnected = true; } }); cancel = targetDisconnected; } base.PageLeave(direction, ref cancel); }