From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 25 七月 2024 17:25:59 +0800
Subject: [PATCH] 2024年07月25日17:24:45
---
HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs | 74 ++++++++++++++++++++++++++++++++++++
1 files changed, 73 insertions(+), 1 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs
index 8e87e01..0069a00 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs
@@ -4,13 +4,85 @@
{
public partial class FunctionPage
{
+ System.Threading.Thread updateUiThread;
+ object lockObj = new object();
/// <summary>
/// 鏇存柊鍔熻兘鍒楄〃鐣岄潰鍔熻兘鐘舵��
/// </summary>
/// <param name="function"></param>
public static void UpdataStates(Function function)
{
- new ClassificaitionPublicBLL().UpdataStates(function, bodyView, functionListView);
+ try
+ {
+ if (bodyView == null)
+ {
+ return;
+ }
+ //if (SPK.LightSpkList().Contains(function.spk))
+ //{
+
+ // {
+ // var localFunction = FunctionList.List.GetLightList().Find((obj) => obj.sid == function.sid);
+ // {
+ // if (localFunction != null)
+ // {
+ // if (bodyView.updateUiThread == null)
+ // {
+ // bodyView.updateUiThread = new System.Threading.Thread(() =>
+ // {
+ // lock (bodyView.lockObj)
+ // {
+ // if (bodyView.updateUiThread == null)
+ // {
+ // MainPage.Log("绾跨▼琚疆绌轰簡锛侊紒");
+ // return;
+ // }
+ // try
+ // {
+ // while (true)
+ // {
+ // System.Threading.Thread.Sleep(1500);
+ // if (bodyView == null)
+ // {
+ // return;
+ // }
+ // if (DateTime.Now.AddMilliseconds(-1500) > localFunction.updateTime)
+ // {
+ // MainPage.Log("娌℃湁鏂版暟鎹紝鏇存柊UI");
+ // break;
+ // }
+ // else
+ // {
+ // MainPage.Log("鏈夋柊鏁版嵁锛岀户缁瓑寰�");
+ // }
+ // }
+ // new ClassificaitionPublicBLL().UpdataStates(localFunction, bodyView, functionListView);
+ // }
+ // catch (Exception ex)
+ // {
+ // MainPage.Log("FunctionPage UpdateStates error 2 :" + ex.Message);
+ // }
+ // finally
+ // {
+ // //bodyView.updateUiThread = null;
+ // }
+ // }
+ // });
+ // bodyView.updateUiThread.IsBackground = true;
+ // bodyView.updateUiThread.Start();
+ // }
+ // }
+ // }
+ // }
+ //}
+ //else
+ {
+ new ClassificaitionPublicBLL().UpdataStates(function, bodyView, functionListView);
+ }
+ }catch(Exception ex)
+ {
+ MainPage.Log("FunctionPage UpdateStates error " + ex.Message);
+ }
}
public static void UpdataOnline(Function function)
--
Gitblit v1.8.0