Index: src/DeltaShell/DeltaShell.Gui/Forms/SelectViewDialog.cs =================================================================== diff -u -r8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9 -r5fc71a385897af92ccb092f2f969b5709afab85a --- src/DeltaShell/DeltaShell.Gui/Forms/SelectViewDialog.cs (.../SelectViewDialog.cs) (revision 8f6ae890fed8e8eae3a32f9c0498a10f82e0ddf9) +++ src/DeltaShell/DeltaShell.Gui/Forms/SelectViewDialog.cs (.../SelectViewDialog.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a) @@ -25,7 +25,10 @@ public IList Items { - get { return items; } + get + { + return items; + } set { items = value; @@ -36,18 +39,24 @@ public string SelectedItem { - get { return (string) listBox.SelectedItem; } - set { listBox.SelectedItem = value; } + get + { + return (string) listBox.SelectedItem; + } + set + { + listBox.SelectedItem = value; + } } + public string DefaultViewName { get; set; } + private void listBox_DoubleClick(object sender, EventArgs e) { DialogResult = DialogResult.OK; Close(); } - public string DefaultViewName { get; set; } - private void listBox_DrawItem(object sender, DrawItemEventArgs e) { string itemAsString = listBox.Items[e.Index].ToString(); @@ -60,19 +69,19 @@ { string defaultIndicatorText = Resources.SelectViewDialog_listBox_DrawItem_____Default_; var defaultItemFont = new Font(lbFont.FontFamily, lbFont.Size, FontStyle.Bold); - + var itemSize = e.Graphics.MeasureString(itemAsString, defaultItemFont); var indicatorSize = e.Graphics.MeasureString(defaultIndicatorText, defaultItemFont); var boundsIndicator = new RectangleF(e.Bounds.Left + itemSize.Width, - e.Bounds.Top, indicatorSize.Width,e.Bounds.Height); + e.Bounds.Top, indicatorSize.Width, e.Bounds.Height); e.Graphics.DrawString(itemAsString, defaultItemFont, (selected) ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); e.Graphics.DrawString(defaultIndicatorText, defaultItemFont, Brushes.LightGray, boundsIndicator); } else { - e.Graphics.DrawString(itemAsString, lbFont, (selected) ? new SolidBrush(SystemColors.HighlightText): Brushes.Black, e.Bounds); + e.Graphics.DrawString(itemAsString, lbFont, (selected) ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); } e.DrawFocusRectangle();