Beispiel #1
0
 //обновление изображения в Bitmap и pictureBox при закрытии окна
 private void Form2_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (DetektorForm.full_name_of_image != "\0")
     {
         DetektorForm.FromPixelToBitmap();
         FromBitmapToScreen();
     }
 }
Beispiel #2
0
 public BrightForm(DetektorForm ownerForm)
 {
     this.OwnerForm = ownerForm;
     InitializeComponent();
     this.button1.Click += new System.EventHandler(this.button_Click);
     this.button2.Click += new System.EventHandler(this.button_Click);
     this.FormClosing   += new FormClosingEventHandler(Form2_FormClosing);
 }
Beispiel #3
0
 public ColorBalanceSettingsForm(DetektorForm ownerForm)
 {
     this.OwnerForm = ownerForm;
     InitializeComponent();
     this.button1.Click += new System.EventHandler(this.button_Click);
     this.button2.Click += new System.EventHandler(this.button_Click);
     this.button3.Click += new System.EventHandler(this.button_Click);
     this.FormClosing   += new FormClosingEventHandler(Form3_FormClosing);
 }
Beispiel #4
0
        //изменение контрастности
        private void trackBar2_Scroll(object sender, EventArgs e)
        {
            if (DetektorForm.full_name_of_image != "\0")
            {
                UInt32 p;
                for (int i = 0; i < DetektorForm.image.Height; i++)
                {
                    for (int j = 0; j < DetektorForm.image.Width; j++)
                    {
                        p = BrightnessContrast.Contrast(DetektorForm.pixel[i, j], trackBar2.Value, trackBar2.Maximum);
                        DetektorForm.FromOnePixelToBitmap(i, j, p);
                    }
                }

                FromBitmapToScreen();
            }
        }