예제 #1
0
 private void mainWinForm_Load(object sender, EventArgs e)
 {
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo);
     //webcam.Start();
     getCamList();
 }
예제 #2
0
파일: Form1.cs 프로젝트: nakibli/MouseCam
 private void mainWinForm_Load(object sender, EventArgs e)
 {
     //Cursor.Position = new Point(1280 ,800);
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo, ref imgCapture,ref pictureBox1);
     webcam.eChangedCursorEvent +=new WebCam.dChangeCursorEvent(MoveCursor);
 }
예제 #3
0
        public static void initWebCam()
        {
            imgVideo = new System.Windows.Forms.PictureBox();
            imgVideo.Size = new System.Drawing.Size(163, 160);

            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            webcam.Start();
        }
예제 #4
0
파일: Form1.cs 프로젝트: ruizz/C.A.D.S.
        private void mainWinForm_Load(object sender, EventArgs e)
        {
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            webcam.Start();

            thread = new Thread(new ThreadStart(captureMovement));
            thread.Start();
        }
예제 #5
0
파일: Form1.cs 프로젝트: GarageInc/all
 private void mainWinForm_Load(object sender, EventArgs e)
 {
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo);
 }
예제 #6
0
파일: Form1.cs 프로젝트: lx128/ForSchool
        private void mainWinForm_Load(object sender, EventArgs e)
        {
            string line, str;
            int    ret = 0;
            byte   comp;

            bntCapture.Enabled = false;
            bntSave.Enabled    = false;
            button1.Enabled    = false;
            webcam             = new WebCam();

            webcam.InitializeWebCam(ref imgVideo);

            if (!File.Exists("siecle.csv"))
            {
                MessageBox.Show("Fichier siecle.csv introuvable.\nCe fichier est une extraction de Siecle (anciennement sconet) avec les champs:\n" +
                                "Nom	Prénom 1	Division");
                return;
            }
            line = siecle.LireLigne();

            //test du séparateur
            if (line.IndexOf(';') == -1)
            {
                siecle.Ferme();
                MessageBox.Show("Le fichier siecle.csv doit avoir ; pour séparateur de colone.\n" +
                                "Il doit aussi contenir Nom, Prénom 1, Prénom 2, Prénom 3, Code Structure");
                return;
            }

            for (comp = 0; -1 != myCLR.element(line, comp, out str, ';'); comp++)
            {
                switch (str)
                {
                case "Nom":
                case "NOM":
                    nom = comp;
                    ret = ret + 1;
                    break;

                case "Prénom":
                case "PRENOM":
                    prenom1 = comp;
                    ret     = ret + 1;
                    break;

                case "Prénom 2":
                case "PRENOM2":
                    prenom2 = comp;
                    ret     = ret + 1;
                    break;

                case "Prénom 3":
                case "PRENOM3":
                    prenom3 = comp;
                    ret     = ret + 1;
                    break;

                case "Code Structure":
                case "CLASSES":
                    classe = comp;
                    ret    = ret + 1;
                    break;
                }
            }
            if (ret < 5)
            {
                siecle.Ferme();
                MessageBox.Show("Le fichier siecle.csv ne contient pas tout les champs ou la première ligne ne les présente pas.\n" +
                                "Il doit contenir Nom, Prénom 1, Prénom 2, Prénom 3, Code Structure");
                return;
            }
            while (siecle.EndOfStream != true)
            {
                line = siecle.LireLigne();
                myCLR.element(line, classe, out str, ';');

                if (comboBox1.FindString(str) == -1)
                {
                    comboBox1.Items.Add(str);
                }
                comp++;
            }
        }