| | |
| | | else |
| | | { |
| | | Method method = new Method(); |
| | | method.AddControl(this, (control1) => { |
| | | method.AddControl(this, (controlDevice) => { |
| | | AddButton addButton = new AddButton(); |
| | | MainPage.BasePageView.AddChidren(addButton); |
| | | addButton.Show(control1); |
| | | addButton.Show(controlDevice); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | } |
| | |
| | | { |
| | | MainPage.BasePageView.RemoveViewByTag("AddControl"); |
| | | MainPage.BasePageView.RemoveViewByTag("Pir"); |
| | | |
| | | Entity.Function function = new Entity.Function(); |
| | | function.sid = control.sid; |
| | | function.deviceId = control.deviceId; |
| | | function.name = control.name; |
| | | function.spk = control.spk; |
| | | function.attributes.AddRange(function.attributes); |
| | | if (null == Pir.currPir.FunctioList.Find((c) => c.sid == function.sid)) |
| | | { |
| | | Pir.currPir.FunctioList.Add(function); |
| | | } |
| | | //Entity.FunctionAttributes functionAttributes = new Entity.FunctionAttributes(); |
| | | //functionAttributes.key |
| | | |
| | | |
| | | }; |
| | | #endregion |
| | | } |