/// <summary> /// Edits the project's settings /// </summary> public void EditProjectSettings(Object sender, EventArgs e) { ProjectSettingsForm projectSettings = new ProjectSettingsForm(ProjectName, ProjectPath); projectSettings.OnOk += (name, path) => { ProjectName = name; ProjectPath = path; }; projectSettings.ShowDialog(this); }
/// <summary> /// Create a new project /// </summary> public void NewProject(Object sender, EventArgs e) { ProjectSettingsForm projectSettings = new ProjectSettingsForm(); projectSettings.StartPosition = FormStartPosition.CenterScreen; projectSettings.OnOk += (string name, string path) => { MainWindow window = new MainWindow(name, path); window.FormClosed += (s, args) => Close(); window.Show(); Hide(); }; projectSettings.ShowDialog(this); }
/// <summary> /// Create a new project /// </summary> public void NewProject(Object sender, EventArgs e) { ProjectSettingsForm projectSettings = new ProjectSettingsForm(); projectSettings.OnOk += (string name, string path) => { CloseProject(); ProjectName = name; FileName = name + fileEnding; ProjectPath = path; ProjectIsOpen = true; }; projectSettings.ShowDialog(this); }