private void OpenWorkflow()
        {
            OpenFileDialog fileDialog = WorkflowFileDialogFactory.CreateOpenFileDialog();

            if (fileDialog.ShowDialog() == true)
            {
                WorkflowViewModel workspaceViewModel = new WorkflowViewModel(this.disableDebugViewOutput);
                workspaceViewModel.FullFilePath = fileDialog.FileName;
                WorkflowDocumentContent content = new WorkflowDocumentContent(workspaceViewModel);

                ModelService modelService = workspaceViewModel.Designer.Context.Services.GetService <ModelService>();
                if (modelService != null)
                {
                    List <Type> referencedActivities = this.GetReferencedActivities(modelService);
                    this.AddActivitiesToToolbox(referencedActivities);
                }

                content.Title = workspaceViewModel.DisplayNameWithModifiedIndicator;
                content.Show(this.dockingManager);
                this.dockingManager.ActiveDocument = content;
                content.Closing += new EventHandler <CancelEventArgs>(workspaceViewModel.Closing);
            }

            this.ViewPropertyInspector();
            if (this.HasValidationErrors)
            {
                this.ViewErrors();
                this.SetSelectedTab(ContentTypes.Errors);
            }
        }
        private void NewWorkflow(WorkflowTypes workflowType)
        {
            WorkflowViewModel       workspaceViewModel = new WorkflowViewModel(this.disableDebugViewOutput);
            WorkflowDocumentContent content            = new WorkflowDocumentContent(workspaceViewModel, workflowType);

            content.Title = workspaceViewModel.DisplayNameWithModifiedIndicator;
            content.Show(this.dockingManager);
            this.dockingManager.ActiveDocument = content;
            content.Closing += new EventHandler <CancelEventArgs>(workspaceViewModel.Closing);
            this.ViewPropertyInspector();
            this.ViewErrors();
            this.SetSelectedTab(ContentTypes.Errors);
        }