From cf8848457367b5eec0ff7610222dc81757a62bac Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期五, 08 一月 2021 17:49:15 +0800
Subject: [PATCH] 2021-1-8-1
---
HDL_ON/Entity/Function/Scene.cs | 50 ++++++++++++++++++++++++++++----------------------
1 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index c6ad0eb..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;
@@ -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(() =>
{
@@ -285,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