From a6bfe9208a838cea091a56f4194f90dd03fb303d Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期三, 16 十二月 2020 15:10:10 +0800 Subject: [PATCH] 2020-12-16-2 --- HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs | 1 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 8 +++- HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs | 10 +++-- HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 25 ++++-------- HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs | 8 ++-- .vs/HDL_APP_Project/xs/UserPrefs.xml | 28 ++++++++----- HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs | 4 +- HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 17 ++++++-- 8 files changed, 57 insertions(+), 44 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 0275278..66e84a6 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,24 +1,31 @@ -锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> +锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default"> <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-001674E61438002E" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs"> <Files> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="15" Column="11" /> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs" Line="92" Column="35" /> - <File FileName="HDL_ON/Entity/DB_ResidenceData.cs" Line="128" Column="1" /> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="3" Column="11" /> - <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="228" Column="12" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs" Line="99" Column="18" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs" Line="160" Column="74" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="5" Column="28" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="36" Column="10" /> + <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="202" Column="58" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs" Line="38" Column="46" /> + <File FileName="HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs" Line="5" Column="18" /> </Files> <Pads> <Pad Id="ProjectPad"> <State name="__root__"> <Node name="HDL_APP_Project" expanded="True"> <Node name="HDL_ON" expanded="True"> - <Node name="Entity" expanded="True" /> + <Node name="DAL" expanded="True" /> <Node name="UI" expanded="True"> <Node name="UI2" expanded="True"> <Node name="3-Intelligence" expanded="True"> - <Node name="Automation" expanded="True"> - <Node name="MainView.cs" selected="True" /> + <Node name="Automation" expanded="True" /> + </Node> + <Node name="FuntionControlView" expanded="True"> + <Node name="Music" expanded="True"> + <Node name="View" expanded="True"> + <Node name="PlayView.cs" selected="True" /> + </Node> </Node> </Node> </Node> @@ -41,7 +48,6 @@ <BreakpointStore> <Breakpoint file="/Users/hdl/Desktop/wjc/HDL_APP_Project/HDL_ON/Entity/Function/Scene.cs" relfile="HDL_ON/Entity/Function/Scene.cs" line="285" column="1" /> <Breakpoint file="/Users/hdl/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs" line="133" column="1" /> - <Breakpoint file="/Users/hdl/Desktop/wjc/HDL_APP_Project/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" relfile="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" line="228" column="1" /> </BreakpointStore> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs index 602a55d..815d67d 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs @@ -126,8 +126,8 @@ sceneView.btnLine.X = Application.GetRealWidth(20); sceneView.btnLine.Width = Application.GetRealWidth(303); sceneView.btnNextIcon.X = Application.GetRealWidth(303); - sceneView.btnNextIcon.Width = Application.GetMinRealAverage(28); - sceneView.btnNextIcon.Height = Application.GetMinRealAverage(28); + sceneView.btnNextIcon.Width = Application.GetRealWidth(28); + sceneView.btnNextIcon.Height = Application.GetRealWidth(28); sceneView.btnNextIcon.UnSelectedImagePath = "LogicIcon/weekoff.png"; sceneView.btnNextIcon.SelectedImagePath = "LogicIcon/weekon.png"; verticalRefresh.AddChidren(sceneView.FLayoutView()); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs index 16782af..b7242fb 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/FunTpye.cs @@ -82,6 +82,7 @@ Height = Application.GetRealHeight(44 * 5), }; var roomList = LogicMethod.GetGatewayRoomList(Language.StringByID(StringId.allAreas)); + if (roomList.Count > 5) { bghFrameLyout.Height = Application.GetRealHeight(21 + 44 * 5); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index 3144977..f93ff6c 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -135,7 +135,6 @@ /// <returns></returns> public static List<HDL_ON.Entity.Room> GetGatewayRoomList(string name) { - List<Entity.Room> roomList = new List<Entity.Room>(); Entity.Room room1 = new Entity.Room(); room1.roomName = name;//榛樿涓�涓埧闂村悕涓�:鍏ㄩ儴鍖哄煙 @@ -144,9 +143,14 @@ var roomLists = GetGatewayRoomList(); foreach (var room in roomLists) { + var devlist = GetRoomDevice(room); + if (devlist.Count == 0) + { + //杩囨护鎺夋病鏈夎澶囩殑鎴块棿; + continue; + } roomList.Add(room); } - return roomList; } /// <summary> diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs index e5a83d5..101d71f 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs @@ -52,6 +52,7 @@ addLogic.Show(); MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; }; + //寮�鍏冲浘鏍囩殑鐐瑰嚮浜嬩欢 logicView.btnSwitchIcon.MouseUpEventHandler += (sender1, e1) => { logicView.btnSwitchIcon.IsSelected = !logicView.btnSwitchIcon.IsSelected; @@ -59,16 +60,25 @@ { logicView.btnSwitchIcon.IsSelected = true; currLogic.enable = "true"; - - } else { logicView.btnSwitchIcon.IsSelected = false; currLogic.enable = "false"; } - Send.switchLogic(currLogic); + //Send.switchLogic(currLogic); + new System.Threading.Thread(() => + { + try + { + //閫昏緫浣胯兘鐨勫懡浠� + Send.switchLogic(currLogic); + } + catch { } + + }) + { IsBackground = true }.Start(); }; GetSelectIcon(logicView.frameLayout, currLogic); //if (i==0)闄嶅簭鎺掑垪 @@ -199,7 +209,6 @@ } return weekTextName.TrimEnd(','); } - /// <summary> /// 鑾峰彇姣忔湀鐨勫瓧绗︿覆 diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs index 998734e..580a8a6 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs @@ -9,17 +9,6 @@ { public class Send { - ///// <summary> - ///// 浣忓畢ID - ///// </summary> - //public static string homeId = Entity.DB_ResidenceData.residenceData.CurReginID; - ///// <summary> - ///// 缃戝叧ID锛堢妗℃湁缃戝叧ID鍗磋繑鍥炴槸MAC锛� - ///// </summary> - //public static string gatewayId = DriverLayer.Control.Ins.GatewayId; - - //public static string homeId = UserInfo.Current.CurReginID; - /// <summary> /// 缃戝叧ID(鑾峰彇鍢変箰缃戝叧ID) /// </summary> @@ -34,12 +23,17 @@ return Entity.DB_ResidenceData.Instance.HomeGateway.gatewayId; } } - + /// <summary> /// 浣忓畢ID /// </summary> - public static string homeId = Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; - + public static string homeId + { + get + { + return Entity.DB_ResidenceData.Instance.CurrentRegion.RegionID; + } + } /// <summary> /// 鑾峰彇閫昏緫ID鍒楄〃 @@ -296,9 +290,6 @@ /// <returns></returns> public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 3) { - - - var requestJson = HttpUtil.GetSignRequestJson(o); return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout); diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs index 062a3dd..9727a29 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TimeTpye.cs @@ -230,11 +230,11 @@ Button btnStartTimeText = new Button { TextSize = LogicView.TextSize.text12, - Width = Application.GetRealWidth(32 + 3), + Width = Application.GetRealWidth(32 + 3+20), Height = Application.GetRealHeight(17), TextColor = CSS.CSS_Color.textCancelColor, Y = Application.GetRealHeight(17), - X = Application.GetRealWidth(260), + X = Application.GetRealWidth(260-20), Tag = "0", }; startTimeView.frameLayout.AddChidren(btnStartTimeText); @@ -253,11 +253,11 @@ Button btnEndTimeText = new Button { TextSize = LogicView.TextSize.text12, - Width = Application.GetRealWidth(32 + 3), + Width = Application.GetRealWidth(32 + 3+20), Height = Application.GetRealHeight(17), TextColor = CSS.CSS_Color.textCancelColor, Y = Application.GetRealHeight(17), - X = Application.GetRealWidth(260), + X = Application.GetRealWidth(260-20), Tag = "0", }; endTimeView.frameLayout.AddChidren(btnEndTimeText); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs index 16ab2ab..438e708 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs @@ -102,24 +102,26 @@ { X = Application.GetRealWidth(22), Y = Application.GetRealHeight(261), - Width = Application.GetRealWidth(37 + 5), + Width = Application.GetRealWidth(37 + 5+20), Height = Application.GetRealHeight(20), TextColor = MusicColor.TextTimeColor, TextSize = TextSize.Text14, TextAlignment = TextAlignment.CenterLeft, + }; /// <summary> ///闊充箰缁撴潫鏃堕棿 /// </summary> public Button endTimeBtn = new Button { - X = Application.GetRealWidth(269), + X = Application.GetRealWidth(269-20), Y = Application.GetRealHeight(261), - Width = Application.GetRealWidth(37 + 5), + Width = Application.GetRealWidth(37 + 5+20), Height = Application.GetRealHeight(20), TextColor = MusicColor.TextTimeColor, TextSize = TextSize.Text14, TextAlignment = TextAlignment.CenterRight, + }; /// <summary> /// 姝屽悕鍚嶇О锛圱extView瓒呭嚭闀垮害鑷繁婊氬姩锛� @@ -218,7 +220,7 @@ { X = Application.GetRealWidth(279 - 4), Y = Application.GetRealHeight(418), - Width = Application.GetRealWidth(26 + 4), + Width = Application.GetRealWidth(26 + 4+10), Height = Application.GetRealHeight(17), Text = "0%", TextColor = MusicColor.MusicNoTxetColor, -- Gitblit v1.8.0