예제 #1
0
        private void CreateNewProjectButton_Click(object sender, RoutedEventArgs e) // Создание нового проекта
        {
            var createProject = new CreateProjectWindow();

            if (createProject.ShowDialog() == true)
            {
                ShowProjects();
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }