Esempio n. 1
0
 public void InitQuestions()
 {
     m_questions = new List<Question>();
     Question quest;
     foreach (Location loc in m_mapProvider.GetLocations())
     {
         quest = new Question(loc.Name,Language.Norwegian,loc);
         m_questions.Add(quest);
     }
 }
Esempio n. 2
0
        private void AskQuestion()
        {
            if (this.pictureBox3.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.timer.Stop();
                this.q = new Question();
                this.q.ShowDialog();

                if (Question.FinalAnswer == 1)
                {
                    this.directionCategory1 = Direction.None;
                    this.pictureBox3.Hide();
                    this.pictureBox3.Location = new Point(this.pictureBox3.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox3.Location.Y);
                    this.timer.Start();
                }
                else if (Question.FinalAnswer == 2)
                {
                    this.directionCategory1 = Direction.None;
                    this.pictureBox3.Hide();
                    this.pictureBox3.Location = new Point(this.pictureBox3.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox3.Location.Y);
                    this.paduinKnowledgeScore = this.paduinKnowledgeScore + 30;
                    this.timer.Start();
                }
            }
            if (this.pictureBox6.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.timer.Stop();
                this.q = new Question();
                this.q.ShowDialog();

                if (Question.FinalAnswer == 1)
                {
                    this.directionCategory4 = Direction.None;
                    this.pictureBox6.Hide();
                    this.pictureBox6.Location = new Point(this.pictureBox6.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox6.Location.Y);
                    this.timer.Start();
                }
                else if (Question.FinalAnswer == 2)
                {
                    this.directionCategory4 = Direction.None;
                    this.pictureBox6.Hide();
                    this.pictureBox6.Location = new Point(this.pictureBox6.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox6.Location.Y);
                    this.paduinKnowledgeScore = this.paduinKnowledgeScore + 30;
                    this.timer.Start();
                }
            }
            if (this.pictureBox10.Bounds.IntersectsWith(this.paduin.Bounds))
            {
                this.timer.Stop();
                this.q = new Question();
                this.q.ShowDialog();

                if (Question.FinalAnswer == 1)
                {
                    this.directionCategory8 = Direction.None;
                    this.pictureBox10.Hide();
                    this.pictureBox10.Location = new Point(this.pictureBox10.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox10.Location.Y);
                    this.timer.Start();
                }
                else if (Question.FinalAnswer == 2)
                {
                    this.directionCategory8 = Direction.None;
                    this.pictureBox10.Hide();
                    this.pictureBox10.Location = new Point(this.pictureBox10.Location.X - this.paduin.Location.X + 60,
                        this.pictureBox10.Location.Y);
                    this.paduinKnowledgeScore = this.paduinKnowledgeScore + 30;
                    this.timer.Start();
                }
            }
        }