Example #1
0
 public QuestionWindow(Enums.AnswerType atype, string content, string question, int value, int cat)
 {
     InitializeComponent();
     Console.WriteLine("Frage: " + question);
     _atype = atype;
     _content = content;
     _value = value;
     _cat = cat;
     _curPlayer = -1;
     if (_atype == Enums.AnswerType.Text)
     {
         answerLabel.Text = _content;
         answerLabel.Show();
         bgMusic();
     }
     else if (_atype == Enums.AnswerType.Image)
     {
         answerImage.Load(_content);
         if (answerImage.Image.Size.Width > answerImage.Size.Width
             || answerImage.Image.Size.Height > answerImage.Size.Height)
         {
             answerImage.SizeMode = PictureBoxSizeMode.Zoom;
         }
         else
         {
             answerImage.SizeMode = PictureBoxSizeMode.CenterImage;
         }
         answerImage.Show();
         bgMusic();
     }
     else if (_atype == Enums.AnswerType.Audio)
     {
         playSound(_content);
         answerLabel.Text = "Zuhören!";
         answerLabel.Show();
     }
 }
Example #2
0
 public Question(Enums.AnswerType atype, string content, string q)
 {
     _atype = atype;
     _content = content;
     _q = q;
 }
Example #3
0
 public Question(Question previous)
 {
     _atype = previous._atype;
     _content = previous._content;
     _q = previous._q;
 }