示例#1
0
        public void AddQuestion(string type, string content, string question)
        {
            Enums.AnswerType atype = Enums.AnswerType.Text;
            switch (type)
            {
            case "AUDIO":
                atype = Enums.AnswerType.Audio;
                break;

            case "IMAGE":
                atype = Enums.AnswerType.Image;
                break;

            case "STRING":
                atype = Enums.AnswerType.Text;
                break;
            }
            int i = 0;

            while (_questions[i] != null)
            {
                ++i;
            }
            _questions[i] = new Question(atype, content, question);
        }
示例#2
0
 public CallInfo(int callNumber, int receivingNumber, DateTime beginCall, Enums.AnswerType callingAnswerType)
 {
     CallNumber        = callNumber;
     ReceivingNumber   = receivingNumber;
     BeginCall         = beginCall;
     CallingAnswerType = callingAnswerType;
 }
示例#3
0
        public void AddQuestion(Enums.AnswerType type, string content, string question)
        {
            int i = 0;

            while (_questions[i] != null)
            {
                ++i;
            }
            _questions[i] = new Question(type, content, question);
        }
示例#4
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();
     }
 }
示例#5
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();
     }
 }
示例#6
0
 public Question(Enums.AnswerType atype, string content, string q)
 {
     _atype = atype;
     _content = content;
     _q = q;
 }
示例#7
0
 public Question(Question previous)
 {
     _atype = previous._atype;
     _content = previous._content;
     _q = previous._q;
 }
示例#8
0
 public Question(Enums.AnswerType atype, string content, string q)
 {
     _atype   = atype;
     _content = content;
     _q       = q;
 }
示例#9
0
 public Question(Question previous)
 {
     _atype   = previous._atype;
     _content = previous._content;
     _q       = previous._q;
 }