mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs
@@ -7,12 +7,6 @@
{
    public partial class DimmerPage
    {
        /// <summary>
        /// 通知更新界面的时间
        /// </summary>
        DateTime notiyUpdateTime = DateTime.MinValue;
        System.Threading.Thread updateUiThread;
        object lockObj = new object();
        
        /// <summary>
        /// 更新功能状态
@@ -23,31 +17,6 @@
            {
                return;
            }
            lock (bodyView.lockObj)
            {
                MainPage.Log($"收到更新" + DateTime.Now.Ticks);
                bodyView.notiyUpdateTime = DateTime.Now;
                if (bodyView.updateUiThread == null)
                {
                    bodyView.updateUiThread = new System.Threading.Thread(() =>
                    {
                        while (true)
                        {
                            System.Threading.Thread.Sleep(1500);
                            if (bodyView == null)
                            {
                                return;
                            }
                            if (DateTime.Now.AddMilliseconds(-1500) > bodyView.notiyUpdateTime)
                            {
                                MainPage.Log("没有新数据,更新UI");
                                break;
                            }
                            else
                            {
                                MainPage.Log("有新数据,继续等待");
                            }
                        }
                        Application.RunOnMainThread(() =>{
                            try
@@ -79,16 +48,9 @@
                            }
                            finally
                            {
                                bodyView.updateUiThread = null;
                            }
                        });
                        bodyView.updateUiThread.IsBackground = true;
                        bodyView.updateUiThread.Start();
                    });
                }
            }
        }
        void LoadEventList()