private void ListBoxColorsDoubleClick(object sender, EventArgs e)
{
var index = this.listBoxColors.SelectedIndex;
if (index < 0) return;
using (var dialog = new ColorChooserForm())
{
dialog.Color = Editor.Settings.Charting.Colors[index];
dialog.AlphaEnabled = false;
if (dialog.ShowDialog(Windows.ChartSettingsForm) != DialogResult.OK) return;
this.listBoxColors.DataSource = null;
Editor.Settings.Charting.Colors[index] = dialog.Color;
this.RefreshColors();
}
}