private void 确定_Click(object sender, RoutedEventArgs e) { if (isSendStatu == false) { return; } if ("正常".Equals(crt310lbl.Text) && "正常".Equals(zt598lbl.Text) && "正常".Equals(printlbl.Text) && "正常".Equals(cj201lbl.Text) && "正常".Equals(crt603lbl.Text)) { sendStatu = new Thread(delegate() { try { isSendStatu = false; DeviceState.SendStatu(); showInfo("监控平台状态:" + MaintainSignAccess.upException(SysBLL.maintainSignParam.Account)); isSendStatu = true; } catch (Exception ex) { log.Write("error:维护人员提交修复异常:" + ex.Message); showInfo("监控平台状态:" + "提交失败"); isSendStatu = true; } }); sendStatu.Start(); } else { showInfo("监控平台状态:" + "异常未处理"); } }
//发送设备状态事件 private void SendDeviceWorker_DoWork(object sender, DoWorkEventArgs e) { while (true) { try { //设置页面滚动信息 this.GClbl.Dispatcher.Invoke(new setTextBlockTextDelegate(setTextBlockText), this.GClbl, SysConfigHelper.readerNode("mainTopInfo")); Thread.Sleep((1000 * 60) * 5); //获取缴费页面提示 SysBLL.payPromptInfo = PayPromptAccess.queryPayPrompt(null); //签到 setSignTime(); //SysBLL.ClearMemory(); if (!SysBLL.IsOpenIndexForm) { continue; } DeviceState.SendStatu(); } catch (Exception ex) { log.Write("error:发送设备状态异常_SendDeviceWorker_DoWork:" + ex.Message); } } }