Пример #1
0
        private void Play()
        {
            anpr       = new ANPR(camera.timeout + 50, camera.countForPass, camera.size);
            anpr.camID = camera.camID;

            string path = camera.camURL;

            //string path = @".\netDev_04.ts";
            player = new MediaPlayer(".\\plugins");

            player.SetRenderWindow((int)this.panel1.Handle);
            player.PlayStream(path, 1920, 1080);
            //player.PlayFile(path);

#if TEST_PAINTEVENT
            panel1.Paint += panel1_Paint; // change to timer
#else
            //
            timerEvent = new AutoResetEvent(true);
            timer      = new System.Threading.Timer(MediaTimerCallBack, null, 100, camera.timeout);
            anpr.ANPRRunThread();
            anpr.ANPRDetected += anpr_ANPRDetected;
#endif

            connectToolStripMenuItem.Enabled    = false;
            disconnectToolStripMenuItem.Enabled = true;

            notifyColor = Color.Red;
        }
Пример #2
0
        private void connectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            anpr       = new ANPR();
            anpr.camID = camera.camID;

            //string path = camera.camURL;
            string path = @"C:\VideoTest\LPR\2016-02-17_14-45-00.avi";

            player = new MediaPlayer(".\\plugins");

            player.SetRenderWindow((int)this.panel1.Handle);
            //player.PlayStream(path, 1920, 1080);
            player.PlayFile(path);

#if TEST_PAINTEVENT
            panel1.Paint += panel1_Paint; // change to timer
#else
            //
            timerEvent = new AutoResetEvent(true);
            timer      = new System.Threading.Timer(MediaTimerCallBack, null, 100, 33);
            anpr.ANPRRunThread();
            anpr.ANPRDetected += anpr_ANPRDetected;
#endif

            connectToolStripMenuItem.Enabled    = false;
            disconnectToolStripMenuItem.Enabled = true;
        }
Пример #3
0
        private void Play()
        {
            anpr = new ANPR(camera.timeout, camera.countForPass, camera.size);
            anpr.camID = camera.camID;

            string path = camera.camURL;
            //string path = @".\netDev_04.ts";
            player = new MediaPlayer(".\\plugins");

            player.SetRenderWindow((int)this.panel1.Handle);
            player.PlayStream(path, 1920, 1080);
            //player.PlayFile(path);

#if TEST_PAINTEVENT
            panel1.Paint += panel1_Paint; // change to timer
#else
            //
            timerEvent = new AutoResetEvent(true);
            timer = new System.Threading.Timer(MediaTimerCallBack, null, 100, camera.timeout);
            anpr.ANPRRunThread();
            anpr.ANPRDetected += anpr_ANPRDetected;
#endif

            connectToolStripMenuItem.Enabled = false;
            disconnectToolStripMenuItem.Enabled = true;

            notifyColor = Color.Red;
        }
Пример #4
-39
        private void connectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            anpr = new ANPR();
            anpr.camID = camera.camID;

            //string path = camera.camURL;
            string path = @"C:\VideoTest\LPR\2016-02-17_14-45-00.avi";
            player = new MediaPlayer(".\\plugins");

            player.SetRenderWindow((int)this.panel1.Handle);
            //player.PlayStream(path, 1920, 1080);
            player.PlayFile(path);

            #if TEST_PAINTEVENT
            panel1.Paint += panel1_Paint; // change to timer
            #else
            //
            timerEvent = new AutoResetEvent(true);
            timer = new System.Threading.Timer(MediaTimerCallBack, null, 100, 33);
            anpr.ANPRRunThread();
            anpr.ANPRDetected += anpr_ANPRDetected;
            #endif

            connectToolStripMenuItem.Enabled = false;
            disconnectToolStripMenuItem.Enabled = true;
        }