From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 22 六月 2022 11:22:18 +0800 Subject: [PATCH] 修改引用路径 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs | 195 +++++++++++++++++++++++------------------------- 1 files changed, 94 insertions(+), 101 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs old mode 100755 new mode 100644 index c7c8e13..afd04bb --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs @@ -1,101 +1,94 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; - -namespace Shared.Phone.UserCenter -{ - /// <summary> - /// 鍋氭垚涓�涓満鏅�+鎴块棿鐨勮鎺т欢 - /// </summary> - public class SceneRoomControl : RowLayoutControl - { - #region 鈻� 鍙橀噺澹版槑___________________________ - - /// <summary> - /// 鍦烘櫙ID - /// </summary> - private int SceneId = 0; - /// <summary> - /// 鍦烘櫙鍚嶅瓧 - /// </summary> - private string SceneName = string.Empty; - /// <summary> - /// 鍦烘櫙 - /// </summary> - public Common.SceneRoomUI Scene - { - get - { - for (int i = 0; i < Common.SceneRoomUI.AllSceneRoomUIList.Count; i++) - { - if (Common.SceneRoomUI.AllSceneRoomUIList[i].sceneUI.Id == SceneId) - { - return Common.SceneRoomUI.AllSceneRoomUIList[i]; - } - } - return null; - } - } - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - - /// <summary> - /// 鍋氭垚涓�涓満鏅�+鎴块棿鐨勮鎺т欢 - /// </summary> - /// <param name="i_SceneId">鍦烘櫙ID</param> - /// <param name="i_SceneName">鍦烘櫙鍚�</param> - /// <param name="i_chidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param> - public SceneRoomControl(int i_SceneId, string i_SceneName, int i_chidrenYaxis) : base(i_chidrenYaxis) - { - this.SceneId = i_SceneId; - this.SceneName = i_SceneName; - - var sceneTemp = this.Scene; - if (sceneTemp != null && string.IsNullOrEmpty(i_SceneName) == false) - { - sceneTemp.sceneUI.Name = i_SceneName; - } - } - - /// <summary> - /// 鍒濆鍖栧唴閮ㄦ帶浠� - /// </summary> - public void InitControl() - { - //鍥炬爣 - var btnIcon = frameTable.AddLeftIcon(81); - btnIcon.UnSelectedImagePath = "Item/Scene.png"; - - //鍦烘櫙 - var btnSceneName = frameTable.AddLeftCaption(this.SceneName, 600, 60); - btnSceneName.TextSize = 15; - //杩欎釜鍧愭爣鏈夌偣鐗规畩 - btnSceneName.Y = Application.GetRealHeight(12) + this.chidrenYaxis; - frameTable.AddChidren(btnSceneName, ChidrenBindMode.BindEventOnly); - - //鎴块棿 - string roomName = string.Empty; - var secneTemp = this.Scene; - if (secneTemp != null) - { - roomName = secneTemp.room.Name; - } - else - { - //鏈垎閰嶅尯鍩� - roomName = Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom); - } - - var btnRoom = frameTable.AddLeftCaption(roomName, 600, 50, true); - //杩欎釜鍧愭爣鏈夌偣鐗规畩 - btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis; - btnRoom.TextSize = 12; - btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1; - frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEventOnly); - } - - #endregion - } -} +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// 鍋氭垚涓�涓満鏅�+鎴块棿鐨勮鎺т欢 + /// </summary> + public class SceneRoomControl : RowLayoutControl + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍦烘櫙ID + /// </summary> + private int SceneId = 0; + /// <summary> + /// 鍦烘櫙鍚嶅瓧 + /// </summary> + private string SceneName = string.Empty; + /// <summary> + /// 鍦烘櫙 + /// </summary> + public Common.SceneUI Scene + { + get + { + return HdlSceneLogic.Current.GetSceneUIBySceneId(SceneId); + } + } + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鍋氭垚涓�涓満鏅�+鎴块棿鐨勮鎺т欢 + /// </summary> + /// <param name="i_SceneId">鍦烘櫙ID</param> + /// <param name="i_SceneName">鍦烘櫙鍚�</param> + /// <param name="i_chidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param> + public SceneRoomControl(int i_SceneId, string i_SceneName, int i_chidrenYaxis) : base(i_chidrenYaxis) + { + this.SceneId = i_SceneId; + this.SceneName = i_SceneName; + + var sceneTemp = this.Scene; + if (sceneTemp != null && string.IsNullOrEmpty(i_SceneName) == false) + { + sceneTemp.Name = i_SceneName; + } + } + + /// <summary> + /// 鍒濆鍖栧唴閮ㄦ帶浠� + /// </summary> + public void InitControl() + { + //鍥炬爣 + var btnIcon = frameTable.AddLeftIcon(81); + btnIcon.UnSelectedImagePath = "Scene/SceneIcon.png"; + + //鍦烘櫙 + var btnSceneName = frameTable.AddLeftCaption(this.SceneName, 600, 60); + btnSceneName.TextSize = 15; + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnSceneName.Y = Application.GetRealHeight(12) + this.chidrenYaxis; + frameTable.AddChidren(btnSceneName, ChidrenBindMode.BindEvent); + + //鎴块棿 + var btnRoom = frameTable.AddLeftCaption("", 600, 50, true); + //杩欎釜鍧愭爣鏈夌偣鐗规畩 + btnRoom.Y = Application.GetRealHeight(72) + this.chidrenYaxis; + btnRoom.TextSize = 12; + btnRoom.TextColor = UserCenterColor.Current.TextGrayColor1; + frameTable.AddChidren(btnRoom, ChidrenBindMode.BindEvent); + + var room = HdlRoomLogic.Current.GetRoomBySceneId(this.SceneId); + if (room != null) + { + btnRoom.Text = HdlRoomLogic.Current.GetRoomName(room); + } + else + { + //鏈垎閰嶅尯鍩� + btnRoom.Text = Language.StringByID(R.MyInternationalizationString.uDeviceNotAssignedRoom); + } + + } + + #endregion + } +} -- Gitblit v1.8.0