public Harshness(change ownerForm)
 {
     this.OwnerForm = ownerForm;
     InitializeComponent();
     this.button1.Click += new System.EventHandler(this.button_Click);
     this.FormClosing   += new FormClosingEventHandler(Harshness_FormClosing);
 }
Exemplo n.º 2
0
 public color_balance(change ownerForm)
 {
     this.OwnerForm = ownerForm;
     InitializeComponent();
     this.button1.Click += new System.EventHandler(this.button_Click);
     this.FormClosing   += new FormClosingEventHandler(color_balance_FormClosing);
 }
Exemplo n.º 3
0
 private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
 {
     //рисование
     pictureBox1.Paint -= Selection_Paint;
     pictureBox1.Paint += pictureBox1_Paint;
     pictureBox1.Invalidate();
     perem              = false;
     obl                = true;
     pictureBox1.Paint += pictureBox1_Paint;
     pictureBox1.Refresh();
     if (x != e.X)
     {
         //открытие формы изменений
         stat_rec = Filter.coord_pict(x, y, e.X, e.Y);
         Form f = new change(Filter.copy_pict(pictureBox1.Image, stat_rec), stat_rec);
         f.Owner = this;
         f.ShowDialog();
     }
     else
     {
         MessageBox.Show("Занадто малий малюнок!");
     }
 }
Exemplo n.º 4
0
        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            List <Form> openForms = new List <Form>();

            foreach (Form form in Application.OpenForms)
            {
                openForms.Add(form);
            }


            switch (nom_form)
            {
            case -1:
            {
                //рисование
                pictureBox1.Paint -= Selection_Paint;
                pictureBox1.Paint += pictureBox1_Paint;
                pictureBox1.Invalidate();
                perem              = false;
                obl                = true;
                pictureBox1.Paint += pictureBox1_Paint;
                pictureBox1.Refresh();
                if (schet != 3)
                {
                    if (x != e.X)
                    {
                        schet++;
                        //открытие формы изменений
                        stat_rec = Filter.coord_pict(x, y, e.X, e.Y);
                        if (prov[0])
                        {
                            Form f = new change(Filter.copy_pict(pictureBox1.Image, stat_rec));
                            f.Owner = this;
                            f.Show();
                            prov[0] = false;
                            zed[0]  = stat_rec;
                            return;
                        }
                        if (prov[1])
                        {
                            Form f = new change1(Filter.copy_pict(pictureBox1.Image, stat_rec), stat_rec);
                            f.Owner = this;
                            f.Show();
                            prov[1] = false;
                            zed[1]  = stat_rec;
                            return;
                        }
                        if (prov[2])
                        {
                            Form f = new change2(Filter.copy_pict(pictureBox1.Image, stat_rec), stat_rec);
                            f.Owner = this;
                            f.Show();
                            prov[2] = false;
                            zed[2]  = stat_rec;
                            return;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Не більше 3х малюнків.");
                }
                break;
            }

            case 0:
            {
                foreach (Form form in openForms)
                {
                    form.Show();
                }
                nom_form = -1;
                break;
            }

            case 1:
            {
                foreach (Form form in openForms)
                {
                    form.Show();
                }
                nom_form = -1;
                break;
            }

            case 2:
            {
                foreach (Form form in openForms)
                {
                    form.Show();
                }
                nom_form = -1;
                break;
            }
            }
        }