Example #1
0
 private void Button1Click(object sender, EventArgs e)
 {
     if (!VerifyForm()) return;
     CurrentAns = new Answer { Info = AnswerText.Text, UID = UIDText.Text};
     Finished = true;
     Close();
 }
Example #2
0
 public AddAnsDialog()
 {
     CurrentAns = new Answer();
     InitializeComponent();
     AnswerText.Text = "";
     UIDText.Text = "";
 }
Example #3
0
 private void Button2Click(object sender, EventArgs e)
 {
     var addAns = new AddAnsDialog();
        addAns.ShowDialog();
        if (!addAns.Finished) return;
     var i = new Answer {Info = addAns.CurrentAns.Info, UID = addAns.CurrentAns.UID};
     listBox1.Items.Add(i);
        CurrentQuestion.AnsArray.Add(i);
 }
 private bool SearchItem(Answer input)
 {
     return CurrentQuestionSelectedAnswers.Any(i => i == input);
 }
Example #5
0
 static bool FindAns(Answer ans, IEnumerable<string> trueAns)
 {
     return trueAns.Any(i => ans.UID == i);
 }