From f534d41c36d5895322bf691784a10435b64609fe Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 25 十二月 2020 13:52:00 +0800
Subject: [PATCH] 修复添加、删除楼层时候,界面刷新异常问题
---
HDL-ON_iOS/ViewController.cs | 60 ++++++++++++++++++++++++++++++++++++++----------------------
1 files changed, 38 insertions(+), 22 deletions(-)
diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs
index 2f9ac1c..0e6c711 100644
--- a/HDL-ON_iOS/ViewController.cs
+++ b/HDL-ON_iOS/ViewController.cs
@@ -36,16 +36,25 @@
}
HDL_ON.MainPage.Show();
- //渚︽祴缃戠粶鍙樺寲
- Reachability.ReachabilityChanged += UpdateStatus;
+ try
+ {
+ //渚︽祴缃戠粶鍙樺寲
+ Reachability.ReachabilityChanged += UpdateStatus;
- UITapGestureRecognizer oTapRecognizer = new UITapGestureRecognizer();
- oTapRecognizer.CancelsTouchesInView = false;
- oTapRecognizer.AddTarget(
- this,
- new ObjCRuntime.Selector("ViewTappedSelector:")
- );
- this.View.AddGestureRecognizer(oTapRecognizer);
+ UITapGestureRecognizer oTapRecognizer = new UITapGestureRecognizer();
+ oTapRecognizer.CancelsTouchesInView = false;
+ oTapRecognizer.AddTarget(
+ this,
+ new ObjCRuntime.Selector("ViewTappedSelector:")
+ );
+ this.View.AddGestureRecognizer(oTapRecognizer);
+ MainPage.InternetStatus = (int)Reachability.InternetConnectionStatus();
+ //HDLCommon.Current.UpdateInternetStatus((int)Reachability.InternetConnectionStatus(), SharedMethod.SharedMethod.IsBackground);
+ }
+ catch
+ {
+
+ }
}
public override UIStatusBarStyle PreferredStatusBarStyle()
{
@@ -73,19 +82,26 @@
void UpdateStatus(object sender, EventArgs e)
{
internetStatus = Reachability.InternetConnectionStatus();
- if (internetStatus == NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0
- {
- Control.Ins.GatewayOnline = false;
- Control.Ins.IsRemote = false;
- }
- else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G鐨勭綉缁滆繛鎺� 1
- {
- Control.Ins.SearchLoaclGateway();
- }
- else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork)
- {
- Control.Ins.SearchLoaclGateway();
- }
+ //MainPage.Log($"缃戠粶鐘舵�佸彉鍖栵紝褰撳墠缃戠粶:{internetStatus}");
+ //缃戠粶鍙樺寲澶勭悊
+ HDLCommon.Current.UpdateInternetStatus((int)internetStatus, MainPage.IsEnterBackground);
+
+ //if (internetStatus == NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0
+ //{
+ // Control.Ins.GatewayOnline = false;
+ // Control.Ins.IsRemote = false;
+ // MainPage.InternetStatus = 0;
+ //}
+ //else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G鐨勭綉缁滆繛鎺� 1
+ //{
+ // Control.Ins.SearchLoaclGateway();
+ // MainPage.InternetStatus = 1;
+ //}
+ //else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork)
+ //{
+ // Control.Ins.SearchLoaclGateway();
+ // MainPage.InternetStatus = 2;
+ //}
}
}
}
\ No newline at end of file
--
Gitblit v1.8.0