| | |
| | | } |
| | | |
| | | } |
| | | //GetControlList(frame, action); |
| | | // GetControlList(); |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | |
| | | // action(); |
| | | try |
| | | { |
| | | if (Pir.pirDeviceList.Count != 0) |
| | | { |
| | | GetControlList1(frame, action); |
| | | var list = Pir.pirDeviceList; |
| | | GetControlList(() => |
| | | { |
| | | loading.Hide(); |
| | | action(); |
| | | |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | //Method method = new Method(); |
| | | //method.ErrorShow(responsePackNew); |
| | | loading.Hide(); |
| | | Method method = new Method(); |
| | | method.ErrorShow(null,"读取红外宝列表失败"); |
| | | } |
| | | } |
| | | catch { } |
| | |
| | | /// <summary> |
| | | /// 获取遥控器列表 |
| | | /// </summary> |
| | | public static void GetControlList() |
| | | public static void GetControlList(Action actio) |
| | | { |
| | | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | |
| | | try |
| | | { |
| | | for (int i = 0; i < Pir.pirDeviceList.Count; i++) |
| | | { |
| | | var pirDevice = Pir.pirDeviceList[i]; |
| | |
| | | catch { } |
| | | |
| | | } |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | actio(); |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | |
| | | /// </summary> |
| | | /// <param name="responsePackNew"></param> |
| | | /// <param name="str"></param> |
| | | public void ErrorShow(ResponsePackNew responsePackNew, string str = "") |
| | | public void ErrorShow(ResponsePackNew responsePackNew=null, string str = "") |
| | | { |
| | | if (str == "删除遥控器") |
| | | { |
| | | new Intelligence.Automation.LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); |
| | | } else if (str == "读取红外宝列表失败") { |
| | | |
| | | new Intelligence.Automation.LogicView.TipPopView().FlashingBox("读取红外宝列表失败"); |
| | | } |
| | | else |
| | | { |