private void ButtonRemoveClick(object sender, EventArgs e)
{
int index = this.listBoxColors.SelectedIndex;
if (index > 0)
{
this.listBoxColors.DataSource = null;
Editor.Settings.Charting.Colors.RemoveAt(index);
this.RefreshColors();
}
this.listBoxColors.SelectedIndex = index.Clamp(0, Editor.Settings.Charting.Colors.Count - 1);
}