Esempio n. 1
0
        protected virtual void CreateScale()
        {
            HSLColour color;

            color = new HSLColour(this.Colour);

            color.S      = 0;
            this.Colour1 = color.ToRgbColour();

            color.S      = 1;
            this.Colour2 = color.ToRgbColour();
        }
        /// <summary>
        /// Raises the <see cref="HSLColourChanged" /> event.
        /// </summary>
        /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
        protected virtual void OnHSLColourChanged(EventArgs e)
        {
            EventHandler handler;

            if (!_lockUpdates)
            {
                this.Colour = _hslColour.ToRgbColour();
            }

            this.Invalidate();

            handler = (EventHandler)this.Events[_eventHslColourChanged];

            handler?.Invoke(this, e);
        }