wxr
2019-12-06 9aa32bd5ed75d54b2141b6c91f163d43216a3643
HDL_ON/UI/UI0-Public/PublicMothed.cs
@@ -1,7 +1,8 @@
using System;
using System.Text.RegularExpressions;
using HDL_ON.DAL.Server;
namespace HDL_ON.UI
using System.Threading;
using Shared;
namespace HDL_ON
{
    public class PublicMothed
    {
@@ -9,8 +10,30 @@
        {
        }
                    //Regex reg = new Regex("^\\d+$");
    }
    public class WaitPageMothed
    {
        /// <summary>
        /// 加载等待界面
        /// </summary>
        public void LoadPage_WaitPage(Thread thread, FrameLayout bodyView,Loading waitPage)
        {
            bodyView.AddChidren(waitPage);
            waitPage.Start(Language.StringByID(InternationalizationString.PleaseWait));
            var showedTime = DateTime.Now;
            //如果等待事件过长,可以允许用户取消当前操作
            waitPage.MouseUpEventHandler += (sender, e) =>
            {
                if (showedTime.AddSeconds(30) > DateTime.Now)
                {
                    thread.Abort();
                    waitPage.RemoveFromParent();
                }
            };
            thread.Start();
        }
    }
}