SIL.FieldWorks.IText.ConfigureInterlinDialog.DrawItem C# (CSharp) Method

DrawItem() private method

private DrawItem ( System e, SIL.FieldWorks.IText.InterlinLineSpec spec ) : void
e System
spec SIL.FieldWorks.IText.InterlinLineSpec
return void
		private void DrawItem(System.Windows.Forms.DrawItemEventArgs e, InterlinLineSpec spec)
		{
			bool selected = ((e.State & DrawItemState.Selected) != 0);
			Brush textBrush = GetBrush(spec, selected);
			try
			{
				Font drawFont = e.Font;
				e.DrawBackground();
				e.Graphics.DrawString(optionsList.Items[e.Index].ToString(), drawFont, textBrush, e.Bounds);
			}
			finally
			{
				if (!selected)
					textBrush.Dispose();
			}
		}