From 1c2b6fa69a7002315d4b3ecb883c255c65eceafa Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期三, 03 六月 2020 10:58:18 +0800 Subject: [PATCH] 2020.06.03 --- ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDevice.cs | 85 ++++++++++++------------------------------ 1 files changed, 24 insertions(+), 61 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDevice.cs b/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDevice.cs index 7dbf1f4..052b1bd 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDevice.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/SmartSound/Forms/SmartSoundContentForDevice.cs @@ -11,10 +11,9 @@ private SmartSound.Room CurrentRoom = null; private FrameLayout ContentLayout = null; - - private BottomClickButton bottomClickButton = null; - + private VerticalListControl listView = null; + /// <summary> /// 娌℃湁鏁版嵁鐨勬椂鍊欙紝鎻愮ず鐢� /// </summary> @@ -43,7 +42,7 @@ { //璁剧疆鏍囬淇℃伅 - base.SetTitleText("璁惧閫夋嫨"); + base.SetTitleText(CurrentRoom.RoomName); //鍒濆鍖栦腑閮ㄦ帶浠� this.InitMiddleFrame(); @@ -58,7 +57,6 @@ switchContr.Gravity = Gravity.CenterVertical; switchContr.Width = Application.GetRealWidth(650); switchContr.Y = Application.GetRealHeight(40); - ContentLayout = new FrameLayout(); this.bodyFrameLayout.AddChidren(ContentLayout); @@ -70,7 +68,7 @@ listTitle.Add(Language.StringByID(R.MyInternationalizationString.uFunction)); //璁剧疆鍒濆鍊� - switchContr.SetDefultIndex(1); + switchContr.SetDefultIndex(0); //閫夋嫨浜嬩欢 switchContr.SelectTabEvent += (selectIndex) => @@ -83,11 +81,21 @@ else { LoadFunction(); - } + } }; //寮�濮嬪垵濮嬪寲 - switchContr.InitControl(listTitle); + switchContr.InitControl(listTitle); + + //娣诲姞纭鎸夐挳 + BottomClickButton bottomClickButton = new BottomClickButton(); + this.bodyFrameLayout.AddChidren(bottomClickButton); + bottomClickButton.Text = "纭"; + bottomClickButton.ButtonClickEvent += (sender, e) => + { + //淇濆瓨鏁版嵁 + base.CloseForm(); + }; } /// <summary> @@ -107,7 +115,7 @@ listView = new VerticalListControl(); ContentLayout.AddChidren(listView); - listView.Y = Application.GetRealHeight(90); + listView.Y = Application.GetRealHeight(40); listView.RemoveAll(); for (int i = 0; i < CurrentRoom.SceneList.Count; i++) @@ -117,16 +125,6 @@ listView.AddChidren(roomRowLayout); roomRowLayout.InitControl(); } - - bottomClickButton = new BottomClickButton(); - ContentLayout.AddChidren(bottomClickButton); - bottomClickButton.Text = "纭"; - bottomClickButton.ButtonClickEvent += (sender, e) => - { - this.CloseForm(); - }; - - bottomClickButton.Visible = false; if (listView.ChildrenCount == 0) { @@ -168,6 +166,8 @@ ContentLayout.AddChidren(listView); listView.Y= tab_layout.Height; listView.Height=ContentLayout.Height- tab_layout.Height; + + Buttons.Clear(); @@ -228,7 +228,7 @@ for (int i = 0; i < CurrentRoom.DeviceList.Count; i++) { SmartSound.Device device = CurrentRoom.DeviceList[i]; - //鐏厜 + // if (device.DeviceType == 4 || device.DeviceType == 5 || device.DeviceType == 6) { var deviceRowLayout = new DeviceRowLayout(this, device); @@ -283,7 +283,6 @@ }; layout.AddChidren(noFunctionTip); } - //涓轰簡鏂逛究鏇存柊鐘舵�侊紝瀛樿捣鏉� private List<Button> Buttons = new List<Button>(); @@ -312,12 +311,7 @@ { string error = e.Message; } - } - //frameBack.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png"; - //frameBack.BackgroundImagePath = "Item/RoomIconBackground.png"; - - - + } #region 鈻� 鑷畾涔夊満鏅�夋嫨鎺т欢_____________________ @@ -327,6 +321,7 @@ private class SceneRowLayout : FrameRowControl { private SmartSoundContentForDevice smartSoundControlForDevice = null; + private SmartSound.Scene scene = null; /// <summary> /// 鎴块棿鍚嶇О @@ -390,22 +385,6 @@ Right_icon.SelectedImagePath = "SmartSound/CheckBoxDef.png"; Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxDef.png"; } - - bool isShow = false; - - if (smartSoundControlForDevice == null) return; - - for (int i = 0; i < smartSoundControlForDevice.CurrentRoom.SceneList.Count; i++) - { - SmartSound.Scene _scene = smartSoundControlForDevice.CurrentRoom.SceneList[i]; - if (_scene.Checked) - { - isShow = true; - break; - } - } - - smartSoundControlForDevice.bottomClickButton.Visible = isShow; } catch (Exception e) { @@ -424,6 +403,7 @@ private class DeviceRowLayout : FrameRowControl { private SmartSoundContentForDevice smartSoundControlForDevice = null; + private SmartSound.Device device = null; /// <summary> /// 鎴块棿鍚嶇О @@ -486,30 +466,13 @@ { Right_icon.SelectedImagePath = "SmartSound/CheckBoxDef.png"; Right_icon.UnSelectedImagePath = "SmartSound/CheckBoxDef.png"; - } - - bool isShow = false; - - if (smartSoundControlForDevice == null) return; - - for (int i = 0; i < smartSoundControlForDevice.CurrentRoom.SceneList.Count; i++) - { - SmartSound.Scene _scene = smartSoundControlForDevice.CurrentRoom.SceneList[i]; - if (_scene.Checked) - { - isShow = true; - break; - } - } - - smartSoundControlForDevice.bottomClickButton.Visible = isShow; + } } catch (Exception e) { string error = e.Message; } } - } #endregion } -- Gitblit v1.8.0