Exemple #1
0
        public void TextLabel_Click(object sender, EventArgs e)
        {
            CustomLabel textlabel = (CustomLabel)sender;

            if (currentQuestion != null)
            {
                currentQuestion.TextLabel.BackColor = Color.White;
            }
            //Console.WriteLine(textlabel.Text);
            currentQuestion = textlabel.Owner;
            currentQuestion.TextLabel.BackColor = Color.GreenYellow;
            questionChart.Series["Series1"].Points.Clear();
            questionNameLabel.Text = "Question # : " + (currentQuestion.ID + 1).ToString();
            CalculateTotals();
        }
Exemple #2
0
        public void CreateQuestions(int number)
        {
            StringReader file = null;

            try
            {
                file = new StringReader(IBMConsultantTool.Properties.Resources.Questions);
                int i = 0;
                while ((line = file.ReadLine()) != null)
                {
                    CupeQuestion q = new CupeQuestion();

                    // currentPerson.Questions.AddLast(q);
                    q.TextLabel.Location = new Point(10, (30 * i) + 5);
                    q.ID                  = i;
                    q.TextLabel.Text      = line;
                    q.QuestionText        = line;
                    q.CurrentBox.Location = new Point(250, 30 * i);
                    q.FutureBox.Location  = new Point(310, 30 * i);

                    q.CurrentBox.TextChanged += new EventHandler(CurrentBox_TextChanged);
                    q.FutureBox.TextChanged  += new EventHandler(FutureBox_TextChanged);
                    q.TextLabel.Click        += new EventHandler(TextLabel_Click);
                    i++;
                    q.Owner = panel1;
                    mainQuestions.Add(q);
                    //Console.WriteLine("something");
                }
            }
            finally
            {
                if (file != null)
                {
                    file.Close();
                }
            }
        }
Exemple #3
0
 public CustomLabel(CupeQuestion owner)
 {
     this.owner = owner;
 }
Exemple #4
0
 public CustomBox(CupeQuestion owner)
 {
     this.owner = owner;
 }
Exemple #5
0
 public CustomBox(CupeQuestion owner)
 {
     this.owner = owner;
 }
Exemple #6
0
        public void CreateQuestions(int number)
        {
            StringReader file = null;
            try
            {
                file = new StringReader(IBMConsultantTool.Properties.Resources.Questions);
                int i = 0;
                while ((line = file.ReadLine()) != null)
                {
                    CupeQuestion q = new CupeQuestion();

                   // currentPerson.Questions.AddLast(q);
                    q.TextLabel.Location = new Point(10, (30 * i) + 5);
                    q.ID = i;
                    q.TextLabel.Text = line;
                    q.QuestionText = line;
                    q.CurrentBox.Location = new Point(250, 30 * i);
                    q.FutureBox.Location = new Point(310, 30 * i);

                    q.CurrentBox.TextChanged += new EventHandler(CurrentBox_TextChanged);
                    q.FutureBox.TextChanged += new EventHandler(FutureBox_TextChanged);
                    q.TextLabel.Click +=new EventHandler(TextLabel_Click);
                    i++;
                    q.Owner = panel1;
                    mainQuestions.Add(q);
                    //Console.WriteLine("something");
                }

            }
            finally
            {
                if (file != null)
                    file.Close();
            }
        }
Exemple #7
0
 public void TextLabel_Click(object sender, EventArgs e)
 {
     CustomLabel textlabel = (CustomLabel)sender;
     if(currentQuestion != null)
         currentQuestion.TextLabel.BackColor = Color.White;
     //Console.WriteLine(textlabel.Text);
     currentQuestion = textlabel.Owner;
     currentQuestion.TextLabel.BackColor = Color.GreenYellow;
     questionChart.Series["Series1"].Points.Clear();
     questionNameLabel.Text = "Question # : " + (currentQuestion.ID + 1).ToString();
     CalculateTotals();
 }
Exemple #8
0
 public CustomLabel(CupeQuestion owner)
 {
     this.owner = owner;
 }