private void Ins_eventBoxStateChanged(object sender, BoxStateEventArgs e) { labelId.Dispatcher.Invoke(new Action(() => { string stateInfo = e.getStateInfo(); string state = " id:" + e.boxId + " 状态:" + e.stateCode + " 状态描述:" + stateInfo; labelId.Content = state; })); }
private void Ins_eventBoxStateChanged(object sender, BoxStateEventArgs e) { if (e.stateCode != 0) { LBMsg msg = LightBoxHelper.SelectedModel.getLightBoxMsg(e.boxId); string info = "id=" + e.boxId; if (null != msg) { info += ",\n" + msg.Row1 + "行" + msg.Column + "列,\n" + e.getStateInfo(); } logger.Error(info); SmsComm.ins.sendMessage(info); } }