Ejemplo n.º 1
0
        /// <summary>
        /// 读取NVR配置信息
        /// </summary>
        private void ReadNVRConfig()
        {
            WeighterClientModel wcm = (this.DataContext as VideoMonitorViewModel).CurClientModel;
            string basePath         = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "CarMeasureClient");
            string configPath       = System.IO.Path.Combine(basePath, wcm.ClientId + ".xml");

            Talent.Measure.DomainModel.ConfigReader cfgReader1 = new Talent.Measure.DomainModel.ConfigReader(configPath);
            this.nvrConfig = ConfigReader.ReadAudioConfig();
        }
Ejemplo n.º 2
0
        private void ReadVideoConfig()
        {
            string basePath   = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "CarMeasureClient");
            string configPath = System.IO.Path.Combine(basePath, "SystemConfig.xml");

            Talent.Measure.DomainModel.ConfigReader cfgReader1 = new Talent.Measure.DomainModel.ConfigReader(configPath);
            cfg            = ConfigReader.ReadVideoConfig();
            cfg.CameraList = (from r in cfg.CameraList select r).OrderBy(c => c.Position).ToList();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 读取NVR配置信息
        /// </summary>
        //private void ReadNVRConfig()
        //{
        //    string basePath = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "CarMeasureClient");
        //    string configPath = System.IO.Path.Combine(basePath, this.weightModel.grossweighid + ".xml");
        //    Talent.Measure.DomainModel.ConfigReader cfgReader1 = new Talent.Measure.DomainModel.ConfigReader(configPath);
        //    this.nvrConfig = ConfigReader.ReadAudioConfig();
        //}

        /// <summary>
        /// 读取皮重所在衡器的视频配置
        /// </summary>
        private void ReadPiVideoConfig()
        {
            var clientName = this.weightModel.tareweigh;
            //根据计皮衡器获取衡器的视频配置,暂时先写死
            string basePath   = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "CarMeasureClient");
            string configPath = System.IO.Path.Combine(basePath, this.weightModel.tareweighid + ".xml");

            Talent.Measure.DomainModel.ConfigReader cfgReader1 = new Talent.Measure.DomainModel.ConfigReader(configPath);
            this.piVideoConfig            = ConfigReader.ReadVideoConfig();
            this.piNvrConfig              = ConfigReader.ReadAudioConfig();
            this.piVideoConfig.CameraList = this.piVideoConfig.CameraList.OrderBy(c => c.Position).ToList();
        }
Ejemplo n.º 4
0
        private VideoConfig InitReadVideoConfig()
        {
            string basePath         = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "CarMeasureClient");
            WeighterClientModel wcm = (this.DataContext as VideoMonitorViewModel).CurClientModel;
            string configPath       = System.IO.Path.Combine(basePath, wcm.ClientId + ".xml");

            Talent.Measure.DomainModel.ConfigReader cfgReader1 = new Talent.Measure.DomainModel.ConfigReader(configPath);
            VideoConfig gCfg = ConfigReader.ReadVideoConfig();

            gCfg.CameraList = (from r in gCfg.CameraList select r).OrderBy(c => c.Position).ToList();
            return(gCfg);
        }