From 6cbd0936d3245fd7c433884ac9c1f5448a7cf657 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 13 十二月 2019 13:49:44 +0800
Subject: [PATCH] 合并了代码
---
ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 49 +++++++++++++++++++++++++++++++++----------------
1 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index 89cc2bb..078d1c6 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -485,8 +485,9 @@
Gravity = Gravity.CenterVertical,
TextAlignment = TextAlignment.CenterLeft,
TextID = R.MyInternationalizationString.Category,
- TextSize = 20,
+ TextSize = 24,
TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor,
+ IsBold=true
};
topView.AddChidren(title);
@@ -1742,11 +1743,11 @@
#endregion
#region 鈼� 鑷姩鍖朹_________________________
-
+
/// <summary>
- /// 鑷姩鍖�
+ /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
/// </summary>
- private async void ShowAutotion()
+ private void ShowAutotion()
{
functionSceneAutoBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
@@ -1760,7 +1761,7 @@
Y = Application.GetRealHeight(30),
};
functionSceneAutoBodyView.AddChidren(bjFrameLayout);
- bjFrameLayout.SetCornerWithSameRadius(25, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
+ bjFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerBottomLeft);
var sigBtn = new Button
{
Width = Application.GetMinRealAverage(84),
@@ -1781,7 +1782,7 @@
TextID = MyInternationalizationString.logictemplate,
Gravity = Gravity.CenterVertical,
TextColor = ZigbeeColor.Current.LogicBtnSelectedColor,
- TextSize=15,
+ TextSize = 15,
};
bjFrameLayout.AddChidren(recommendtextBtn);
@@ -1806,7 +1807,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,
@@ -1815,8 +1816,7 @@
Y = scenehorizontalScrol.Bottom,
};
functionSceneAutoBodyView.AddChidren(logicScrolView);
- logicScrolView.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerBottomLeft);
-
+ logicScrolView.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
recommendswitchBtn.MouseUpEventHandler += (sender, e) =>
{
@@ -1907,14 +1907,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++)
{
@@ -1930,14 +1947,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)
@@ -1947,7 +1963,7 @@
var logicRowlayout = new RowLayout
{
Height = Application.GetRealHeight(190 + 30),
- Width = Application.GetRealWidth(1080),
+ Width = Application.GetRealWidth(1080-58),
LineColor = ZigbeeColor.Current.LogicBackgroundColor,
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
};
@@ -2066,7 +2082,7 @@
}
/// <summary>
- /// 鏄剧ず鍥炬爣鐨勯鑹�
+ /// 鏄剧ず鑷姩鍖栬緭鍑哄姛鑳芥ā鍧楀浘鏍囩殑棰滆壊
/// </summary>
/// <param name="logic"></param>
/// <param name="logicRowlayout"></param>
@@ -2465,6 +2481,7 @@
}
}
}
+
#endregion
#region 鈼� 鎺у埗鐘舵�乢________________________
--
Gitblit v1.8.0