This commit is contained in:
Administrator committed 2026-05-19 01:34:41 +08:00
commit 321e7d84c2
6 files changed
+60 -33

No files matched your search

+2 -4
View File
@@ -11,8 +11,6 @@ public partial class InfoPage : ContentPage
{
public static ObservableCollection<InfoItem> InfoItems { get; set; } = new();
private DateTime _lastRefreshTime = DateTime.MinValue;
public static string? _Name, _State, _MachineName, _Machine, _Information, _Model,
_Type, _ModelA, _ModelB, _ModelC, _ModelD, _ModelE, _ModelF;
public InfoPage()
{
@@ -27,8 +25,8 @@ public partial class InfoPage : ContentPage
});
//注册当前页面的下滑刷新
myRefreshView_.Refreshing += (sender, e) => {
// 5秒防抖判断:如果距离上次刷新不足5秒,直接取消本次操作
if ((DateTime.Now - _lastRefreshTime).TotalSeconds < 5)
// 防抖判断:如果距离上次刷新不足5秒,直接取消本次操作
if ((DateTime.Now - _lastRefreshTime).TotalSeconds < 1)
{
myRefreshView_.IsRefreshing = false;
return;