| | |
| | | var library = libraryList[index]; |
| | | var control = GetControl(spk, testBtn.TextID, library); |
| | | Method method = new Method(); |
| | | method.ThreadAddControl(control, this,(control1) => { |
| | | method.ThreadAddControl(control, this,(cont) => { |
| | | MainPage.BasePageView.RemoveViewByTag("PirView"); |
| | | AddControlComplete addControlComplete = new AddControlComplete(); |
| | | MainPage.BasePageView.AddChidren(addControlComplete); |
| | | addControlComplete.Show(control1,true); |
| | | addControlComplete.Show(cont,true); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }); |
| | | |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.ElectricTV: |
| | | case SPK.TvIr: |
| | | { |
| | | switch (textInt) |
| | | { |
| | | case StringId.dianshi: |
| | | case StringId.dianyuan: |
| | | { |
| | | key = "on_off"; |
| | | value = "on"; |
| | |
| | | break; |
| | | case StringId.yinliangjia: |
| | | { |
| | | key = "on_off"; |
| | | value = "on"; |
| | | key = "volume+"; |
| | | value = "50"; |
| | | } |
| | | break; |
| | | case StringId.jingyin: |
| | |
| | | control.type = "library"; |
| | | control.status.Add(buttonObj); |
| | | control.deviceId = Pir.currPir.deviceId; |
| | | control.sid = ""; |
| | | string[] strings = library.irCode.Split(','); |
| | | for (int arrayStr = 0; arrayStr < strings.Length; arrayStr++) |
| | | { |
| | | //var intValue = Convert.ToInt32(strings[arrayStr],16); |
| | | //intValue |
| | | //control.library1.Add((uint)intValue); |
| | | control.library.Add(strings[arrayStr].Replace("0x","")); |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | break; |
| | | case SPK.ElectricTV: |
| | | case SPK.TvIr: |
| | | { |
| | | switch (code) |
| | | { |