Exemple #1
0
        private void editColor(Panel pnl)
        {
            int[] customColors = new int[]
            {
                0x33, 0x66, 0x99, 0xCC, 0x3300, 0x3333,
                0x3366, 0x3399, 0x33CC, 0x6600, 0x6633,
                0x6666, 0x6699, 0x66CC, 0x9900, 0x9933,
            };

            Color color = pnl.BackColor;

            if (SaveLoadDialogs.SelectColor(ref color, customColors))
            {
                pnl.BackColor = color;
            }
        }
        private void btnRGB_Click(object sender, EventArgs e)
        {
            int[] customColors = new int[]
            {
                0x33, 0x66, 0x99, 0xCC, 0x3300, 0x3333,
                0x3366, 0x3399, 0x33CC, 0x6600, 0x6633,
                0x6666, 0x6699, 0x66CC, 0x9900, 0x9933,
            };

            Color color = _color;

            if (SaveLoadDialogs.SelectColor(ref color, customColors))
            {
                _color = Color.FromArgb(
                    _color.A,
                    color.R,
                    color.G,
                    color.B
                    );
            }
            refreshUI();
        }