From 5a5a2b696866f947b6025d26c3302e8ffef46435 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期一, 11 一月 2021 16:11:20 +0800 Subject: [PATCH] 2021-01-11 1.更新MQTT连接和本地搜索网关方法。2.子账号相关接口完善 --- Crabtree/ON.Ios/Main.cs | 30 ++++++++++-------------------- 1 files changed, 10 insertions(+), 20 deletions(-) diff --git a/Crabtree/ON.Ios/Main.cs b/Crabtree/ON.Ios/Main.cs index 7851d56..d860df6 100644 --- a/Crabtree/ON.Ios/Main.cs +++ b/Crabtree/ON.Ios/Main.cs @@ -2,6 +2,8 @@ using Shared; using UIKit; using Shared.SimpleControl; +using System; + namespace ON.IosrgumentExceptio { public class Application @@ -10,26 +12,14 @@ static void Main (string [] args) { //鑾峰彇缁忕含搴� - Shared.Application.LocationAction = (arg1, arg2) => { - Shared.Application.LocationAction = null; - System.Threading.Tasks.Task.Run (() => { - while (true) { -//#if DEBUG -// break; -//#endif - Utlis.WriteLine ("Get Location GetAirQuality"); - try { - CommonPage.AirQuality = new service.hdlcontrol.com_WebServiceAirQuality.WebServiceAirQuality ().GetAirQuality (arg2.ToString (), arg1.ToString ()); - //CommonPage.AirQuality = new service.hdlcontrol.com_WebServiceAirQuality.WebServiceAirQuality ().GetAirQuality ("14.5184506127", "121.0762023926"); - if (Shared.SimpleControl.CommonPage.AirQuality != null) - break; - } catch { } - } - Shared.Application.RunOnMainThread (() => { - if (CommonPage.RefreshAir != null) - CommonPage.RefreshAir (); - }); - }); + Shared.Application.LocationAction = (lon, lat) => { + try { + Shared.Application.LocationAction = null; + HttpServerRequest.Current.GetCityInfo (lon.ToString (), lat.ToString ()); + } catch (Exception ex) { + Utlis.WriteLine ("GetCityInfo catch" + ex.Message); + } + }; // if you want to use a different Application Delegate class from "AppDelegate" -- Gitblit v1.8.0