/// <summary> /// Picks the appropriate font and color and writes to the the GUI /// </summary> /// <param name="newtext">The text to add</param> /// <param name="font">Enum defining what type of message it is. The properties for each font are assigned in the constructor</param> public virtual void AddText(string newtext, fonttype font) { switch (font) { case fonttype.Browserfont: reporterBox.SelectionColor = Color.Black; reporterBox.SelectionFont = browsertext; break; case fonttype.ErrorFont: reporterBox.SelectionColor = Color.Red; reporterBox.SelectionFont = errortext; break; case fonttype.RegularFont: reporterBox.SelectionColor = Color.Black; reporterBox.SelectionFont = regulartext; break; case fonttype.ScriptFont: reporterBox.SelectionColor = Color.Black; reporterBox.SelectionFont = scripttext; break; case fonttype.TestFont: reporterBox.SelectionColor = Color.DarkBlue; reporterBox.SelectionFont = testtext; break; } if (newtext != null) { reporterBox.AppendText("\n" + newtext); } //reporterBox.Text += "\n" + newtext; reporterBox.Refresh(); }