/// <summary> /// 执行所有任务 /// </summary> void ExecuteAllTask() { TrainDiscriminatorDAO trainWeight_DAO = TrainDiscriminatorDAO.GetInstance(); TrainDiscriminatorDBW trainWeight_DBW = TrainDiscriminatorDBW.GetInstance(); taskSimpleScheduler.StartNewTask("同步车号识别报文数据", () => { trainWeight_DBW.SyncDBWInfo(this.rTxtOutputer.Output, CommonDAO.GetInstance().GetAppletConfigString("车号识别1文件储存位置"), "1"); trainWeight_DBW.SyncDBWInfo(this.rTxtOutputer.Output, CommonDAO.GetInstance().GetAppletConfigString("车号识别2文件储存位置"), "2"); trainWeight_DBW.SyncDBWInfo(this.rTxtOutputer.Output, CommonDAO.GetInstance().GetAppletConfigString("车号识别3文件储存位置"), "3"); }, 5000, OutputError); taskSimpleScheduler.StartNewTask("同步车号识别报文数据", () => { trainWeight_DBW.SyncDBWInfo(this.rTxtOutputer.Output, CommonDAO.GetInstance().GetAppletConfigString("车号识别4文件储存位置"), "4"); trainWeight_DBW.SyncDBWInfo(this.rTxtOutputer.Output, CommonDAO.GetInstance().GetAppletConfigString("车号识别5文件储存位置"), "5"); }, 2000, OutputError); taskSimpleScheduler.StartNewTask("处理车号识别数据1", () => { trainWeight_DAO.CarSpotsHandle1(this.rTxtOutputer.Output, 1); }, 20000, OutputError); taskSimpleScheduler.StartNewTask("处理车号识别数据2", () => { trainWeight_DAO.CarSpotsHandle(this.rTxtOutputer.Output, 2); }, 20000, OutputError); taskSimpleScheduler.StartNewTask("处理车号识别数据3", () => { trainWeight_DAO.CarSpotsHandle(this.rTxtOutputer.Output, 3); }, 20000, OutputError); taskSimpleScheduler.StartNewTask("处理车号识别数据4", () => { trainWeight_DAO.CarSpotsHandle(this.rTxtOutputer.Output, 4); }, 2000, OutputError); taskSimpleScheduler.StartNewTask("处理车号识别数据5", () => { trainWeight_DAO.CarSpotsHandle(this.rTxtOutputer.Output, 5); }, 2000, OutputError); }
/// <summary> /// 执行所有任务 /// </summary> void ExecuteAllTask() { TrainDiscriminatorDAO trainWeight_DAO = TrainDiscriminatorDAO.GetInstance(); TrainDiscriminatorDBW trainWeight_DBW = TrainDiscriminatorDBW.GetInstance(); TrainDiscriminatorTCPIP trainWeight_TCPIP = TrainDiscriminatorTCPIP.GetInstance(); taskSimpleScheduler.StartNewTask("同步车号识别D报文数据", () => { trainWeight_DAO.Save(trainWeight_DBW.GetDBWInfo(this.rTxtOutputer.Output), this.rTxtOutputer.Output); }, 30000, OutputError); taskSimpleScheduler.StartNewTask("同步车号识别TCP/IP数据", () => { socket = trainWeight_TCPIP.CreateListening(this.rTxtOutputer.Output); trainWeight_TCPIP.StartListening(socket, this.rTxtOutputer.Output); socket.Dispose(); }, 0, OutputError); //taskSimpleScheduler.StartNewTask("测试车号识别TCP/IP数据", () => //{ // trainWeight_TCPIP.sentTime(); //}, 0, OutputError); }