public Training_Form(newuserform _Parent, ref int error, string name)
 {
     InitializeComponent();
     Parent3 = _Parent;
     //Face = Parent.Face;
     //Face = new HaarCascade(Application.StartupPath + "/Cascades/haarcascade_frontalface_alt2.xml");
     Face = new CascadeClassifier(Application.StartupPath + "/Cascades/haarcascade_frontalface_default.xml");//Our face detection method
     ENC_Parameters.Param[0] = ENC;
     NAME_PERSON.Text        = name;
     Image_Encoder_JPG       = GetEncoder(ImageFormat.Jpeg);
     try
     {
         initialise_capture();
         error = 0;
     }
     catch
     {
         MessageBox.Show("Не удалось подключить камеру");
         this.Close();
         error = 1;
     }
 }
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            newuserform nuf = new newuserform();

            nuf.Show();
        }
        private void button3_Click(object sender, EventArgs e)
        {
            newuserform nuf = new newuserform();

            nuf.Show();
        }