old mode 100755
new mode 100644
File was renamed from ZigbeeApp/GateWay.Ios/AppDelegate.cs |
| | |
| | | using System;
|
| | | using Foundation; |
| | | using UIKit; |
| | | using Shared; |
| | | using System; |
| | | using ObjCRuntime; |
| | | using UserNotifications; |
| | | using Shared.Common; |
| | | using Microsoft.AppCenter; |
| | | using Microsoft.AppCenter.Analytics; |
| | | using Microsoft.AppCenter.Crashes; |
| | | using Shared; |
| | | using Shared.Common; |
| | | using Shared.IOS.TBL; |
| | | using UIKit; |
| | | |
| | | namespace GateWay.Ios |
| | | namespace Home.IOS |
| | | { |
| | | // The UIApplicationDelegate for the application. This class is responsible for launching the |
| | | // User Interface of the application, as well as listening (and optionally responding) to application events from iOS. |
| | | [Register("AppDelegate")] |
| | | public class AppDelegate : BaseApplicationDelegate |
| | | { |
| | |
| | | //base.FinishedLaunching(application, launchOptions); |
| | | Shared.Application.FontSize = 12; |
| | | Window = new UIWindow(UIScreen.MainScreen.Bounds); |
| | | rootViewController = new UINavigationController(new MainViewController()) { NavigationBarHidden = true }; |
| | | rootViewController = new UINavigationController(new GateWay.Ios.MainViewController()) { NavigationBarHidden = true }; |
| | | Window.RootViewController = rootViewController; |
| | | Window.MakeKeyAndVisible(); |
| | | |
| | |
| | | public override void ReceivedRemoteNotification (UIApplication application, NSDictionary userInfo) |
| | | { |
| | | Console.WriteLine(userInfo); |
| | | if (application.ApplicationState == UIApplicationState.Active) { |
| | | if (application.ApplicationState == UIApplicationState.Active) |
| | | { |
| | | System.Console.WriteLine ("ReceivedRemoteNotification1"); |
| | | } else if (application.ApplicationState == UIApplicationState.Background) { |
| | | } |
| | | else if (application.ApplicationState == UIApplicationState.Background) |
| | | { |
| | | System.Console.WriteLine ("ReceivedRemoteNotification2"); |
| | | } else if (application.ApplicationState == UIApplicationState.Inactive) { |
| | | } |
| | | else if (application.ApplicationState == UIApplicationState.Inactive) |
| | | { |
| | | System.Console.WriteLine ("ReceivedRemoteNotification3"); |
| | | } |
| | | } |
| | |
| | | var result = new System.Net.WebClient { }.DownloadString($"https://api.weixin.qq.com/sns/oauth2/access_token?appid=wx2ec8f53f6fa36e82&secret=a08585cd6ff2ce64570b9e7e6525dd8e&code={((SendAuthResp)resp).Code}&grant_type=authorization_code"); |
| | | RespAction?.Invoke(result); |
| | | } |
| | | catch { |
| | | catch |
| | | { |
| | | RespAction?.Invoke(null); |
| | | } |
| | | break; |
| | |
| | | { |
| | | if (scanner == null) |
| | | { |
| | | scanner = new ZXing.Mobile.MobileBarcodeScanner(GateWay.Ios.AppDelegate.rootViewController) { FlashButtonText = "", TopText = topText, BottomText = bottomText, CancelButtonText = cancel }; |
| | | scanner = new ZXing.Mobile.MobileBarcodeScanner(Home.IOS.AppDelegate.rootViewController) { FlashButtonText = "", TopText = topText, BottomText = bottomText, CancelButtonText = cancel }; |
| | | } |
| | | |
| | | var result = await scanner.Scan(); |
| | |
| | | { |
| | | Width = width, |
| | | Height = height, |
| | | Margin = 10 |
| | | Margin = 0 |
| | | } |
| | | }; |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |