private void UpdateSampleLine()
{
if (this.comboBoxLineColorChoice.Text.Length > 0 && this.comboBoxLineWidth.Text.Length > 0 && this.comboBoxLineStyleChoice.Text.Length > 0)
{
// Create pen.
Pen MyPen = new Pen(Color.FromName(this.comboBoxLineColorChoice.Text), int.Parse(this.comboBoxLineWidth.Text));
// Set line style
MyPen.DashStyle = DisplayAttributes.GetLineStypefromString(this.comboBoxLineStyleChoice.Text);
int x1 = panelLineAttributes.Width / int.Parse(this.comboBoxTextSizeChoice.Text);
int y1 = panelLineAttributes.Height / int.Parse(this.comboBoxTextSizeChoice.Text);
// Draw line to screen.
Graphics MyGraphics = this.panelLineAttributes.CreateGraphics();
panelLineAttributes.Refresh();
MyGraphics.DrawLine(MyPen, 0, 0, panelLineAttributes.Width, panelLineAttributes.Height);
MyGraphics.Dispose();
MyPen.Dispose();
}
}