src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/WizardPageUpdateFromDatabase.cs
// <summary>
//     Invoked by the VS Wizard framework when this page is entered.
//     Starts a background thread to retrieve table information to display
// </summary>
Invoked by the VS Wizard framework when this page is entered.
Starts a background thread to retrieve table information to display
Invoked by the VS Wizard framework when this page is entered . Starts a background thread to retrieve table information to display
public override void OnActivated()
        {
            base.OnActivated();
            Debug.Assert(Wizard.ModelBuilderSettings.DesignTimeConnectionString != null, "Unexpected null value for connection string");
            if (!TreeViewsInitialized
                || !Wizard.ModelBuilderSettings.DesignTimeConnectionString.Equals(_initializedDataConnection))
            {
                Wizard.EnableButton(ButtonType.Previous, false);
                Wizard.EnableButton(ButtonType.Next, false);
                Wizard.EnableButton(ButtonType.Finish, false);
                Wizard.ModelBuilderSettings.DatabaseObjectFilters = null;
                AddTreeView.TreeViewControl.Nodes.Clear();
                RefreshTreeView.TreeViewControl.Nodes.Clear();
                RefreshTreeView.TreeViewControl.CheckBoxes = false;
                VsShellUtilities.ApplyTreeViewThemeStyles(RefreshTreeView.TreeViewControl);
                DeleteTreeView.TreeViewControl.Nodes.Clear();
                DeleteTreeView.TreeViewControl.CheckBoxes = false;
                VsShellUtilities.ApplyTreeViewThemeStyles(DeleteTreeView.TreeViewControl);
                ShowStatus(Resources.SelectTablesPage_StatusRetrievingTablesText);
                _stopwatch.Reset();
                _stopwatch.Start();
                _bgWorkerPopulateTree.RunWorkerAsync(this);
            }
        }
public override void OnActivated ( ) { base . OnActivated ( ) ; Debug . Assert ( Wizard . ModelBuilderSettings . DesignTimeConnectionString != null , " " ) ; if ( ! TreeViewsInitialized || ! Wizard . ModelBuilderSettings . DesignTimeConnectionString . Equals ( _initializedDataConnection ) ) { Wizard . EnableButton ( ButtonType . Previous , false ) ; Wizard . EnableButton ( ButtonType . Next , false ) ; Wizard . EnableButton ( ButtonType . Finish , false ) ; Wizard . ModelBuilderSettings . DatabaseObjectFilters = null ; AddTreeView . TreeViewControl . Nodes . Clear ( ) ; RefreshTreeView . TreeViewControl . Nodes . Clear ( ) ; RefreshTreeView . TreeViewControl . CheckBoxes = false ; VsShellUtilities . ApplyTreeViewThemeStyles ( RefreshTreeView . TreeViewControl ) ; DeleteTreeView . TreeViewControl . Nodes . Clear ( ) ; DeleteTreeView . TreeViewControl . CheckBoxes = false ; VsShellUtilities . ApplyTreeViewThemeStyles ( DeleteTreeView . TreeViewControl ) ; ShowStatus ( Resources . SelectTablesPage_StatusRetrievingTablesText ) ; _stopwatch . Reset ( ) ; _stopwatch . Start ( ) ; _bgWorkerPopulateTree . RunWorkerAsync ( this ) ; } }
Invoked by the VS Wizard framework when this page is entered.
Invoked by the VS Wizard framework when this page is entered .
// Disable wizard navigation temporarily until the background thread completes // Clear existing database objects // re-apply theme styles (setting Checkboxes resets them) // re-apply theme styles (setting Checkboxes resets them) // Put up a status message // Get database objects in a background thread