Beispiel #1
0
        private void bunifuFlatButton1_Click_1(object sender, EventArgs e)
        {
            enseignant en = new enseignant();

            en.cin           = cin;
            en.mots_de_passe = pass;

            try
            {
                db = new loginteachDataContext();
                var query = from enseignant in db.enseignants
                            where enseignant.cin == en.cin
                            select enseignant;
                List <enseignant> listeEns = query.ToList <enseignant>();
                if (listeEns.Count == 0)
                {
                    MessageBox.Show("cin introuvable veuillez vérifier !");
                }
                else
                {
                    enseignant enss = listeEns[0];
                    if (enss.mots_de_passe != en.mots_de_passe)
                    {
                        MessageBox.Show("mot de passe incorrect");
                    }
                    else
                    {
                        login.ValidatedEns               = new enseignant();
                        login.ValidatedEns.cin           = enss.cin;
                        login.ValidatedEns.mots_de_passe = enss.mots_de_passe;
                        login.ValidatedEns.nom           = enss.nom;
                        login.ValidatedEns.prenom        = enss.prenom;
                        login.ValidatedEns.mail          = enss.mail;
                        login.ValidatedEns.photo         = enss.photo;
                        login.ValidatedEns.code_a_bar    = enss.code_a_bar;
                        touch.Dispose();
                        Accueil_Enseignant ac = new Accueil_Enseignant();
                        ac.Show();

                        this.Hide();
                    }
                }
            }
            catch (SqlException ex)
            {
                MessageBox.Show("Erreur de connection BD " + ex.Message);
            }
        }
Beispiel #2
0
        protected override void OnClosing(CancelEventArgs e)
        {
            StopDecoding();

            _touchlessLibManager.Dispose();

            base.OnClosing(e);
        }
Beispiel #3
0
 private void button3_Click_1(object sender, EventArgs e)
 {
     button2.Visible = true;
     button3.Visible = false;
     button4.Visible = false;
     myCamera.Dispose();
     myCamera = null;
 }
Beispiel #4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Dispose of the TouchlessMgr object
     if (_touchlessMgr != null)
     {
         _touchlessMgr.Dispose();
         _touchlessMgr = null;
     }
 }
Beispiel #5
0
 void finalizeCamera()
 {
     if (touchlessMgr != null)
     {
         touchlessMgr.Dispose();
     }
     if (currentCamera != null)
     {
         currentCamera.Dispose();
     }
 }
Beispiel #6
0
        private void InitCameras()
        {
            TouchlessMgr _mgr = new TouchlessMgr();

            ComboBoxCameras.Items.Clear();
            foreach (Camera c in _mgr.Cameras)
            {
                this.ComboBoxCameras.Items.Add(c.ToString());
            }

            _mgr.Dispose();
            _mgr              = null;
            PictureBox.Paint += new PaintEventHandler(PictureBox_Paint);
        }
Beispiel #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (button1.Text.Equals("Disconnect"))
            {
                availableCamera.Dispose();
                availableCamera  = null;
                button1.Text     = "Connect";
                button1.Visible  = true;
                button1.Enabled  = false;
                textBox3.Enabled = true;
                button2.Enabled  = false;
                Cleanup();
            }



            if (!t1.Pending())
            {
                textBox1.AppendText("\n Client is offline please try again later \n");
            }
            else
            {
                button2.Visible = false;
                textBox1.AppendText("\n Connected successfully............");
                tc = t1.AcceptTcpClient();
                this.textBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckKeys);
                TextChat.Start();
                ep = new IPEndPoint(IPAddress.Parse(textBox3.Text), 5001);
                if (button1.Text.Equals("Connect"))
                {
                    HookRtpEvents();
                    JoinRtpSession(Dns.GetHostName());
                    button1.Text     = "Disconnect";
                    textBox3.Enabled = false;
                    button4.Visible  = true;
                }
            }
        }
        private void InitCameras()
        {
            TouchlessMgr _mgr = new TouchlessMgr();
            ComboBoxCameras.Items.Clear();
            foreach (Camera c in _mgr.Cameras)
            {
                this.ComboBoxCameras.Items.Add(c.ToString());

            }

            _mgr.Dispose();
            _mgr = null;
            PictureBox.Paint += new PaintEventHandler(PictureBox_Paint);
        }