| | |
| | | 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(); |
| | | } |
| | | } |
| | | |
| | |
| | | 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) |
| | | { |
| | |
| | | } |
| | | 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; |
| | |
| | | { |
| | | //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; |