From 1a0a7f736c6d2e7129e7591d40bed67ec7c0f09a Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 05 二月 2021 10:47:42 +0800 Subject: [PATCH] 2021-02-05 1.编译冲突修改 --- HDL_ON/Entity/Function/Scene.cs | 77 +++++++++++++++++++------------------- 1 files changed, 38 insertions(+), 39 deletions(-) diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs index c6ad0eb..c974e1e 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; @@ -56,10 +57,10 @@ /// 鎵�灞炴埧闂村垪琛� /// </summary> public List<string> roomIds = new List<string>(); - /// <summary> - /// 鎵�灞炴埧闂村垪琛� - /// </summary> - public List<string> uids = new List<string>(); + ///// <summary> + ///// 鎵�灞炴埧闂村垪琛� + ///// </summary> + //public List<string> uids = new List<string>(); /// <summary> /// 寤舵椂 /// </summary> @@ -236,23 +237,17 @@ { Application.RunOnMainThread(() => { - if (time / 60 > 1) + if (time > 60) { - btnShowDelay.Text = (time / 60).ToString() + "min"; + btnShowDelay.Text = (time / 60).ToString() + "min" + time % 60 + "s"; } else { - btnShowDelay.Text = (time--).ToString() + "s"; + btnShowDelay.Text = time.ToString() + "s"; } }); - if (time / 60 > 1) - { - System.Threading.Thread.Sleep(time / 60 * 60000); - } - else - { - System.Threading.Thread.Sleep(1000); - } + System.Threading.Thread.Sleep(1000); + time--; } Application.RunOnMainThread(() => { @@ -264,40 +259,44 @@ } } } - /// <summary> - /// 淇濆瓨鍔熻兘鏁版嵁 + /// 淇濆瓨鍦烘櫙鏁版嵁鏂囦欢 /// </summary> - public void SaveSceneData(bool upServer) + public void SaveSceneFile() { - if (upServer) - { - UploadScene(); - } - else - { - var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); - Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd); - MainPage.Log($"Save Scene Data : {savePath}"); - } + var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this)); + FileUtlis.Files.WriteFileByBytes(savePath, ssd); + MainPage.Log($"Save Scene Data : {savePath}"); } + /// <summary> /// 鏀惰棌鍦烘櫙 /// </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