Example #1
0
 protected override void OnClosed(EventArgs e)
 {
     base.OnClosed(e);
     if (videoSource != null && videoSource.IsRunning)
     {
         videoSource.SignalToStop();
         videoSource = null;
     }
 }
Example #2
0
 private void sair(object sender, EventArgs e)
 {
     if (videoSource != null && videoSource.IsRunning)
     {
         videoSource.SignalToStop();
         videoSource = null;
     }
     this.Close();
 }
Example #3
0
 public void tirar_foto(object sender, EventArgs e)
 {
     if (take.Text == "Save")
     {
         perfilPB.Image.Save("snapshot.png", System.Drawing.Imaging.ImageFormat.Png);
         videoSource.SignalToStop();
         videoSource            = null;
         perfilPB.ImageLocation = @".\snapshot.png";
         perfilPB.SizeMode      = PictureBoxSizeMode.Zoom;
         take.Text = "Tirar";
     }
     else
     {
         take.Text = "Save";
         Ini_tirar_foto();
     }
 }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            base.OnClosed(e);

            if (videoSource != null && videoSource.IsRunning)
            {
                videoSource.SignalToStop();
                videoSource = null;
            }
        }
Example #5
0
        private void TakePicture_FormClosed(object sender, FormClosedEventArgs e)
        {
            base.OnClosed(e);

            if (videoSource != null && videoSource.IsRunning)
            {
                this.takenPicture.Dispose();
                this.pictureBox1.Image.Dispose();
                videoSource.SignalToStop();
                videoSource = null;
            }
        }