예제 #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;
            }
        }
예제 #2
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;
                }
            }
        }
예제 #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;
            }
        }