private void InitLabels() { rightLabels = new AnswerLabel[MAX_VARIANTS_COUNT]; leftLabels = new AnswerLabel[MAX_VARIANTS_COUNT]; for (int i = 0; i < MAX_VARIANTS_COUNT; i++) { leftLabels[i] = new AnswerLabel(i); leftLabels[i].Dock = DockStyle.Fill; leftLabels[i].TextAlign = ContentAlignment.MiddleCenter; leftLabels[i].Font = new Font("Tahoma", 12); leftLabels[i].SendToBack(); leftLabels[i].MouseClick += new System.Windows.Forms.MouseEventHandler(this.AnswerLabelMouseClick); tlpWords.Controls.Add(leftLabels[i]); rightLabels[i] = new AnswerLabel(i); rightLabels[i] = new AnswerLabel(i); rightLabels[i].Dock = DockStyle.Fill; rightLabels[i].TextAlign = ContentAlignment.MiddleCenter; rightLabels[i].Font = new Font("Tahoma", 12); rightLabels[i].SendToBack(); rightLabels[i].MouseClick += new System.Windows.Forms.MouseEventHandler(this.AnswerLabelMouseClick); tlpWords.Controls.Add(leftLabels[i]); tlpWords.Controls.Add(rightLabels[i]); } }
private void SetupLabels() { labels = new AnswerLabel[choiceVariants]; for (int i = 0; i < choiceVariants; i++) { labels[i] = new AnswerLabel(i); labels[i].Dock = DockStyle.Fill; labels[i].TextAlign = ContentAlignment.MiddleCenter; labels[i].Font = new Font("Tahoma", 12); labels[i].SendToBack(); labels[i].MouseClick += new System.Windows.Forms.MouseEventHandler(this.AnswerLabelMouseClick); pnlChoice.Controls.Add(labels[i]); } }