Exemple #1
0
        private void createProject_Click(object sender, EventArgs e)
        {
            Program.LoadedProject = new Project(projectNameTextBox.Text, authorNameTextBox.Text, saveDialog.FileName, descriptionTextBox.Text, DateTime.Now);
            DataManager.CreateProject(Program.LoadedProject);
            Program.LoadedProject.Tables = new List <DBNormalizationAnalyzer.Formations.Table>
            {
                new DBNormalizationAnalyzer.Formations.Table("NEW_TABLE", 1)
            };

            var formInstance = new EditorForm(Program.LoadedProject);

            formInstance.Show();
            this.Hide();
        }
        private void OpenProject()
        {
            try
            {
                Program.LoadedProject = DataManager.ReadProject(listBox1.SelectedValue as string);
                var editForm = new EditorForm(Program.LoadedProject);
                editForm.Show();
                this.Hide();
            }
            catch
            {
                MessageBox.Show(@"An error occured, couldn't load project
Please consider removing this project from the recent projects list.");
            }
        }