From 4f40e8385ff6725be8e8b642e50f9f7201a27dfa Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 11 十二月 2020 15:58:32 +0800
Subject: [PATCH] Merge branch 'NewFilePath' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into NewFilePath

---
 HDL-ON_iOS/ViewController.cs |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs
index 89ca7a7..cc678f3 100644
--- a/HDL-ON_iOS/ViewController.cs
+++ b/HDL-ON_iOS/ViewController.cs
@@ -2,6 +2,7 @@
 using CoreLocation;
 using Foundation;
 using HDL_ON;
+using HDL_ON.DriverLayer;
 using Shared;
 using UIKit;
 
@@ -14,7 +15,7 @@
             base.ViewDidLoad();
 
 
-            if (string.IsNullOrEmpty(UserConfig.Instance.SetLanguage))
+            if (string.IsNullOrEmpty(UserInfo.Current.SetLanguage))
             {
                 if (NSLocale.PreferredLanguages[0].Contains("zh-"))
                 {
@@ -31,9 +32,9 @@
             }
             else
             {
-                Language.CurrentLanguage = UserConfig.Instance.SetLanguage;
+                Language.CurrentLanguage = UserInfo.Current.SetLanguage;
             }
-            HDL_ON.UI.MainPage.Show();
+            HDL_ON.MainPage.Show();
 
             //渚︽祴缃戠粶鍙樺寲
             Reachability.ReachabilityChanged += UpdateStatus;
@@ -74,12 +75,19 @@
             internetStatus = Reachability.InternetConnectionStatus();
             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)
-            { //wifi鐨勭綉缁滆繛鎺� 2
+            {
+                Control.Ins.SearchLoaclGateway();
+                MainPage.InternetStatus = 2;
             }
         }
     }

--
Gitblit v1.8.0