Exemplo n.º 1
0
        public PaletteControl()
        {
            SelectedIndex = -1;
            Selection = SelectionType.SingleSelect;

            Items = new PaletteList(15, Invalidate);
            for (int i = 0; i < Items.Length; i++)
                Items[i] = AC.Palette.GetColorIndexByCode(AC.Palette.DefaultColorCodes[i]);

            paletteBrushes = AC.Palette.ColorPalette
                .Select(c => new SolidBrush(System.Drawing.Color.FromArgb(c.Red, c.Green, c.Blue)))
                .ToArray();

            InitializeComponent();
        }
Exemplo n.º 2
0
 public ColorDialog(PaletteList list)
     : this()
 {
     for (int i = 0; i < list.Length; i++)
         Items[i] = list[i];
 }