Пример #1
0
        // Changement de la palette
        void ClickColor(object sender, System.EventArgs e)
        {
            Label colorClick = sender as Label;

            numCol = colorClick.Tag != null ? (int)colorClick.Tag : 0;
            if (!bpEditMode.Checked)
            {
                EditColor ed = new EditColor(numCol, bitmapCpc.Palette[numCol], bitmapCpc.GetPaletteColor(numCol).GetColorArgb, cpcPlus.Checked);
                ed.ShowDialog(this);
                if (ed.isValide)
                {
                    bitmapCpc.SetPalette(numCol, ed.ValColor);
                    if (autoRecalc.Checked)
                    {
                        bpRecalc_Click(sender, e);
                    }
                    else
                    {
                        Render();
                    }
                }
            }
        }
Пример #2
0
        // Changement de la palette
        void ClickColor(object sender, System.EventArgs e)
        {
            Label colorClick = sender as Label;

            numCol = colorClick.Tag != null ? (int)colorClick.Tag : 0;
            if (!modeEdition.Checked)
            {
                EditColor ed = new EditColor(numCol, bitmapCpc.Palette[numCol], bitmapCpc.GetPaletteColor(numCol).GetColorArgb, bitmapCpc.cpcPlus);
                ed.ShowDialog(this);
                if (ed.isValide)
                {
                    bitmapCpc.SetPalette(numCol, ed.ValColor);
                    UpdatePalette();
                    Convert(false);
                }
            }
            else
            {
                if (editImage != null)
                {
                    editImage.SetPenColor(bitmapCpc.GetPaletteColor(numCol));
                }
            }
        }