Exemple #1
0
 private void textParam_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         e.Handled = true;
         param     = textParam.Text;
         Colormap.Generate(baseColor1, baseColor2, numCol, param, out colors);
         pictureBox1.Invalidate();
     }
 }
Exemple #2
0
        private void numColors_ValueChanged(object sender, EventArgs e)
        {
            numCol = (int)numColors.Value;
            if (numCol > 9)
            {
                numCol = 9;
            }
            if (numCol < 3)
            {
                numCol = 3;
            }
            param = textParam.Text;

            Colormap.Generate(baseColor1, baseColor2, numCol, param, out colors);
            pictureBox1.Invalidate();
        }
Exemple #3
0
        public Form1()
        {
            InitializeComponent();
            Text += " (rev: " + rev + ')';
            InitPaletteData();

            baseBox1.color  = baseColor1;
            label1.Text     = color2string(baseColor1);
            baseBox2.color  = baseColor2;
            label2.Text     = color2string(baseColor2);
            textParam.Text  = param;
            numColors.Value = numCol;

            Colormap.Generate(baseColor1, baseColor2, numCol, param, out colors);
            pictureBox1.Invalidate();
        }
Exemple #4
0
        private void buttonColor2_Click(object sender, EventArgs e)
        {
            DialogResult res = colorDialog1.ShowDialog();

            if (res == DialogResult.Cancel)
            {
                return;
            }

            baseColor2     = colorDialog1.Color;
            baseBox2.color = baseColor2;
            label2.Text    = color2string(baseColor2);
            baseBox2.Invalidate();
            label2.Invalidate();
            param = textParam.Text;

            Colormap.Generate(baseColor1, baseColor2, numCol, param, out colors);
            pictureBox1.Invalidate();
        }