Inheritance: INotifyPropertyChanged
コード例 #1
0
        public CreateProjectWizardView(CreateProjectViewModel viewModel)
        {
            InitializeComponent();
            viewModel.OnClose = result =>
                {
                    DialogResult = result;
                    Close();
                };

            DataContext = viewModel;
        }
コード例 #2
0
        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();
        }