/// <summary>
 /// Constructor
 /// </summary>
 public ColorRampPicker()
     : base(typeof(ColorRampValueList))
 {
     TextEditable    = false;
     PaintValueFrame = false;
     PaintValueWidth = 40;
     Editor          = new ColorRampEditor();
     Converter       = new ColorRampConverter();
     Value           = (ColorRampValueList)Converter.ConvertFrom("Random values");
 }
        public void NewValue()
        {
            ColorRampForm dialog = new ColorRampForm((ColorRampEditor)this.Editor, null);

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                ColorRampConverter converter = (ColorRampConverter)this.Converter;
                converter.AddValue(dialog.Value);
                Value = dialog.Value;
            }
        }
        public void DeleteValue(string key)
        {
            ColorRampConverter converter = (ColorRampConverter)this.Converter;

            converter.DeleteValue(key);
        }