From 16604a593202f2f87adf71abd57d036fe7da3b52 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 18 十一月 2019 10:39:42 +0800
Subject: [PATCH] 同步了全部的代码
---
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs | 82 ++++++++++++++++++++++++++++------------
1 files changed, 57 insertions(+), 25 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
index 4efd8ca..b1c5875 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs
@@ -112,7 +112,7 @@
{
Application.RunOnMainThread(() =>
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
return;
});
}
@@ -122,7 +122,7 @@
{
Application.RunOnMainThread(() =>
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
});
}
}
@@ -148,8 +148,7 @@
EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
{
RemoveFromParent();
- this.btnTip.Visible = false;
- };
+ };
this.btnBack.MouseUpEventHandler += eHandlerBack;
this.btnBackFrameLayout.MouseUpEventHandler += eHandlerBack;
this.MidFrameLayout(this);
@@ -172,8 +171,8 @@
Width = Application.GetRealWidth(141 + 100),
Y = Application.GetRealHeight(35),
X = Application.GetRealWidth(812 - 100),
- TextAlignment = TextAlignment.Center,
- Text = Language.StringByID(R.MyInternationalizationString.LockMethod),
+ TextAlignment = TextAlignment.CenterRight,
+ Text = Language.StringByID(R.MyInternationalizationString.AllMethod),
TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText,
TextSize = 12,
};
@@ -215,6 +214,8 @@
void RefreshList()
{
bodyView.RemoveAll();
+ var curLocalDoorLockUserList = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>();
+
foreach (var curUserId in doorLock.localDoorLockUserList.Keys)
{
var curDoorLockUser = doorLock.localDoorLockUserList[curUserId];
@@ -226,12 +227,19 @@
{
continue;
}
- var RowView = new FrameLayout()
+ curLocalDoorLockUserList.Add(curUserId, curDoorLockUser);
+ }
+
+ int i = 0;
+ foreach (var curUserId in curLocalDoorLockUserList.Keys)
+ {
+ var curDoorLockUser = curLocalDoorLockUserList[curUserId];
+ var rowFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(161),
+ Height = Application.GetRealHeight(127 + 23),
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
};
- bodyView.AddChidren(RowView);
+ bodyView.AddChidren(rowFrameLayout);
var btnDistributeUnlockIconFrameLayout = new FrameLayout()
{
@@ -240,7 +248,7 @@
X = Application.GetRealWidth(58),
Y = Application.GetRealHeight(43),
};
- RowView.AddChidren(btnDistributeUnlockIconFrameLayout);
+ rowFrameLayout.AddChidren(btnDistributeUnlockIconFrameLayout);
var btnDistributeUnlockIcon = new Button()
{
@@ -259,19 +267,24 @@
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
Gravity = Gravity.CenterVertical,
};
- RowView.AddChidren(btnText);
+ rowFrameLayout.AddChidren(btnText);
var line2 = new Button()
{
- Y = RowView.Height - 1,
+ Y = rowFrameLayout.Height - 1,
X = Application.GetRealWidth(58),
Width = Application.GetRealWidth(965),
Height = 1,
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
};
- RowView.AddChidren(line2);
+ rowFrameLayout.AddChidren(line2);
#region 鏁版嵁澶勭悊
+ int currentIndex = i;
+ if (currentIndex == curLocalDoorLockUserList.Keys.Count - 1)
+ {
+ line2.Visible = false;
+ }
switch (curDoorLockUser.UnlockType)
{
case 0:
@@ -312,9 +325,10 @@
};
btnDistributeUnlockIcon.MouseUpEventHandler += eHandler;
btnDistributeUnlockIconFrameLayout.MouseUpEventHandler += eHandler;
- RowView.MouseUpEventHandler += eHandler;
+ rowFrameLayout.MouseUpEventHandler += eHandler;
btnText.MouseUpEventHandler += eHandler;
#endregion
+ i++;
}
}
@@ -476,7 +490,7 @@
if (doorLock.IsFreezeAccount[currentAccount.SubAccountDistributedMark] == true)
{
- new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ new Tip() { MaxWidth = 150, Text = btnUserName.Text + Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
return;
}
@@ -595,12 +609,12 @@
}
else
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
}
}
else
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish);
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance);
flMain.RemoveFromParent();
bottomFrameLayout.RemoveAll();
}
@@ -778,6 +792,9 @@
void DisplayByType(int unlockMethod)
{
bodyView.RemoveAll();
+
+ var curLocalDoorLockUserList = new Dictionary<int, DoorLockCommonInfo.LocaDoorLockObj>();
+
foreach (var curUserId in doorLock.localDoorLockUserList.Keys)
{
var curDoorLockUser = doorLock.localDoorLockUserList[curUserId];
@@ -785,12 +802,20 @@
{
continue;
}
- var RowView = new FrameLayout()
+ curLocalDoorLockUserList.Add(curUserId, curDoorLockUser);
+ }
+
+ int i = 0;
+ foreach (var curUserId in curLocalDoorLockUserList.Keys)
+ {
+ var curDoorLockUser = curLocalDoorLockUserList[curUserId];
+
+ var rowFrameLayout = new FrameLayout()
{
- Height = Application.GetRealHeight(161),
+ Height = Application.GetRealHeight(150),
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
};
- bodyView.AddChidren(RowView);
+ bodyView.AddChidren(rowFrameLayout);
var btnDistributeUnlockIconFrameLayout = new FrameLayout()
{
@@ -799,7 +824,7 @@
X = Application.GetRealWidth(58),
Y = Application.GetRealHeight(43),
};
- RowView.AddChidren(btnDistributeUnlockIconFrameLayout);
+ rowFrameLayout.AddChidren(btnDistributeUnlockIconFrameLayout);
var btnDistributeUnlockIcon = new Button()
{
@@ -818,19 +843,25 @@
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
Gravity = Gravity.CenterVertical,
};
- RowView.AddChidren(btnText);
+ rowFrameLayout.AddChidren(btnText);
var line2 = new Button()
{
- Y = RowView.Height - 1,
+ Y = rowFrameLayout.Height - 1,
X = Application.GetRealWidth(58),
Width = Application.GetRealWidth(965),
Height = 1,
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
};
- RowView.AddChidren(line2);
+ rowFrameLayout.AddChidren(line2);
#region 鏁版嵁澶勭悊
+ int currentIndex = i;
+ if (currentIndex == curLocalDoorLockUserList.Keys.Count - 1)
+ {
+ line2.Visible = false;
+ }
+
switch (curDoorLockUser.UnlockType)
{
case 0:
@@ -871,9 +902,10 @@
};
btnDistributeUnlockIcon.MouseUpEventHandler += eHandler;
btnDistributeUnlockIconFrameLayout.MouseUpEventHandler += eHandler;
- RowView.MouseUpEventHandler += eHandler;
+ rowFrameLayout.MouseUpEventHandler += eHandler;
btnText.MouseUpEventHandler += eHandler;
#endregion
+ i++;
}
}
#region 鈼� 鎺ュ彛瀹炵幇__________________________
--
Gitblit v1.8.0