예제 #1
0
파일: Form1.cs 프로젝트: tjarksaul/jeopardy
        private void btn_Click(object sender, EventArgs e)
        {
            Button   btn      = sender as Button;
            int      category = Convert.ToInt32(btn.Name.Substring(3, 1)) - 1;
            int      question = Convert.ToInt32(btn.Name.Substring(5, 1)) - 1;
            Question q        = game.getQuestion(category, question);

            using (var form = new QuestionWindow(q.AnswerType(), q.GetContent(), q.GetQuestion(), (question + 1) * 100, category))
            {
                form.ShowDialog(this);
            }
            doFinishingStuff();
        }
예제 #2
0
파일: Form1.cs 프로젝트: nichdu/jeopardy
 private void btn_Click(object sender, EventArgs e)
 {
     Button btn = sender as Button;
     int category = Convert.ToInt32(btn.Name.Substring(3, 1)) - 1;
     int question = Convert.ToInt32(btn.Name.Substring(5, 1)) - 1;
     Question q = game.getQuestion(category, question);
     using (var form = new QuestionWindow(q.AnswerType(), q.GetContent(), q.GetQuestion(), (question+1)*100, category))
     {
         form.ShowDialog(this);
     }
     doFinishingStuff();
 }