lss
2020-06-12 9c16d3614d9b88c637f967518a329f239fcd3aaf
ZigbeeApp/Home.Ios/AppDelegate.cs
@@ -25,8 +25,11 @@
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            //base.FinishedLaunching(application, launchOptions);
            Shared.Application.IsGpsEnable = false;
            Shared.Application.IsMusicEnable = false;
            base.FinishedLaunching(application, launchOptions);
            Shared.Application.FontSize = 12;
            Shared.Application.IsUsePingFang = true;
            Window = new UIWindow(UIScreen.MainScreen.Bounds);
            rootViewController = new UINavigationController(new GateWay.Ios.MainViewController()) { NavigationBarHidden = true };
            Window.RootViewController = rootViewController;
@@ -76,6 +79,7 @@
                }
            }
            AppCenter.Start("0ca801a2-742b-42fb-ba10-7ba4391371aa", typeof(Analytics), typeof(Crashes));
            GDMapKit.setGDApiKey("866fae25f336bc8d9a79b1d19267fffb");//高德地图key
            return true;
        }
@@ -114,7 +118,7 @@
                        {
                            //强制下线
                            CommonPage.Instance.SingOut();
                            CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.YouHaveBeenSignOut);
                            CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
                        }
                    }
                }
@@ -204,7 +208,7 @@
            {
                //强制下线
                CommonPage.Instance.SingOut();
                CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.YouHaveBeenSignOut);
                CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
            }
            //检查连接远程
            //代码
@@ -272,11 +276,27 @@
    public static class QRCode
    {
        static ZXing.Mobile.MobileBarcodeScanner scanner;
        public static async System.Threading.Tasks.Task ScanQRcode(Action<string> action, string topText = "", string bottomText = "", string cancel = "Cancel")
        public static async System.Threading.Tasks.Task ScanQRcode(Action<string> action, string cancel = "取消", string flashText = "闪光灯", string titleText = "二维码扫描")
        {
            if (scanner == null)
            {
                scanner = new ZXing.Mobile.MobileBarcodeScanner(Home.IOS.AppDelegate.rootViewController) { FlashButtonText = "", TopText = topText, BottomText = bottomText, CancelButtonText = cancel };
                var mZXingOverlayView = new Home.IOS.ZXingOverlayView(cancel, flashText, titleText);
                scanner = new ZXing.Mobile.MobileBarcodeScanner(Home.IOS.AppDelegate.rootViewController) { FlashButtonText = flashText, TopText = titleText, BottomText = "", CancelButtonText = cancel };
                scanner.UseCustomOverlay = true;
                scanner.CustomOverlay = mZXingOverlayView;
                var bOn = false;
                mZXingOverlayView.OnCancel += () => {
                    scanner?.Cancel();
                };
                mZXingOverlayView.OnTorch += () =>
                {
                    bOn = !bOn;
                    scanner?.Torch(bOn);
                };
            }
            var result = await scanner.Scan();