Пример #1
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();
        }
Пример #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();
        }