From 73e6bfcd3eed1b4aa714af538891a3a62864b516 Mon Sep 17 00:00:00 2001 From: WJC <wjc@hdlchina.com.cn> Date: 星期四, 05 十二月 2019 14:34:59 +0800 Subject: [PATCH] 2019-12-05-1 --- ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index 8ca5e13..3c06a98 100644 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -1740,9 +1740,9 @@ #endregion #region 鈼� 鑷姩鍖朹_________________________ - + /// <summary> - /// 鑷姩鍖� + /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙� /// </summary> private async void ShowAutotion() { @@ -1758,7 +1758,7 @@ Y = Application.GetRealHeight(30), }; functionSceneAutoBodyView.AddChidren(bjFrameLayout); - bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58),HDLUtils.RectCornerBottomLeft); + bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft); var sigBtn = new Button { Width = Application.GetMinRealAverage(84), @@ -1779,7 +1779,7 @@ TextID = MyInternationalizationString.logictemplate, Gravity = Gravity.CenterVertical, TextColor = ZigbeeColor.Current.LogicBtnSelectedColor, - TextSize=15, + TextSize = 15, }; bjFrameLayout.AddChidren(recommendtextBtn); @@ -1804,7 +1804,7 @@ }; functionSceneAutoBodyView.AddChidren(scenehorizontalScrol); - var logicScrolView = new VerticalScrolViewLayout + var logicScrolView = new VerticalRefreshLayout//VerticalScrolViewLayout { Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30), BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, @@ -1905,14 +1905,31 @@ logicScrolView.Height = functionSceneAutoBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight; Automationview(logicScrolView); }; + logicScrolView.BeginHeaderRefreshingAction += () => + { + //閲嶆柊鍒锋柊logic鍒楄〃 + Common.Logic.LogicList.Clear(); + Read(logicScrolView); + //鍏抽棴鍒锋柊View锛� + logicScrolView.EndHeaderRefreshing(); + }; + + Read(logicScrolView); + } + /// <summary> + /// 璇诲彇鑷姩鍖栧垪琛ㄦ暟鎹紱 + /// </summary> + /// <param name="logicScrolView"></param> + private async void Read(VerticalRefreshLayout logicScrolView) + { CommonPage.Loading.Start(); if (Common.Logic.LogicList.Count == 0) { var Idlist = await Logic.Send.GetLogicId(0); if (Idlist.Count != 0) { - var listlogic = await Logic.Send.ReadList(Idlist.Count,0); + var listlogic = await Logic.Send.ReadList(Idlist.Count, 0); //foreach鍙兘闆嗗悎宸茶淇敼,鏋氫妇鎿嶄綔鍙兘涓嶄細鎵ц,鍙兘鍑虹幇宕╂簝(寤鸿for)銆� for (int j = 0; j < listlogic.Count; j++) { @@ -1928,14 +1945,13 @@ //鑷姩鍖� Automationview(logicScrolView); CommonPage.Loading.Hide(); - - } + } /// <summary> - /// 鑷姩鍖栧垪琛ㄧ晫闈� + /// 鍔犺浇鑷姩鍖栧垪琛ㄧ晫闈� /// </summary> /// <param name="refresview">Refresview.</param> - private async void Automationview(VerticalScrolViewLayout refresview) + private async void Automationview(VerticalRefreshLayout refresview) { refresview.RemoveAll(); foreach (var logic in Common.Logic.LogicList) @@ -2064,7 +2080,7 @@ } /// <summary> - /// 鏄剧ず鍥炬爣鐨勯鑹� + /// 鏄剧ず鑷姩鍖栬緭鍑哄姛鑳芥ā鍧楀浘鏍囩殑棰滆壊 /// </summary> /// <param name="logic"></param> /// <param name="logicRowlayout"></param> @@ -2463,6 +2479,7 @@ } } } + #endregion #region 鈼� 鎺у埗鐘舵�乢________________________ -- Gitblit v1.8.0