示例#1
0
 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);
     }
 }
示例#2
0
 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);
     }
 }