示例#1
0
        public VideoReplayForm(int gateTotal)
        {
            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);
            }

            this.dateTimePicker_startTime.Format = DateTimePickerFormat.Custom;
            this.dateTimePicker_startTime.Text = DateTime.Now.ToString();
            this.dateTimePicker_startTime_time.Text = DateTime.Now.ToString();
            this.dateTimePicker_endTime.Format = DateTimePickerFormat.Custom;
            this.dateTimePicker_endTime.Text = DateTime.Now.ToString();
            this.dateTimePicker_endTime_time.Text = DateTime.Now.ToString();

            //以下初始化通道
            object[] items = new object[gateTotal];
            for (int i = 0; i < gateTotal; i++)
            {
                items[i] = (i + 1).ToString();
            }
            this.comboBox__channel.Items.AddRange(items);
            this.comboBox__channel.SelectedIndex = 0;
        }
        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);
        }
示例#3
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;
            }
        }