コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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;
        }