private void btnAddSurvey_Click(object sender, EventArgs e) { try { frmAddSurvey newAddServey = new frmAddSurvey(); if (newAddServey.ShowDialog(this) == DialogResult.OK) { Program.currentProject.AddSurvey(newAddServey.QuestionCollection); this.ApplyChangesOnHardDrive(); } this.UpdateTreesPresentation(); } catch (Exception exp) { Program.ShowExceptionData(exp); } }
private void EditSurveyWithID(int _index) { try { int index = _index; Dictionary <string, QuestionCollection> toEdit = Program.currentProject.GetSurvey(index); frmAddSurvey newAddServey = new frmAddSurvey(toEdit); newAddServey.Text = "Edit Survey"; if (newAddServey.ShowDialog(this) == DialogResult.OK) { //Program.currentProject.AddSurvey(newAddServey.QuestionCollection); this.ApplyChangesOnHardDrive(); } this.UpdateTreesPresentation(); } catch (Exception exp) { Program.ShowExceptionData(exp); } }