| | |
| | | /// </summary> |
| | | private FrameLayout TipLayout = null; |
| | | |
| | | private List<string> TabList = new List<string>() { "灯光", "窗帘" }; |
| | | private List<string> TabList = new List<string>() |
| | | { |
| | | Language.StringByID(R.MyInternationalizationString.uLight), |
| | | Language.StringByID(R.MyInternationalizationString.uDeviceBelongId100), |
| | | Language.StringByID(R.MyInternationalizationString.AC) |
| | | }; |
| | | |
| | | private int CurrentSelectIndex = 0; |
| | | |
| | |
| | | /// </summary> |
| | | public void ShowForm() |
| | | { |
| | | |
| | | //设置标题信息 |
| | | base.SetTitleText(CurrentRoom.RoomName); |
| | | |
| | | //初始化中部控件 |
| | | this.InitMiddleFrame(); |
| | | |
| | | } |
| | | |
| | | private void InitMiddleFrame() |
| | |
| | | listView.Y= tab_layout.Height; |
| | | listView.Height=ContentLayout.Height- tab_layout.Height; |
| | | |
| | | |
| | | |
| | | Buttons.Clear(); |
| | | |
| | | //添加功能项 |
| | |
| | | |
| | | switch (CurrentSelectIndex) |
| | | { |
| | | case 0:// 灯光 |
| | | case 0: // 灯光 |
| | | { |
| | | for (int i = 0; i < CurrentRoom.DeviceList.Count; i++) |
| | | { |
| | | SmartSound.Device device = CurrentRoom.DeviceList[i]; |
| | | //灯光 |
| | | // 灯光 |
| | | if (device.DeviceType == 1 || device.DeviceType == 2 || device.DeviceType == 3) |
| | | { |
| | | var deviceRowLayout = new DeviceRowLayout(this, device); |
| | |
| | | } |
| | | } |
| | | break; |
| | | case 2: // 空调 |
| | | { |
| | | for (int i = 0; i < CurrentRoom.DeviceList.Count; i++) |
| | | { |
| | | SmartSound.Device device = CurrentRoom.DeviceList[i]; |
| | | // |
| | | if (device.DeviceType == 7) |
| | | { |
| | | var deviceRowLayout = new DeviceRowLayout(this, device); |
| | | listView.AddChidren(deviceRowLayout); |
| | | deviceRowLayout.InitControl(); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (listView.ChildrenCount > 5) |
| | | { |
| | | TextView textView = new TextView(); |
| | | textView.Height = Application.GetRealHeight(127 * 3); |
| | | listView.AddChidren(textView); |
| | | } |
| | | |
| | | if (listView.ChildrenCount == 0) |