From f60ce72c3c29c7d31a046795c88ec39a69e73d45 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 06 一月 2021 17:33:54 +0800 Subject: [PATCH] 2021-01-06 1.替换新云端前期准备相关接口,和修改相关参数。 --- 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