public CreateProjectWizardView(CreateProjectViewModel viewModel) { InitializeComponent(); viewModel.OnClose = result => { DialogResult = result; Close(); }; DataContext = viewModel; }
public void ProjectFinishedGenerating(EnvDTE.Project project) { var viewModel = new CreateProjectViewModel(BuildProjectionManager); var view = new CreateProjectWizardView(viewModel); if (!view.ShowDialog().GetValueOrDefault(false)) return; var projectNode = (ProjectionsProjectNode) project.Object; if (viewModel.State.ProjectionsToImport.Any()) { var projectionsManager = BuildProjectionManager(viewModel.State.EventStoreConnection); AsyncHelpers.RunSync(() => ImportProjectionsAsync(projectNode, projectionsManager, viewModel.State.ProjectionsToImport)); } project.Save(); }