src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/WizardPageDbGenSummary.cs
// <summary>
//     This method gets called when the workflow completes or gets terminated
// </summary>
This method gets called when the workflow completes or gets terminated
This method gets called when the workflow completes or gets terminated
private void _workflowInstance_WorkflowCompleted(WorkflowApplicationCompletedEventArgs e)
        {
            _synchronizationContext.Post(
                state =>
                    {
                        if (_onWorkflowCleanup)
                        {
                            Wizard.EnableButton(ButtonType.Previous, false);
                            Wizard.EnableButton(ButtonType.Next, true);
                            Wizard.EnableButton(ButtonType.Finish, false);
                            Wizard.EnableButton(ButtonType.Cancel, true);
                            _onWorkflowCleanup = false;
                            return;
                        }
                        if (e.TerminationException == null)
                        {
                            HideStatus();
                            SummaryTabs.Enabled = true;
                            txtSaveDdlAs.Enabled = true;
                            Wizard.EnableButton(ButtonType.Previous, true);
                            Wizard.EnableButton(ButtonType.Next, false);
                            Wizard.EnableButton(ButtonType.Finish, true);
                            Wizard.EnableButton(ButtonType.Cancel, true);
                            object ssdlOutputObj;
                            var ssdlOutput = String.Empty;
                            if (e.Outputs.TryGetValue(EdmConstants.ssdlOutputName, out ssdlOutputObj)
                                && ssdlOutputObj != null
                                && !String.IsNullOrEmpty(ssdlOutput = ssdlOutputObj as string))
                            {
                                Wizard.ModelBuilderSettings.SsdlStringReader = new StringReader(ssdlOutput);
                            }
                            object mslOutputObj;
                            var mslOutput = String.Empty;
                            if (e.Outputs.TryGetValue(EdmConstants.mslOutputName, out mslOutputObj)
                                && mslOutputObj != null
                                && !String.IsNullOrEmpty(mslOutput = mslOutputObj as string))
                            {
                                Wizard.ModelBuilderSettings.MslStringReader = new StringReader(mslOutput);
                            }
                            object ddlOutputObj;
                            var ddlOutput = String.Empty;
                            if (e.Outputs.TryGetValue(EdmConstants.ddlOutputName, out ddlOutputObj)
                                && ddlOutputObj != null
                                && !String.IsNullOrEmpty(ddlOutput = ddlOutputObj as string))
                            {
                                Wizard.ModelBuilderSettings.DdlStringReader = new StringReader(ddlOutput);
                            }
                            if (!String.IsNullOrEmpty(ddlOutput))
                            {
                                InferTablesAndDisplayDDL(ddlOutput);
                            }
                            txtSaveDdlAs.Focus();
                        }
                    }, null);
        }
private void _workflowInstance_WorkflowCompleted ( WorkflowApplicationCompletedEventArgs e ) { _synchronizationContext . Post ( state => { if ( _onWorkflowCleanup ) { Wizard . EnableButton ( ButtonType . Previous , false ) ; Wizard . EnableButton ( ButtonType . Next , true ) ; Wizard . EnableButton ( ButtonType . Finish , false ) ; Wizard . EnableButton ( ButtonType . Cancel , true ) ; _onWorkflowCleanup = false ; return ; } if ( e . TerminationException == null ) { HideStatus ( ) ; SummaryTabs . Enabled = true ; txtSaveDdlAs . Enabled = true ; Wizard . EnableButton ( ButtonType . Previous , true ) ; Wizard . EnableButton ( ButtonType . Next , false ) ; Wizard . EnableButton ( ButtonType . Finish , true ) ; Wizard . EnableButton ( ButtonType . Cancel , true ) ; object ssdlOutputObj ; var ssdlOutput = String . Empty ; if ( e . Outputs . TryGetValue ( EdmConstants . ssdlOutputName , out ssdlOutputObj ) && ssdlOutputObj != null && ! String . IsNullOrEmpty ( ssdlOutput = ssdlOutputObj as string ) ) { Wizard . ModelBuilderSettings . SsdlStringReader = new StringReader ( ssdlOutput ) ; } object mslOutputObj ; var mslOutput = String . Empty ; if ( e . Outputs . TryGetValue ( EdmConstants . mslOutputName , out mslOutputObj ) && mslOutputObj != null && ! String . IsNullOrEmpty ( mslOutput = mslOutputObj as string ) ) { Wizard . ModelBuilderSettings . MslStringReader = new StringReader ( mslOutput ) ; } object ddlOutputObj ; var ddlOutput = String . Empty ; if ( e . Outputs . TryGetValue ( EdmConstants . ddlOutputName , out ddlOutputObj ) && ddlOutputObj != null && ! String . IsNullOrEmpty ( ddlOutput = ddlOutputObj as string ) ) { Wizard . ModelBuilderSettings . DdlStringReader = new StringReader ( ddlOutput ) ; } if ( ! String . IsNullOrEmpty ( ddlOutput ) ) { InferTablesAndDisplayDDL ( ddlOutput ) ; } txtSaveDdlAs . Focus ( ) ; } } , null ) ; }
This method gets called when the workflow completes or gets terminated
This method gets called when the workflow completes or gets terminated
// If we are just cleaning up the workflow, no need to do anything // except enable the appropriate buttons (we might be heading to the // previous page) // If there was an exception, then the UnhandledException handler should have // already handled it. // The workflow has completed successfully // Hide the status message on the DDL tab // Immediately enable the Finish button if we've gotten a hold of the WorkflowInstance // We also enable going back to the connection page and cancelling out of the wizard completely // Examine the SSDL output. Display an error if we can't find it. // Examine the MSL output. Display an error if we can't find it. // Examine the DDL output. Display an error if we can't find it. // Display the DDL in the textbox
e
WorkflowApplicationCompletedEventArgs