HDL Home App 第二版本 旧平台金堂用 正在使用
hxb
2022-08-30 25429f085093d89d543a0b90e30d0d62d1b7dac9
ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDevice.cs
@@ -19,7 +19,12 @@
        /// </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;
@@ -40,13 +45,10 @@
        /// </summary>
        public void ShowForm()
        {
            //设置标题信息
            base.SetTitleText(CurrentRoom.RoomName);
            //初始化中部控件
            this.InitMiddleFrame();
        }
        private void InitMiddleFrame()
@@ -133,6 +135,13 @@
                else
                {
                    tipLayout.Visible = false;
                }
                if (listView.ChildrenCount > 5)
                {
                    TextView textView = new TextView();
                    textView.Height = Application.GetRealHeight(127 * 3);
                    listView.AddChidren(textView);
                }
            }
            catch (Exception ex)
@@ -166,8 +175,6 @@
                ContentLayout.AddChidren(listView);
                listView.Y= tab_layout.Height;
                listView.Height=ContentLayout.Height- tab_layout.Height;
                Buttons.Clear();
@@ -208,12 +215,12 @@
                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);
@@ -238,6 +245,28 @@
                            }
                        }
                        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)
@@ -328,7 +357,7 @@
            /// </summary>
            private NormalViewControl btnName = null;
            private IconViewControl Right_icon = null;
            private MostRightIconControl Right_icon = null;
            /// <summary>
@@ -351,14 +380,11 @@
                //显示文本
                btnName = this.AddLeftCaption(string.Empty, 700);
                btnName.Height = Application.GetRealHeight(60);
                btnName.TextSize = 17;
                btnName.TextSize = 14;
                btnName.Y = Application.GetRealHeight(57);
                btnName.Text = scene.SceneName;
                Right_icon = this.AddRightArrow();
                Right_icon.Width = Application.GetRealWidth(115);
                Right_icon.Height = Application.GetRealHeight(115);
                Right_icon = this.AddMostRightEmptyIcon(58, 58);
                Right_icon.Gravity = Gravity.CenterVertical;
                Right_icon.X = Right_icon.X - Application.GetRealWidth(60);
                this.ButtonClickEvent += (sender, e) =>
                {
@@ -377,13 +403,13 @@
                {
                    if (bol)
                    {
                        Right_icon.SelectedImagePath = "SmartSound/CheckBoxSel.png";
                        Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxSel.png";
                        Right_icon.SelectedImagePath = "Item/ItemSelected.png";
                        Right_icon.UnSelectedImagePath = "Item/ItemSelected.png";
                    }
                    else
                    {
                        Right_icon.SelectedImagePath = "SmartSound/CheckBoxDef.png";
                        Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxDef.png";
                        Right_icon.SelectedImagePath = "Item/ItemUnSelected.png";
                        Right_icon.UnSelectedImagePath = "Item/ItemUnSelected.png";
                    }
                }
                catch (Exception e)
@@ -410,7 +436,7 @@
            /// </summary>
            private NormalViewControl btnName = null;
            private IconViewControl Right_icon = null;
            private MostRightIconControl Right_icon = null;
            /// <summary>
@@ -433,14 +459,11 @@
                //显示文本
                btnName = this.AddLeftCaption(string.Empty, 700);
                btnName.Height = Application.GetRealHeight(60);
                btnName.TextSize = 17;
                btnName.TextSize = 14;
                btnName.Y = Application.GetRealHeight(57);
                btnName.Text = device.DeviceName;
                Right_icon = this.AddRightArrow();
                Right_icon.Width = Application.GetRealWidth(115);
                Right_icon.Height = Application.GetRealHeight(115);
                Right_icon = this.AddMostRightEmptyIcon(58, 58);
                Right_icon.Gravity = Gravity.CenterVertical;
                Right_icon.X = Right_icon.X - Application.GetRealWidth(60);
                this.ButtonClickEvent += (sender, e) =>
                {
@@ -459,14 +482,14 @@
                {
                    if (bol)
                    {
                        Right_icon.SelectedImagePath = "SmartSound/CheckBoxSel.png";
                        Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxSel.png";
                        Right_icon.SelectedImagePath = "Item/ItemSelected.png";
                        Right_icon.UnSelectedImagePath = "Item/ItemSelected.png";
                    }
                    else
                    {
                        Right_icon.SelectedImagePath = "SmartSound/CheckBoxDef.png";
                        Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxDef.png";
                    }
                        Right_icon.SelectedImagePath = "Item/ItemUnSelected.png";
                        Right_icon.UnSelectedImagePath = "Item/ItemUnSelected.png";
                    }
                }
                catch (Exception e)
                {