private void CreateNewProjectButton_Click(object sender, RoutedEventArgs e) // Создание нового проекта { var createProject = new CreateProjectWindow(); if (createProject.ShowDialog() == true) { ShowProjects(); } }
private void CreateProject(Window window) { if (SaveExistingProjectIfNeeded(window) == MessageBoxResult.Cancel) { return; } var viewModel = new CreateProjectViewModel(); var createProjectWindow = new CreateProjectWindow(); createProjectWindow.DataContext = viewModel; createProjectWindow.Closing += (sender, args) => { var project = viewModel.GetProjectFile(); if (project != null) { OpenProject(project); } }; createProjectWindow.Show(); }
private void CreateProject(Window window) { if (SaveExistingProjectIfNeeded(window) == MessageBoxResult.Cancel) return; var viewModel = new CreateProjectViewModel(); var createProjectWindow = new CreateProjectWindow(); createProjectWindow.DataContext = viewModel; createProjectWindow.Closing += (sender, args) => { var project = viewModel.GetProjectFile(); if (project != null) { OpenProject(project); } }; createProjectWindow.Show(); }