| | |
| | | //添加所有遥控名称列表 |
| | | list.Add(Pir.currPir.FunctioList[i].name); |
| | | } |
| | | Method method = new Method(); |
| | | PirMethod method = new PirMethod(); |
| | | method.EditControlName(StringId.editName, list, control.name, (name, dialog) => |
| | | { |
| | | //发送更新名称命令 |
| | | Method.ThreadSend(new Control { deviceId = control.deviceId, name = name }, (responsePackNew) => |
| | | PirMethod.ThreadSend(new Control { deviceId = control.deviceId, name = name }, (responsePackNew) => |
| | | { |
| | | //关闭窗口 |
| | | dialog.Close(); |
| | |
| | | //所属区域点击事件 |
| | | quyuPatchView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | Method method = new Method(); |
| | | PirMethod method = new PirMethod(); |
| | | method.ManagementPosition(GetFunction(control.deviceId), () => |
| | | { |
| | | //更新区域 |
| | |
| | | { |
| | | if (bool_library) |
| | | {//继续添加库的遥控器 |
| | | Method.RefreshView("PirMain");//刷新指点界面 |
| | | PirMethod.RefreshView("PirMain");//刷新指点界面 |
| | | this.RemoveFromParent(); |
| | | } |
| | | else |
| | | {//继续添加自定义的遥控器 |
| | | Method method = new Method(); |
| | | PirMethod method = new PirMethod(); |
| | | method.AddControl(this, (controlDevice) => |
| | | { |
| | | AddButton addButton = new AddButton(); |
| | |
| | | saveView.btnClick.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | //刷新指点界面 |
| | | Method.RefreshView("PirMain"); |
| | | PirMethod.RefreshView("PirMain"); |
| | | //移除所有界面 |
| | | MainPage.BasePageView.RemoveViewByTag("PirView"); |
| | | }; |
| | |
| | | public override void RemoveFromParent() |
| | | { |
| | | //刷新指定界面 |
| | | Method.RefreshView("PirMain"); |
| | | PirMethod.RefreshView("PirMain"); |
| | | base.RemoveFromParent(); |
| | | } |
| | | } |