Пример #1
0
        private void KeyCountUpDown_ValueChanged(object sender, EventArgs e)
        {
            uint value = (uint)keyCountUpDown.Value;

            while (ColorArray.KeyCount < value)
            {
                ColorArray.AddKey();
            }
            while (ColorArray.KeyCount > value)
            {
                ColorArray.RemoveKey();
            }
            // TODO raise ColorDeselected event if we lost the selected color
            colorArrayPanel.LoadColors(ColorArray.ColorKeys, (int)ColorArray.KeyCount); // TODO add LoadColors(STColorArray) to the interface
        }