AspNetEdit.UI.PropertyEditors.ColorEditor.LaunchDialogue C# (CSharp) Method

LaunchDialogue() public method

public LaunchDialogue ( ) : void
return void
        public override void LaunchDialogue()
        {
            ColorSelectionDialog dialog = new ColorSelectionDialog ("Select a new color");
            dialog.ColorSelection.CurrentColor = GetColor ();
            dialog.Run ();
            dialog.Destroy ();

            int red = (int) (255 * (float) dialog.ColorSelection.CurrentColor.Red / ushort.MaxValue);
            int green = (int) (255 * (float) dialog.ColorSelection.CurrentColor.Green / ushort.MaxValue);
            int blue = (int) (255 * (float) dialog.ColorSelection.CurrentColor.Blue / ushort.MaxValue);

            System.Drawing.Color color = System.Drawing.Color.FromArgb (red, green, blue);
            //TODO: Property.Converter.ConvertFrom() fails: why?
            parentRow.PropertyValue = color;
        }