src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/ModelBuilderWizardForm.cs
// <summary>
//     Helper to create &amp; initialize wizard pages depending on the mode
// </summary>
// virtual to allow mocking
Helper to create & initialize wizard pages depending on the mode
Helper to create & initialize wizard pages depending on the mode
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
        [SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
        protected virtual void InitializeWizardPages()
        {
            switch (_wizardMode)
            {
                case WizardMode.PerformDatabaseConfigAndSelectTables:
                    ModelBuilderSettings.GenerationOption = ModelGenerationOption.GenerateFromDatabase;
                    RegisterStandardPage(new WizardPageDbConfig(this));
                    RegisterStandardPage(new WizardPageRuntimeConfig(this));
                    RegisterStandardPage(new WizardPageUpdateFromDatabase(this));
                    break;
                case WizardMode.PerformSelectTablesOnly:
                    ModelBuilderSettings.GenerationOption = ModelGenerationOption.GenerateFromDatabase;
                    RegisterStandardPage(new WizardPageUpdateFromDatabase(this));
                    break;
                case WizardMode.PerformDatabaseConfigAndDBGenSummary:
                    ModelBuilderSettings.GenerationOption = ModelGenerationOption.GenerateDatabaseScript;
                    RegisterStandardPage(new WizardPageDbConfig(this));
                    RegisterStandardPage(new WizardPageRuntimeConfig(this));
                    RegisterStandardPage(new WizardPageDbGenSummary(this));
                    break;
                case WizardMode.PerformDBGenSummaryOnly:
                    ModelBuilderSettings.GenerationOption = ModelGenerationOption.GenerateDatabaseScript;
                    RegisterStandardPage(new WizardPageDbGenSummary(this));
                    break;
                case WizardMode.PerformAllFunctionality:
                default:
                    RegisterStandardPage(new WizardPageStart(this));
                    RegisterStandardPage(new WizardPageDbConfig(this));
                    RegisterStandardPage(new WizardPageRuntimeConfig(this));
                    RegisterStandardPage(new WizardPageSelectTables(this));
                    break;
            }
            foreach (var page in RegisteredPages)
            {
                AddPage(page);
            }
        }
[ SuppressMessage ( " " , " " ) ] [ SuppressMessage ( " " , " " ) ] protected virtual void InitializeWizardPages ( ) { switch ( _wizardMode ) { case WizardMode . PerformDatabaseConfigAndSelectTables : ModelBuilderSettings . GenerationOption = ModelGenerationOption . GenerateFromDatabase ; RegisterStandardPage ( new WizardPageDbConfig ( this ) ) ; RegisterStandardPage ( new WizardPageRuntimeConfig ( this ) ) ; RegisterStandardPage ( new WizardPageUpdateFromDatabase ( this ) ) ; break ; case WizardMode . PerformSelectTablesOnly : ModelBuilderSettings . GenerationOption = ModelGenerationOption . GenerateFromDatabase ; RegisterStandardPage ( new WizardPageUpdateFromDatabase ( this ) ) ; break ; case WizardMode . PerformDatabaseConfigAndDBGenSummary : ModelBuilderSettings . GenerationOption = ModelGenerationOption . GenerateDatabaseScript ; RegisterStandardPage ( new WizardPageDbConfig ( this ) ) ; RegisterStandardPage ( new WizardPageRuntimeConfig ( this ) ) ; RegisterStandardPage ( new WizardPageDbGenSummary ( this ) ) ; break ; case WizardMode . PerformDBGenSummaryOnly : ModelBuilderSettings . GenerationOption = ModelGenerationOption . GenerateDatabaseScript ; RegisterStandardPage ( new WizardPageDbGenSummary ( this ) ) ; break ; case WizardMode . PerformAllFunctionality : default : RegisterStandardPage ( new WizardPageStart ( this ) ) ; RegisterStandardPage ( new WizardPageDbConfig ( this ) ) ; RegisterStandardPage ( new WizardPageRuntimeConfig ( this ) ) ; RegisterStandardPage ( new WizardPageSelectTables ( this ) ) ; break ; } foreach ( var page in RegisteredPages ) { AddPage ( page ) ; } }
Helper to create & initialize wizard pages depending on the mode
Helper to create & initialize wizard pages depending on the mode
// Add the Start Page // rest of pages will be added by the start page (if needed)