From 281f7d0b8a363a3ed4d6f83bb5fa22bb6d0340f3 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 08 一月 2021 16:20:13 +0800 Subject: [PATCH] 2021-01-08 1.更新 --- Crabtree/ON.Ios/AppDelegate.cs | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Crabtree/ON.Ios/AppDelegate.cs b/Crabtree/ON.Ios/AppDelegate.cs index 813897b..6f6ac77 100644 --- a/Crabtree/ON.Ios/AppDelegate.cs +++ b/Crabtree/ON.Ios/AppDelegate.cs @@ -6,6 +6,7 @@ using Microsoft.AppCenter.Analytics; using Microsoft.AppCenter.Crashes; using Shared; +using Shared.SimpleControl; using UIKit; using UserNotifications; @@ -75,9 +76,9 @@ AppCenter.Start ("44cbdfbf-d33e-4e92-a795-1c4452e54d3e", typeof (Analytics), typeof (Crashes)); Utlis.WriteLine ("FinishedLaunching"); //Shared.Application.IsGpsEnable = false; + //Shared.Application.IsUsePingFang = true; base.FinishedLaunching (application, launchOptions); - SharedMethod.SharedMethod.sharedApp = application; @@ -256,14 +257,14 @@ //com.freeview.global.Video.FVapplicationDidBecomeActive (application); } - //DateTime closeTime = DateTime.MinValue; + DateTime closeTime = DateTime.MinValue; /// <summary> /// BusSocketStop /// </summary> void BusSocketStop () { Shared.BusSocket.Stop (); - //closeTime = DateTime.Now; + closeTime = DateTime.Now; } @@ -273,6 +274,14 @@ void BusSocketStart () { + if (closeTime == DateTime.MinValue) { + closeTime = DateTime.Now; + } else if (closeTime.AddSeconds (20) < DateTime.Now) { + if (CommonPage.IsRemote) { + SmartHome.MqttCommon.DisConnectRemoteMqttClient ("closeTime"); + } + } + //if (closeTime == DateTime.MinValue) { // closeTime = DateTime.Now; //} else if (closeTime.AddMinutes (2) > DateTime.Now) { -- Gitblit v1.8.0