From 987933326b9620e29f7c4acac808ec3b8d958642 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 19 七月 2023 10:41:47 +0800
Subject: [PATCH] 2023年07月19日10:41:42
---
HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs | 112 +++++++++++--------------------------------------------
1 files changed, 23 insertions(+), 89 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs
index b403b25..1efd6aa 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/Visitor/VisitorHistoryPage.cs
@@ -11,26 +11,33 @@
private VerticalScrolViewLayout bodyScrolView;
private List<VisitorTempPassword> pwdList;
- public VisitorHistoryPage()
+ Action backAction;// 鍚庨��鎸夐敭锛屽埛鏂癠I
+ Action action;
+
+ public override void RemoveFromParent()
{
+ backAction?.Invoke();
+ base.RemoveFromParent();
+ }
+
+ public VisitorHistoryPage(Action action)
+ {
+ backAction = action;
bodyView = this;
}
public void LoadPage()
{
+ action = () =>
+ {
+ LoadPage();
+ };
+
pwdList = getVisitorPasswordData();
#region 璁垮璁板綍鎸夐挳
- Action click = () =>
- {
- VisitorHistoryPage page = new VisitorHistoryPage();
- MainPage.BasePageView.AddChidren(page);
- page.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
- };
-
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- new TopViewDiv(bodyView, "璁垮璁板綍").LoadTopView(click);
+ new TopViewDiv(bodyView, Language.StringByID(StringId.VisitorRecord)).LoadTopView();
#endregion
bodyScrolView = new VerticalScrolViewLayout()
@@ -55,7 +62,7 @@
{
Height = Application.GetRealWidth(20),
Y = Application.GetRealWidth(6),
- Text = "璁垮浜岀淮鐮�",
+ Text = Language.StringByID(StringId.VisitorInvitationRecord),
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.text1Color,
TextSize = CSS_FontSize.TextFontSize,
@@ -68,7 +75,7 @@
{
Height = Application.GetRealWidth(14),
Y = Application.GetRealWidth(30),
- Text = "鏃堕棿锛�" + startTime + " - " + endTime,
+ Text = Language.StringByID(StringId.Time) + "锛�" + startTime + " - " + endTime,
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
@@ -94,10 +101,13 @@
itemLayout.AddChidren(btn);//+= (sender, e)
btn.MouseUpEventHandler += (sender, e) =>
{
- VisitorQRCodePage page = new VisitorQRCodePage(temPwd);
+#if __IOS__
+#else
+ VisitorQRCodePage page = new VisitorQRCodePage(action, temPwd);
MainPage.BasePageView.AddChidren(page);
page.LoadPage();
MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+#endif
};
bodyScrolView.AddChidren(itemLayout);
}
@@ -128,82 +138,6 @@
}
}
return dataList;
- }
-
- private List<TempPasswordInfo> infoList;
- private void getTestData()
- {
- infoList = new List<TempPasswordInfo>();
- TempPasswordInfo info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
- info = new TempPasswordInfo();
- info.homeId = 11111;
- info.deviceId = 11111;
- info.phone = "1234567890";
- info.tempPwd = "134234";
- info.useCount = 10;
- info.validBeginTime = "2022/5/10 14:21:00";
- info.validEndTime = "2022/5/12 14:21:00";
- infoList.Add(info);
-
}
}
}
\ No newline at end of file
--
Gitblit v1.8.0