using System; using System.Threading; using Shared; namespace HDL_ON { public class PublicMothed { public PublicMothed() { } } public class WaitPageMothed { /// /// 加载等待界面 /// public void LoadPage_WaitPage(Thread thread, FrameLayout bodyView,Loading waitPage) { bodyView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); var showedTime = DateTime.Now; //如果等待事件过长,可以允许用户取消当前操作 waitPage.MouseUpEventHandler += (sender, e) => { if (showedTime.AddSeconds(30) > DateTime.Now) { thread.Abort(); waitPage.RemoveFromParent(); } }; thread.Start(); } } }