| | |
| | | Tag = "PirView"; |
| | | } |
| | | |
| | | public void Show(List<Brand> brandList,List<Library> libraryList,string spk) |
| | | public void Show(List<Brand> brandList, List<Library> libraryList,string spk) |
| | | { |
| | | |
| | | |
| | | |
| | | #region 界面布局 |
| | | this.BackgroundColor = CSS.CSS_Color.viewMiddle; |
| | | PirDevice.View.TopView topView = new View.TopView(); |
| | |
| | | X = Application.GetRealWidth(136), |
| | | Width = Application.GetRealWidth(104), |
| | | Height = Application.GetRealHeight(17), |
| | | Text = "(1/20)", |
| | | Text = $"(1/{libraryList.Count})", |
| | | TextSize = TextSize.text12, |
| | | TextColor = CSS.CSS_Color.textCancelColor, |
| | | }; |
| | |
| | | { |
| | | if (index>1) { |
| | | index--; |
| | | sumBtn.Text = "(" + index.ToString() + "/20)"; |
| | | sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; |
| | | } |
| | | code = 1; |
| | | GetBtnText(testBtn, code, spk); |
| | |
| | | //右 |
| | | rightIconBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (index < 20) |
| | | if (index < libraryList.Count) |
| | | { |
| | | index++; |
| | | sumBtn.Text = "(" + index.ToString() + "/20)"; |
| | | sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; |
| | | } |
| | | code = 1; |
| | | GetBtnText(testBtn, code, spk); |
| | |
| | | //控制失败 |
| | | failedBtn.MouseUpEventHandler += (sender, e) => |
| | | { |
| | | if (index < 20) |
| | | if (index < libraryList.Count) |
| | | { |
| | | //先加 |
| | | index++; |
| | | //更新文本 |
| | | sumBtn.Text = "(" + index.ToString() + "/20)"; |
| | | sumBtn.Text = $"({index.ToString()}/{libraryList.Count})"; |
| | | } |
| | | code = 1; |
| | | //更新状态 |
| | |
| | | GetBtnText(testBtn, code, spk); |
| | | if (if_bool) |
| | | { |
| | | var library = libraryList[index]; |
| | | var library = libraryList[index-1]; |
| | | var control = GetControl(spk, testBtn.TextID, library); |
| | | Method method = new Method(); |
| | | //发送库添加遥控器命令 |