From f345087dbefecef9146fdb13481cb9ee3320d576 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 11:46:28 +0800 Subject: [PATCH] 20201223-2 --- HDL_ON/Entity/Function/Scene.cs | 34 +++++++++++++++++++++++----------- 1 files changed, 23 insertions(+), 11 deletions(-) diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs index a369fa7..fef4381 100644 --- a/HDL_ON/Entity/Function/Scene.cs +++ b/HDL_ON/Entity/Function/Scene.cs @@ -1,5 +1,6 @@ 锘縰sing System; using System.Collections.Generic; +using HDL_ON.Common; using HDL_ON.DAL.Server; using Shared; @@ -279,19 +280,30 @@ /// 鏀惰棌鍦烘櫙 /// </summary> /// <returns></returns> - public string CollectScene() + public void CollectScene() { - var pm = new HttpServerRequest(); - if (this.collect) + var result = StateCode.SUCCESS; + new System.Threading.Thread(() => { - var revPack = pm.CollectScene(this.userSceneId); - return revPack; - } - else - { - var revPack = pm.CancelCollectScene(this.userSceneId); - return revPack; - } + if (collect) + { + result = ApiUtlis.Ins.HttpRequest.CollectScene(userSceneId); + } + else + { + result = ApiUtlis.Ins.HttpRequest.CancelCollectScene(userSceneId); + } + //鎻愮ず閿欒 + if (result != StateCode.SUCCESS) + { + Application.RunOnMainThread(() => + { + collect = !collect; + IMessageCommon.Current.ShowErrorInfoAlter(result); + }); + } + }) + { IsBackground = true }.Start(); } /// <summary> -- Gitblit v1.8.0