From ae86b09b30621e1a8512c6bcdd7e22e9c67a5402 Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期二, 17 五月 2022 14:02:06 +0800 Subject: [PATCH] Merge branch 'dev' into lss --- HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs | 48 +++++++++++++++++++++++++++--------------------- 1 files changed, 27 insertions(+), 21 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs index 8cc3709..4cf6765 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs @@ -12,15 +12,6 @@ if_type = str; } /// <summary> - /// 榛樿閫変腑鏄埧闂存椂锛氬叏閮ㄥ尯鍩� - /// </summary> - public static Entity.Room selectedRoom = new Entity.Room { roomId ="6688" }; - - /// <summary> - /// 榛樿閫変腑鏄澶囩被鍨嬫椂锛氬叏閮ㄥ姛鑳� - /// </summary> - //public static Entity.Room selectedRoom = new Entity.Room { roomId = "6688" }; - /// <summary> /// 琛ㄧず鏄�(鏉′欢/鐩爣) /// </summary> private string if_type; @@ -43,7 +34,9 @@ viewLayout.AddChidren(vv); if (!MainView.IsGatewayType) { + //濡傛灉鏄痓us缃戝叧閲嶇疆楂樺害; funAllAreaView.frameLayout.Y = Application.GetRealHeight(0); + vv.Y = funAllAreaView.frameLayout.Bottom; } //鎴块棿鐐瑰嚮浜嬩欢 EventHandler<MouseEventArgs> roomClick = (sender, e) => @@ -122,7 +115,10 @@ funAllAreaView.btnText1.Text = (areaView.btnClick.Tag as Entity.Room).roomName; ///鍒囨崲鎴块棿榛樿鍔熻兘绫诲瀷鍏ㄩ儴; funAllAreaView.btnText2.Text = Language.StringByID(StringId.allFun); - selectedRoom = (areaView.btnClick.Tag as Entity.Room); + //selectedRoom = (areaView.btnClick.Tag as Entity.Room); + UserInfo.Current.logicselectedRoom = (areaView.btnClick.Tag as Entity.Room); + ///鍒囨崲鎴块棿榛樿:鍏ㄩ儴鍔熻兘 + UserInfo.Current.logicselectedFunction = Language.StringByID(StringId.allFun); ///鑾峰彇鏄剧ず璁惧鍒楄〃 var list = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(areaView.btnClick.Tag as Entity.Room, if_type); @@ -137,12 +133,12 @@ }; funAllAreaView.btnText1.MouseUpEventHandler += roomClick; funAllAreaView.btnIcon1.MouseUpEventHandler += roomClick; - //鍔熻兘鐐瑰嚮浜嬩欢 + //鍔熻兘绫诲瀷鐐瑰嚮浜嬩欢 EventHandler<MouseEventArgs> funClick = (sender3, e3) => { //鑾峰彇鏈�缁堟樉绀哄垪琛� - var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type); + var functionList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type); //鑾峰彇璁惧鍒楄〃鐨勭被鍨嬶紙渚嬪锛氱伅鍏夌被锛岀獥甯樼被銆傘�傘�傦級 var deviceTypeList = LogicMethod.CurrLogicMethod.GetDeviceTypeList(functionList); if (deviceTypeList.Count == 0) @@ -223,11 +219,13 @@ { fLayout.RemoveFromParent(); funAllAreaView.btnText2.Text = areaView.btnClick.Tag.ToString(); - ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃 - var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(areaView.btnClick.Tag.ToString()); - ///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級鏄剧ず璁惧鍒楄〃 - var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, functionList); - DeviceListView(vv, lists); + UserInfo.Current.logicselectedFunction = areaView.btnClick.Tag.ToString(); + ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡傦細鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃<绠�绉�:spk鍒楄〃> + var typeFunctionList2 = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction); + ///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級璁惧鍒楄〃 + var lists2 = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList2, functionList); + DeviceListView(vv, lists2); + }; if (deviceTypeList.Count - 1 == i) { @@ -238,10 +236,17 @@ }; funAllAreaView.btnText2.MouseUpEventHandler += funClick; funAllAreaView.btnIcon2.MouseUpEventHandler += funClick; - ///鑾峰彇鏄剧ず璁惧鍒楄〃 - var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(selectedRoom, if_type); - DeviceListView(vv, deviceList); - + ///鑾峰彇鎴块棿鏀寔鐨勮澶囧垪琛� + var deviceList = LogicMethod.CurrLogicMethod.GetFunctionDeviceList(UserInfo.Current.logicselectedRoom, if_type); + ///鑾峰彇鍗曚釜绫诲瀷锛堜緥濡�:鐏厜绫汇�傘�傦級璁惧FunctionType鍒楄〃<绠�绉�:spk鍒楄〃> + var typeFunctionList = LogicMethod.CurrLogicMethod.GetDeviceTypeFunctionList(UserInfo.Current.logicselectedFunction); + ///鑾峰彇鍗曚釜鐏厜绫诲瀷锛堜緥濡傦細鐏厜1,鐏厜2銆傘�傦級璁惧鍒楄〃 + var lists = LogicMethod.CurrLogicMethod.GetShowDeviceList(typeFunctionList, deviceList); + ///鎴块棿鍚嶇О + funAllAreaView.btnText1.Text = UserInfo.Current.logicselectedRoom.roomName; + ///鍔熻兘绫诲瀷鍚嶇О<鐏厜绫汇�傘�傘�傘�傘��> + funAllAreaView.btnText2.Text = UserInfo.Current.logicselectedFunction; + DeviceListView(vv, lists); } @@ -252,6 +257,7 @@ /// <param name="deviceList"></param> public void DeviceListView(VerticalScrolViewLayout verticalScrolView, List<HDL_ON.Entity.Function> deviceList) { + verticalScrolView.RemoveAll(); foreach (var dev in deviceList) { -- Gitblit v1.8.0