Esempio n. 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            WorkspaceWindow workspace = new WorkspaceWindow(Solution);

            workspace.Show();
            MainWindow.Current.Close();
        }
Esempio n. 2
0
        //Create
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (ProjectNameText.Text.Contains(" "))
            {
                MessageBox.Show("Project name can't contain spaces or special characters.", "Illegal Character(s)", MessageBoxButton.OK);
                return;
            }
            string projectDirectory = ProjectDirectoryText.Text;

            if (CreateFolderCheck.IsChecked == true)
            {
                projectDirectory = Path.Combine(projectDirectory, ProjectNameText.Text);
            }
            if (CreateFolderCheck.IsChecked == true && Directory.Exists(projectDirectory))
            {
                MessageBox.Show("A folder with the specified project name already exists.", "Already Exists", MessageBoxButton.OK);
                return;
            }
            CSProjSolution  solution  = new CSProjSolution(ProjectNameText.Text, ProjectDirectoryText.Text, CreateFolderCheck.IsChecked, SolutionType);
            WorkspaceWindow workspace = new WorkspaceWindow(solution);

            workspace.Show();
            this.Close();
            if (MainWindow.Current != null)
            {
                MainWindow.Current.Close();
            }
            Settings.CurrentSettings.PreviouslyOpenedSolutionPaths.Insert(0, solution.CSProjSolutionFilePath);
            Settings.Save();
        }