public EssayQuestionPanel(CustomFonts customFonts) : base(customFonts) { this.Size = new Size(645, 400); Type = 2; answerPanel = new EssayAnswerPanel(customFonts); answerPanel.Location = new Point(0, 120); this.Controls.Add(answerPanel); answerPanel.AnswerTextBox.LostFocus += answerTextBox_LostFocus_2; answerPanel.AnswerLabel.Click += answerLabel_Click_2; QuestionTextBox.Size = new System.Drawing.Size(500, 100); QuestionTextBox.LostFocus += questionTextBox_LostFocus_1; QuestionLabel.MaximumSize = new System.Drawing.Size(500, 0); QuestionLabel.Location = new Point(0, 10); QuestionLabel.Click += questionLabel_Click_1; ExamScorePanel.Location = new Point(520, (this.Height - ExamScorePanel.Height) / 2); DeleteButton.Location = new Point(605, (this.Height - DeleteButton.Height) / 2); }
public ExamEssayQuestionPanel(CustomFonts customFonts, string question, int score, int maxLength) : base(customFonts, question, score) { this.Size = new Size(725, 400); this.Click += Click_1; Type = 2; answerPanel = new EssayAnswerPanel(customFonts); answerPanel.Location = new Point(0, 120); this.Controls.Add(answerPanel); answerPanel.MaxLengthTextBox.Text = maxLength.ToString(); answerPanel.MaxLengthTextBox.ReadOnly = true; answerPanel.AnswerTextBox.MaxLength = maxLength; answerPanel.AnswerTextBox.LostFocus += answerTextBox_LostFocus_2; answerPanel.AnswerLabel.Click += answerLabel_Click_2; QuestionLabel.MaximumSize = new System.Drawing.Size(500, 0); QuestionLabel.Location = new Point(0, 10); answerPanel.Location = new Point(0, QuestionLabel.Location.Y + QuestionLabel.Height + 20); this.Height = answerPanel.Location.Y + answerPanel.Height; ExamScorePanel.Location = new Point(520, (this.Height - ExamScorePanel.Height) / 2); StudentScorePanel.Location = new Point(600, (this.Height - StudentScorePanel.Height) / 2); }