Ejemplo n.º 1
0
        public QuestionForm(int catIndex, int quesIdx, CategoryForm categoryForm, Button srcButton)
        {
            InitializeComponent();

            this.categoryForm = categoryForm;
            this.srcButton    = srcButton;

            xmlParse = new XmlParser();
            xmlParse.processIndex(catIndex, quesIdx);

            this.textBoxQuestion.Text = xmlParse.QuestionString;
            this.textBoxCategory.Text = "Question: " + xmlParse.CategoryString;
            this.points             = xmlParse.QuestionPts;
            this.textBoxPoints.Text = "$" + this.points.ToString() + " Reward";
        }
Ejemplo n.º 2
0
        public CategoryForm()
        {
            InitializeComponent();

            xmlParse = new XmlParser();

            // Initialize Category1 Texts
            xmlParse.processIndex(1, 1);
            this.textBoxCategory1.Text = xmlParse.CategoryString;
            this.buttonC1Q1.Text       = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(1, 2);
            this.buttonC1Q2.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(1, 3);
            this.buttonC1Q3.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(1, 4);
            this.buttonC1Q4.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(1, 5);
            this.buttonC1Q5.Text = "$" + xmlParse.QuestionPts.ToString();

            // Initialize Category2 Texts
            xmlParse.processIndex(2, 1);
            this.textBoxCategory2.Text = xmlParse.CategoryString;
            this.buttonC2Q1.Text       = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(2, 2);
            this.buttonC2Q2.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(2, 3);
            this.buttonC2Q3.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(2, 4);
            this.buttonC2Q4.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(2, 5);
            this.buttonC2Q5.Text = "$" + xmlParse.QuestionPts.ToString();

            // Initialize Category3 Texts
            xmlParse.processIndex(3, 1);
            this.textBoxCategory3.Text = xmlParse.CategoryString;
            this.buttonC3Q1.Text       = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(3, 2);
            this.buttonC3Q2.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(3, 3);
            this.buttonC3Q3.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(3, 4);
            this.buttonC3Q4.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(3, 5);
            this.buttonC3Q5.Text = "$" + xmlParse.QuestionPts.ToString();

            // Initialize Category4 Texts
            xmlParse.processIndex(4, 1);
            this.textBoxCategory4.Text = xmlParse.CategoryString;
            this.buttonC4Q1.Text       = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(4, 2);
            this.buttonC4Q2.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(4, 3);
            this.buttonC4Q3.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(4, 4);
            this.buttonC4Q4.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(4, 5);
            this.buttonC4Q5.Text = "$" + xmlParse.QuestionPts.ToString();

            // Initialize Category5 Texts
            xmlParse.processIndex(5, 1);
            this.textBoxCategory5.Text = xmlParse.CategoryString;
            this.buttonC5Q1.Text       = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(5, 2);
            this.buttonC5Q2.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(5, 3);
            this.buttonC5Q3.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(5, 4);
            this.buttonC5Q4.Text = "$" + xmlParse.QuestionPts.ToString();
            xmlParse.processIndex(5, 5);
            this.buttonC5Q5.Text = "$" + xmlParse.QuestionPts.ToString();
        }