Beispiel #1
0
        private void selectMonitor(Panel panel)
        {
            string name = panel.Name;
            //name 由 panel + 闸机号构成
            string selectedGateNo = name.Substring(5);
            int    gateNo         = Int32.Parse(selectedGateNo);



            //不是上一次监控的闸机
            if (previewMonitor != monitorList[gateNo - 1])
            {
                previewControler.setMonitor(monitorList[gateNo - 1]);
                bool isSuccess = previewControler.preview();

                if (isSuccess)
                {
                    previewMonitor       = monitorList[gateNo - 1];
                    previewMonitorPanels = panel;

                    xtraTabControl.SelectedTabPage = xtraTabPage_shipinMonitor;
                }
                else
                {
                    previewMonitor       = null;
                    previewMonitorPanels = null;
                }

                //设置视频监控中选中的闸机
                comboBox_shipin_1.SelectedIndex = gateNo - 1;
            }
        }
Beispiel #2
0
        public void viewVideo()
        {
            Monitor monitor = new Monitor();

            monitor.gateNo = comboBox__channel.SelectedIndex + 1;
            playbackControler.setMonitor(monitor);
            GateRecord gateRecord = new GateRecord();
            DateTime   dt         = DateTime.Parse(dateTimePicker_startTime.Text + " " + dateTimePicker_startTime_time.Text);
            DateTime   dt1        = DateTime.Parse(dateTimePicker_endTime.Text + " " + dateTimePicker_endTime_time.Text);

            gateRecord.nvr_begintime = dt;
            gateRecord.nvr_endtime   = dt1;
            playbackControler.play(gateRecord);
        }
Beispiel #3
0
        private void comboBox_shipin_3_SelectedIndexChanged(object sender, EventArgs e)
        {
            int gateNo = comboBox_shipin_3.SelectedIndex + 1;

            //不是上一次监控的闸机
            if (previewMonitor2 != monitorList[gateNo - 1])
            {
                previewControler2.setMonitor(monitorList[gateNo - 1]);
                bool isSuccess = previewControler2.preview();

                if (isSuccess)
                {
                    previewMonitor2 = monitorList[gateNo - 1];
                }
                else
                {
                    previewMonitor2 = null;
                }
            }
        }
Beispiel #4
0
        public void initMonitorControler()
        {
            ICustomsCMS server = XmlRpcInstance.getInstance();

            previewControler1 = new H264Controler(this.videoPlayWnd_1, server);
            previewControler  = new H264Controler(this.videoPlayWnd, server);

            previewControler2 = new H264Controler(this.videoPlayWnd_2, server);
            previewControler.setToolStripStatusLabel(this.toolStripStatusLabel);
            previewControler1.setToolStripStatusLabel(this.toolStripStatusLabel);
            previewControler2.setToolStripStatusLabel(this.toolStripStatusLabel);
            bool isSuccess = previewControler.init();

            isSuccess = previewControler1.init() || isSuccess;
            isSuccess = previewControler2.init() || isSuccess;
            if (!isSuccess)
            {
                System.Environment.Exit(0);
            }
            previewMonitor  = this.monitorList[0];
            previewMonitor1 = this.monitorList[1];
            previewMonitor2 = this.monitorList[2];
            previewControler.setMonitor(previewMonitor);
            previewControler1.setMonitor(this.monitorList[1]);
            previewControler2.setMonitor(this.monitorList[2]);
            isSuccess = previewControler.preview();
            isSuccess = previewControler1.preview() || isSuccess;
            isSuccess = previewControler2.preview() || isSuccess;
            if (isSuccess)
            {
                Panel panel = this.monitorPanels[0];
                previewMonitorPanels = panel;
            }
            else
            {
                previewMonitor       = null;
                previewMonitorPanels = null;
            }
        }
        public ClearanceVideoReplayForm(DataRow dr)
        {
            InitializeComponent();

            ICustomsCMS server = XmlRpcInstance.getInstance();

            playbackControler = new H264Controler(this.searchVideoPlayWnd, server);
            playbackControler.setToolStripStatusLabel(this.toolStripStatusLabel);
            bool isSuccess = playbackControler.init();

            if (!isSuccess)
            {
                System.Environment.Exit(0);
            }

            gateRecord = new ModelHandler <GateRecord>().FillModel(dr);
            Monitor monitor = new Monitor();

            monitor.gateNo = gateRecord.gate_id;
            playbackControler.setMonitor(monitor);

            playbackControler.play(gateRecord);
        }