From 3272ca5b51e19f7f8a827b0f68400570a547fe60 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期二, 28 四月 2020 15:02:44 +0800 Subject: [PATCH] 2020-04-28-1 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs | 53 ++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 38 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs index 6ae3938..47590b7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs @@ -15,7 +15,7 @@ /// <summary> /// 鍒楄〃鎺т欢 /// </summary> - private VerticalListControl listview = null; + private FrameListControl listview = null; /// <summary> /// 褰撳墠閫夋嫨鐨勮澶� /// </summary> @@ -40,6 +40,10 @@ /// 璁惧闇�瑕佷繚瀛樼殑璁惧鍔熻兘 /// </summary> private Dictionary<int, DeviceFunctionType> dicDeviceFuncType = new Dictionary<int, DeviceFunctionType>(); + /// <summary> + /// 淇℃伅缂栬緫鎺т欢 + /// </summary> + private InformationEditorControl tableContr = null; #endregion @@ -71,16 +75,16 @@ //娓呯┖bodyFrame this.ClearBodyFrame(); + var listBackControl = new VerticalFrameControl(); + listBackControl.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listBackControl); + //鍒濆鍖栨甯� - var tableContr = new InformationEditorControl(); - this.listview = tableContr.InitControl(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 708, 1028); + this.tableContr = new InformationEditorControl(); + this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028); //鍒濆鍖栬澶囧洖璺浘鏍� - this.InitDeviceEpointIcon(); - - //鍒濆鍖栨甯冨畬鎴� - tableContr.FinishInitControl(bodyFrameLayout, this.listview); - tableContr = null; + this.InitDeviceEpointIcon(listBackControl); //淇濆瓨 var btnFinish = new BottomClickButton(); @@ -140,6 +144,10 @@ { device.IconPath = "Device/Light.png"; } + else + { + device.IconPath = "Device/RelayEpoint.png"; + } device.ReSave(); } this.CloseProgressBar(); @@ -198,11 +206,13 @@ rowBeloneArea.SelectRoomEvent += (roomKeys) => { //鍙樻洿鎴块棿 - Common.Room.CurrentRoom.ChangedRoom(nowSelectDevice, roomKeys); + HdlRoomLogic.Current.ChangedRoom(nowSelectDevice, roomKeys); }; //娣诲姞鍔熻兘绫诲瀷琛� this.AddFunctionTypeRow(); + //鍒濆鍖栨甯冨畬鎴� + tableContr.FinishInitControl(); } #endregion @@ -243,7 +253,7 @@ //{ // menuCount = 2; //} - var frame = new TopRightMenuControl(menuCount); + var frame = new TopRightMenuControl(menuCount, 1); if (canTest == true) { //瀹氫綅 @@ -326,10 +336,19 @@ var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); var form = new BottomItemSelectForm(); + form.CancelCallEvent = true;//鍏佽鍙栨秷 form.AddForm(title, listText, nowSelectNo); form.FinishSelectEvent += (selectNo) => { - btnFunction.Text = listText[selectNo]; + if (selectNo == -1) + { + //閫夋嫨鍙栨秷 + btnFunction.Text = string.Empty; + } + else + { + btnFunction.Text = listText[selectNo]; + } nowSelectNo = selectNo; //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� if (selectNo == 0) @@ -340,9 +359,13 @@ { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鐏厜; } - else + else if (selectNo == 2) { dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鎻掑骇; + } + else + { + dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鏈畾涔�; } }; }; @@ -357,7 +380,7 @@ /// <summary> /// 鍒濆鍖栬澶囧洖璺浘鏍� /// </summary> - private void InitDeviceEpointIcon() + private void InitDeviceEpointIcon(VerticalFrameControl listBackControl) { bool hadDevice = false; var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr); @@ -396,10 +419,10 @@ frameBorder.Gravity = Gravity.CenterHorizontal; frameBorder.Width = Application.GetMinRealAverage(426); frameBorder.Height = Application.GetMinRealAverage(426); - bodyFrameLayout.AddChidren(frameBorder); + listBackControl.frameTable.AddChidren(frameBorder); var btnPic = new PicViewControl(frameBorder.Width, frameBorder.Height, false); - btnPic.UnSelectedImagePath = "Device/PanelTable.png"; + btnPic.UnSelectedImagePath = "DeviceItem/PanelTable.png"; frameBorder.AddChidren(btnPic); if (listSort.Count == 4) -- Gitblit v1.8.0