| | |
| | | //测试Text |
| | | testBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | var library = libraryList[index-1]; |
| | | var library = libraryList[index - 1]; |
| | | var control = GetControl(spk, testBtn.TextID, library); |
| | | //发送测试码命令 |
| | | CodeTest(control); |
| | | Method.ThreadSend(control, (responsePackNew) => { }, "库码测试", "frame", this, null); |
| | | if (code == 3) { |
| | | //标记最后那个码 |
| | | if_bool = true; |
| | |
| | | var control = GetControl(spk, testBtn.TextID, library); |
| | | Method method = new Method(); |
| | | //发送库添加遥控器命令 |
| | | method.ThreadAddControl(control, this, (cont) => |
| | | method.ThreadAddControl(control, this, (device) => |
| | | { |
| | | MainPage.BasePageView.RemoveViewByTag("PirView"); |
| | | AddControlComplete addControlComplete = new AddControlComplete(); |
| | | MainPage.BasePageView.AddChidren(addControlComplete); |
| | | addControlComplete.Show(cont, true); |
| | | addControlComplete.Show(device, true); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | |
| | |
| | | } |
| | | |
| | | return control; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 发送库码测试命令 |
| | | /// </summary> |
| | | /// <param name="control"></param> |
| | | private void CodeTest(Control control) |
| | | { |
| | | |
| | | //加载log |
| | | Loading loading = new Loading(); |
| | | this.AddChidren(loading); |
| | | HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null; |
| | | loading.Start(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | try |
| | | { |
| | | responsePackNew = PirSend.CodeTest(control); |
| | | } |
| | | catch { } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | loading.Hide(); |
| | | if (responsePackNew != null && responsePackNew.Code == "0" && responsePackNew.Data.ToString() != "") |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | //Method method = new Method(); |
| | | //method.ErrorShow(responsePackNew); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |