From 0bdc0a135dbe31761b53f432ed34f347f0a4e36b Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 05 三月 2020 10:49:41 +0800
Subject: [PATCH] 20200304
---
HDL-ON_iOS/AppDelegate.cs | 35 ++++++++++++-----------------------
1 files changed, 12 insertions(+), 23 deletions(-)
diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs
index 22e01c9..3950f3a 100644
--- a/HDL-ON_iOS/AppDelegate.cs
+++ b/HDL-ON_iOS/AppDelegate.cs
@@ -97,16 +97,16 @@
NSUserDefaults.StandardUserDefaults.SetString(DeviceToken, "PushDeviceToken");
string userPhoneName = UIDevice.CurrentDevice.Name;
- UserConfig.Instance.tokenID = DeviceToken;
- UserConfig.Instance.phoneName = userPhoneName;
- UserConfig.Instance.SaveUserConfig();
+ UserConfig.Instance.PushDeviceToken = DeviceToken;
+ //UserConfig.Instance.phoneName = userPhoneName;
+ //UserConfig.Instance.SaveUserConfig();
}
- if (UserConfig.Instance.tokenID != DeviceToken)
+ if (UserConfig.Instance.PushDeviceToken != DeviceToken)
{
string userPhoneName = UIDevice.CurrentDevice.Name;
- UserConfig.Instance.tokenID = DeviceToken;
- UserConfig.Instance.phoneName = userPhoneName;
- UserConfig.Instance.SaveUserConfig();
+ UserConfig.Instance.PushDeviceToken = DeviceToken;
+ //UserConfig.Instance.phoneName = userPhoneName;
+ //UserConfig.Instance.SaveUserConfig();
}
}
@@ -155,6 +155,7 @@
public override void WillEnterForeground(UIApplication application)
{
SharedMethod.SharedMethod.IsBackground = false;
+ BusSocket.Start(6000);
Console.WriteLine("WillEnterForeground");
UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0;
}
@@ -173,12 +174,12 @@
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
//AppCenter.Start("b95f7814-49fb-4345-bac5-98e70d098252", typeof(Analytics), typeof(Crashes));
- Console.WriteLine("FinishedLaunching");
base.FinishedLaunching(application, launchOptions);
SharedMethod.SharedMethod.sharedApp = application;
-
+ Shared.Application.IsGpsEnable = false;
//NSString* nsCount = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode];
+
string nsCount = NSLocale.CurrentLocale.CountryCode;
if (nsCount != UserConfig.Instance.CountryCode)
{
@@ -187,7 +188,7 @@
}
application.IdleTimerDisabled = true;
application.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound);
-
+
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var Root = new UINavigationController(new ViewController()) { NavigationBarHidden = true };
Window.RootViewController = Root;
@@ -226,26 +227,14 @@
{
//RemoteInfo.Current.ReadMsgList(true);
}
- //if (UserConfig.Instance.SkinCode == 0)
- //{
- // application.StatusBarStyle = UIStatusBarStyle.LightContent;
- // Shared.Application.Skin = UserConfig.Instance.CurrentSkinName;
- //}
- //else if (UserConfig.Instance.SkinCode == 1)
- //{
application.StatusBarStyle = UIStatusBarStyle.Default;
- //application.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
- Console.WriteLine($"application.StatusBarStyle:{application.StatusBarStyle}");
- // Shared.Application.Skin = UserConfig.Instance.CurrentSkinName;
- //}
- //SkinStyle.Current.ChangeColor();
-
//Harpy.Harpy.SharedInstance.PresentingViewController = this.Window.RootViewController;
//Harpy.Harpy.SharedInstance.WeakDelegate = this;
//Harpy.Harpy.SharedInstance.AlertType = Harpy.HarpyAlertType.Skip;
//Harpy.Harpy.SharedInstance.DebugEnabled = false;
//Harpy.Harpy.SharedInstance.ForceLanguageLocalization = Harpy.Constants.HarpyLanguageChineseSimplified;
+ Console.WriteLine("FinishedLaunching");
return true;
}
}
--
Gitblit v1.8.0