Пример #1
0
        /// <summary>
        /// 打开计量点的硬盘录像机
        /// </summary>
        /// <param name="iPoundRoom">计量点索引</param>
        private void RecordOpen(int iPoundRoom)
        {
            int i = iPoundRoom;

            if (i < 0 || _measApp == null || _measApp.Dvr == null || string.IsNullOrEmpty(_measApp.Params.FS_VIEDOIP))
            {
                return;
            }

            //    if (m_PoundRoomArray[i].Signed != true)//未接管的计量点
            //    {
            //        return;
            //    }

            if (_measApp == null)
            {
                _measApp = new CoreApp();
                _measApp.Params = m_Points[iPoundRoom];
                _measApp.Params.FS_PRINTERNAME = new System.Drawing.Printing.PrintDocument().PrinterSettings.PrinterName;
                _measApp.Init();
                _measApp.Weight.WeightChanged += new Core.Sip.Client.Meas.WeightChangedEventHandler(OnWeightChanged);
                _measApp.Weight.WeightCompleted += new Core.Sip.Client.Meas.WeightCompletedEventHandler(OnWeightCompleted);
                _measApp.VideoChannel[0] = _measApp.Dvr.SDK_RealPlay(1, 0, (int)VideoChannel1.Handle);
                _measApp.VideoChannel[1] = _measApp.Dvr.SDK_RealPlay(2, 0, (int)VideoChannel2.Handle);
                _measApp.VideoChannel[2] = _measApp.Dvr.SDK_RealPlay(3, 0, (int)VideoChannel3.Handle);
                _measApp.VideoChannel[3] = _measApp.Dvr.SDK_RealPlay(4, 0, (int)VideoChannel4.Handle);
                _measApp.Run();
            }
        }