Exemple #1
0
        private void createProjectBtn_Click(object sender, EventArgs e)
        {
            using (var saveFileDialog = new SaveFileDialog())
            {
                if (viewModel.projectName == "")
                {
                    saveFileDialog.FileName = "Untitled Project";
                }
                else
                {
                    saveFileDialog.FileName = viewModel.projectName;
                }
                saveFileDialog.Filter = "Xml File|*.xml";
                saveFileDialog.Title  = "Save Project";

                if (saveFileDialog.ShowDialog() == DialogResult.OK)
                {
                    ProjectHandler.createNewProject(viewModel.projectName, saveFileDialog.FileName);
                    viewModel.success = true;
                    this.Close();
                }
            }
        }