public void Start()
        {
            app             = WindownApplication.getInstance();
            HistoricalReply = app.GetHistoricalReplyService();
            // HistoricalReply.loadVhHistoricalInfo();

            HistoricalReply.PlayScheduleChanged += PlayScheduleChangeHandle;
            HistoricalReply.LoadComplete        += setListBox;

            var vh_ids = app.ObjCacheManager.GetVEHICLEs().Select(vh => vh.VEHICLE_ID);

            cmb_vh_id.Items.Add(KEY_WORD_ALL);
            cmb_vh_id.Items.AddRange(vh_ids.ToArray());
        }
        public WindownApplication()
        {
            ViewerID         = getString("Viewer_ID", "");
            webClientManager = WebClientManager.getInstance();

            ObjCacheManager = new ObjCacheManager(this);

            elasticSearchManager = new ElasticSearchManager();

            RailDao             = new RAILDao();
            AddressDao          = new ADDRESSDao();
            PortIconDao         = new PortIconDao();
            PointDao            = new POINTDao();
            GroupRailDao        = new GROUPRAILSDao();
            SegmentDao          = new SegmentDao();
            SectionDao          = new SectionDao();
            PortDao             = new PortDao();
            VehicleDao          = new VehicleDao();
            UserDao             = new UserDao();
            UserGroupDao        = new UserGroupDao();
            UserFuncDao         = new UserFuncDao();
            FunctionCodeDao     = new FunctionCodeDao();
            CMD_OHTCDao         = new CMD_OHTCDao();
            CMD_MCSDao          = new CMD_MCSDao();
            VCMD_MCSDao         = new VCMD_MCSDao();
            PortStationDao      = new PortStationDao();
            AlarmDao            = new AlarmDao();
            MapBLL              = new MapBLL(this);
            UserBLL             = new UserBLL(this);
            OperationHistoryBLL = new OperationHistoryBLL(this);
            CmdBLL              = new CmdBLL(this);
            AlarmBLL            = new AlarmBLL(this);
            PortStationBLL      = new PortStationBLL(this);
            SegmentBLL          = new SegmentBLL(this);
            ObjCacheManager.start();
            ID = ObjCacheManager.MapId;

            LineBLL             = new LineBLL(this);
            VehicleBLL          = new VehicleBLL(this);
            SysExcuteQualityBLL = new SysExcuteQualityBLL(this);

            dBTableWatcher = new EventAction.DBTableWatcher(this);
            dBTableWatcher.initStart();
            // setEFConnectionString(ObjCacheManager.EFConnectionString);



            SysExcuteQualityQueryService = new SysExcuteQualityQueryService(this);
            //initBackgroundWork();
            //  SysExcuteQualityQueryService = new SysExcuteQualityQueryService();
            switch (WindownApplication.OHxCFormMode)
            {
            case OHxCFormMode.CurrentPlayer:
                natsManager       = new NatsManager(ID, "nats-cluster", ViewerID);
                redisCacheManager = new RedisCacheManager(ID);
                SubscriberNatsEvent();
                SubscriberDBTableWatcherEvent();
                //SysExcuteQualityQueryService.start();
                break;

            case OHxCFormMode.HistoricalPlayer:
                HistoricalReplyService = new HistoricalReplyService(this);
                //HistoricalReplyService.loadVhHistoricalInfo();
                break;
            }
            //VehicleBLL.ReguestViewerUpdate();
        }