private void DRFailoverWizardWelcomePage_WizardTypeChanged(DRWizardType type) { WizardType = type; switch (type) { case DRWizardType.Failover: Text = string.Format(Messages.DR_WIZARD_FAILOVER_TITLE, xenConnection.Name); pictureBoxWizard.Image = Images.StaticImages._000_Failover_h32bit_32; break; case DRWizardType.Failback: Text = string.Format(Messages.DR_WIZARD_FAILBACK_TITLE, xenConnection.Name); pictureBoxWizard.Image = Images.StaticImages._000_Failback_h32bit_32; break; case DRWizardType.Dryrun: Text = string.Format(Messages.DR_WIZARD_DRYRUN_TITLE, xenConnection.Name); pictureBoxWizard.Image = Images.StaticImages._000_TestFailover_h32bit_32; break; default: pictureBoxWizard.Image = Images.StaticImages._000_DisasterRecovery_h32bit_32; break; } DRFailoverWizardReportPage1.WizardType = WizardType; DRFailoverWizardStoragePage1.WizardType = WizardType; DRFailoverWizardAppliancesPage1.WizardType = WizardType; DRFailoverWizardRecoverPage1.WizardType = WizardType; DRFailoverWizardFirstPage.WizardType = WizardType; DRFailoverWizardPrecheckPage1.WizardType = WizardType; }
private void OnWizardTypeChaged(DRWizardType wizardType) { m_wizardType = wizardType; if (WizardTypeChanged != null) { WizardTypeChanged(wizardType); } OnPageUpdated(); }
public DRFailoverWizard(Pool pool, DRWizardType wizardType) : base(pool.Connection) { InitializeComponent(); RBACWarningPage = new RBACWarningPage(); DRFailoverWizardFirstPage = new DRFailoverWizardFirstPage(); DRFailoverWizardStoragePage1 = new DRFailoverWizardStoragePage(); DRFailoverWizardPrecheckPage1 = new DRFailoverWizardPrecheckPage(); DRFailoverWizardRecoverPage1 = new DRFailoverWizardRecoverPage(); DRFailoverWizardAppliancesPage1 = new DRFailoverWizardAppliancesPage(); DRFailoverWizardWelcomePage = new DRFailoverWizardWelcomePage(); DRFailoverWizardReportPage1 = new DRFailoverWizardReportPage(); Pool = pool; WizardType = wizardType; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { } else { RBACWarningPage.WizardPermissionCheck check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_DR_WIZARD_MESSAGE); check.AddApiCheck("DR_task.async_create"); check.Blocking = true; RBACWarningPage.AddPermissionChecks(xenConnection, check); AddPage(RBACWarningPage, 0); } #endregion DRFailoverWizardReportPage1.SummaryRetreiver = GetSummaryReport; DRFailoverWizardWelcomePage.WizardTypeChanged += DRFailoverWizardWelcomePage_WizardTypeChanged; DRFailoverWizardWelcomePage.SetWizardType(wizardType); DRFailoverWizardRecoverPage1.ReportStarted += DRFailoverWizardRecoverPage1_ReportStarted; DRFailoverWizardRecoverPage1.ReportLineGot += DRFailoverWizardRecoverPage1_ReportLineGot; DRFailoverWizardRecoverPage1.ReportActionResultGot += DRFailoverWizardRecoverPage1_ReportActionResultGot; DRFailoverWizardAppliancesPage1.Pool = pool; DRFailoverWizardPrecheckPage1.Pool = pool; DRFailoverWizardStoragePage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.SrIntroduced += DRFailoverWizardPrecheckPage1_SrIntroduced; AddPages(DRFailoverWizardWelcomePage, DRFailoverWizardFirstPage, DRFailoverWizardStoragePage1, DRFailoverWizardAppliancesPage1, DRFailoverWizardPrecheckPage1, DRFailoverWizardRecoverPage1, DRFailoverWizardReportPage1); }
public DRFailoverWizard(Pool pool, DRWizardType wizardType) : base(pool.Connection) { InitializeComponent(); RBACWarningPage = new RBACWarningPage(); DRFailoverWizardFirstPage = new DRFailoverWizardFirstPage(); DRFailoverWizardStoragePage1 = new DRFailoverWizardStoragePage(); DRFailoverWizardPrecheckPage1 = new DRFailoverWizardPrecheckPage(); DRFailoverWizardRecoverPage1 = new DRFailoverWizardRecoverPage(); DRFailoverWizardAppliancesPage1 = new DRFailoverWizardAppliancesPage(); DRFailoverWizardWelcomePage = new DRFailoverWizardWelcomePage(); DRFailoverWizardReportPage1 = new DRFailoverWizardReportPage(); Pool = pool; WizardType = wizardType; #region RBAC Warning Page Checks if (Pool.Connection.Session.IsLocalSuperuser || Helpers.GetMaster(Pool.Connection).external_auth_type == Auth.AUTH_TYPE_NONE) { } else { RBACWarningPage.WizardPermissionCheck check = new RBACWarningPage.WizardPermissionCheck(Messages.RBAC_DR_WIZARD_MESSAGE); check.AddApiCheck("DR_task.async_create"); check.Blocking = true; RBACWarningPage.AddPermissionChecks(xenConnection, check); AddPage(RBACWarningPage, 0); } #endregion DRFailoverWizardReportPage1.SummaryRetreiver = GetSummaryReport; DRFailoverWizardWelcomePage.WizardTypeChanged += DRFailoverWizardWelcomePage_WizardTypeChanged; DRFailoverWizardWelcomePage.SetWizardType(wizardType); DRFailoverWizardRecoverPage1.ReportStarted += DRFailoverWizardRecoverPage1_ReportStarted; DRFailoverWizardRecoverPage1.ReportLineGot += DRFailoverWizardRecoverPage1_ReportLineGot; DRFailoverWizardRecoverPage1.ReportActionResultGot += DRFailoverWizardRecoverPage1_ReportActionResultGot; DRFailoverWizardAppliancesPage1.Pool = pool; DRFailoverWizardPrecheckPage1.Pool = pool; DRFailoverWizardStoragePage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.NewDrTaskIntroduced += NewDrTaskIntroduced; DRFailoverWizardPrecheckPage1.SrIntroduced += DRFailoverWizardPrecheckPage1_SrIntroduced; AddPages(DRFailoverWizardWelcomePage, DRFailoverWizardFirstPage, DRFailoverWizardStoragePage1, DRFailoverWizardAppliancesPage1, DRFailoverWizardPrecheckPage1, DRFailoverWizardRecoverPage1, DRFailoverWizardReportPage1); }
public void SetWizardType(DRWizardType wizardType) { switch (wizardType) { case DRWizardType.Failover: radioButtonFailover.Checked = true; break; case DRWizardType.Failback: radioButtonFailback.Checked = true; break; case DRWizardType.Dryrun: radioButtonDryrun.Checked = true; break; default: radioButtonFailover.Checked = radioButtonDryrun.Checked = radioButtonDryrun.Checked = false; break; } OnWizardTypeChaged(wizardType); }
private void DRFailoverWizardWelcomePage_WizardTypeChanged(DRWizardType type) { WizardType = type; switch (type) { case DRWizardType.Failover: Text = string.Format(Messages.DR_WIZARD_FAILOVER_TITLE, xenConnection.Name); pictureBoxWizard.Image = Properties.Resources._000_Failover_h32bit_32; break; case DRWizardType.Failback: Text = string.Format(Messages.DR_WIZARD_FAILBACK_TITLE, xenConnection.Name); pictureBoxWizard.Image = Properties.Resources._000_Failback_h32bit_32; break; case DRWizardType.Dryrun: Text = string.Format(Messages.DR_WIZARD_DRYRUN_TITLE, xenConnection.Name); pictureBoxWizard.Image = Properties.Resources._000_TestFailover_h32bit_32; break; default: pictureBoxWizard.Image = Properties.Resources._000_DisasterRecovery_h32bit_32; break; } DRFailoverWizardReportPage1.WizardType = WizardType; DRFailoverWizardStoragePage1.WizardType = WizardType; DRFailoverWizardAppliancesPage1.WizardType = WizardType; DRFailoverWizardRecoverPage1.WizardType = WizardType; DRFailoverWizardFirstPage.WizardType = WizardType; DRFailoverWizardPrecheckPage1.WizardType = WizardType; }
public void SetWizardType(DRWizardType wizardType) { switch (wizardType) { case DRWizardType.Failover: radioButtonFailover.Checked = true; break; case DRWizardType.Failback: radioButtonFailback.Checked = true; break; case DRWizardType.Dryrun: radioButtonDryrun.Checked = true; break; default: radioButtonFailover.Checked = radioButtonDryrun.Checked = radioButtonDryrun.Checked = false; break; } OnWizardTypeChaged(wizardType); }
private void OnWizardTypeChaged(DRWizardType wizardType) { m_wizardType = wizardType; if (WizardTypeChanged != null) WizardTypeChanged(wizardType); OnPageUpdated(); }