From 34e965100d635346e2d4cd6e6013bdaed66b3004 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期四, 02 一月 2020 19:52:13 +0800
Subject: [PATCH] 2019.1.2-3
---
ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs | 74 +++++++++++++++++++++++++++++++------
1 files changed, 62 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
index 8aa6678..7c00eb6 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/LockLogicList.cs
@@ -12,8 +12,8 @@
{
Tag = "LockLogicList";
}
- VerticalScrolViewLayout middle;
- public async void Show()
+ VerticalRefreshLayout middle;
+ public void Show()
{
#region 鏈�涓婇潰鐨勫竷灞�浠g爜
@@ -27,7 +27,7 @@
var titleName = new Button
{
- TextSize = 16,
+ TextSize = 17,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
X = Application.GetRealWidth(176),
@@ -35,6 +35,7 @@
Height = Application.GetRealHeight(69),
Y = Application.GetRealHeight(92),
TextID = MyInternationalizationString.linkageevent,
+ IsBold = true,
};
topRowLayout.AddChidren(titleName);
@@ -81,11 +82,6 @@
Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
Common.Logic.CurrentLogic.LogicType = 1;
Common.Logic.CurrentLogic.Relationship = 1;
- //Config.Instance.Guid鐢ㄦ潵璇嗗埆璐﹀彿韬唤锛�
- var accounts = new System.Collections.Generic.Dictionary<string, string>();
- accounts.Add("Type","1");
- accounts.Add("Account", Config.Instance.Guid);
- Common.Logic.CurrentLogic.Accounts.Add(accounts);
Common.Logic.CurrentLogic.LogicName = Language.StringByID(MyInternationalizationString.automation1);
var lockLogicCommunalPage = new LockLogicCommunalPage();
UserView.HomePage.Instance.AddChidren(lockLogicCommunalPage);
@@ -94,14 +90,29 @@
};
#endregion
- middle = new VerticalScrolViewLayout
+ middle = new VerticalRefreshLayout
{
Y = topRowLayout.Bottom,
Height = Application.GetRealHeight(1920 - 184),
BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
this.AddChidren(middle);
+ middle.BeginHeaderRefreshingAction += () =>
+ {
+ //閲嶆柊鍒锋柊logic鍒楄〃
+ Common.Logic.LockLogicList.Clear();
+ Read();
+ //鍏抽棴鍒锋柊View锛�
+ middle.EndHeaderRefreshing();
+ };
+ Read();
+ }
+ /// <summary>
+ /// 璇诲彇鑷姩鍖栨暟鎹�
+ /// </summary>
+ public async void Read()
+ {
CommonPage.Loading.Start();
if (Common.Logic.LockLogicList.Count == 0)
{
@@ -134,14 +145,52 @@
}
}
}
- //鑷姩鍖�
Automationview();
CommonPage.Loading.Hide();
}
-
- void Automationview()
+ /// <summary>
+ /// 鍔犺浇鑷姩鍖栧垪琛ㄧ殑鐣岄潰
+ /// </summary>
+ public void Automationview()
{
middle.RemoveAll();
+
+ if (Common.Logic.LockLogicList.Count == 0)
+ {
+ //灏辨槸涓轰簡鏄剧ず寮曞娣诲姞鍥炬爣;
+ var noFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(434 + 200 + 32 + 320),
+ //BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ middle.AddChidren(noFrameLayout);
+
+
+ var noIconBtn = new Button
+ {
+ Y = Application.GetRealHeight(320),
+ Width = Application.GetMinRealAverage(756),
+ Height = Application.GetMinRealAverage(434),
+ UnSelectedImagePath = "Item/NoFunction.png",
+ X = Application.GetRealWidth(162),
+ };
+ noFrameLayout.AddChidren(noIconBtn);
+
+ var noTextBtn = new Button()
+ {
+ Y = noIconBtn.Bottom,
+ Height = Application.GetRealHeight(200) + Application.GetRealHeight(32),
+ Width = Application.GetRealWidth(700),
+ //Gravity = Gravity.CenterHorizontal,
+ Text = Language.StringByID(MyInternationalizationString.automationaddtext).Replace("{\\r\\n}", "\r\n"),
+ TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+ TextAlignment = TextAlignment.Center,
+ IsMoreLines = true,
+ X = Application.GetRealWidth(190),
+ };
+ noFrameLayout.AddChidren(noTextBtn);
+
+ }
for (int i = 0; i < Common.Logic.LockLogicList.Count; i++)
{
var logic = Common.Logic.LockLogicList[i];
@@ -164,6 +213,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
Gravity = Gravity.CenterVertical,
+ TextSize = 15,
};
logicRowlayout.AddChidren(logicnameBtn);
--
Gitblit v1.8.0