public void Execute(object parameter) { NewProjectDialogView newDialog = new NewProjectDialogView(); bool?result = newDialog.ShowDialog(); if (result.HasValue && result.Value) { ProjectManager.OpenProjectCommand.Execute(newDialog.NewProject.Project.FilePath); } }
private async void NewProjectCommandExecute(object obj) { newProjectDialogView = new NewProjectDialogView(); var newProjectDialogViewModel = new NewProjectDialogViewModel(); newProjectDialogView.DataContext = newProjectDialogViewModel; DialogManager.ShowMetroDialogAsync(MainWindow.GetMainWindow, newProjectDialogView); await newProjectDialogView.WaitUntilUnloadedAsync(); if (newProjectDialogViewModel.NewProjectElem != null) { RegisterNewElem(newProjectDialogViewModel.NewProjectElem); } newProjectDialogView = null; }