示例#1
0
        void OnPictureBoxClicked(object sender, MouseEventArgs args)
        {
            var location = args.Location;

            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                Color   color  = colorDialog1.Color;
                Filters filter = new ColorBased(color, location.X, location.Y, image);
                backgroundWorker.RunWorkerAsync(filter);
            }
        }
示例#2
0
        private void опорныйЭлементToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int x = Convert.ToInt32(textBox1.Text);
            int y = Convert.ToInt32(textBox2.Text);

            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                Color   color  = colorDialog1.Color;
                Filters filter = new ColorBased(color, x, y, image);
                backgroundWorker.RunWorkerAsync(filter);
            }
        }