// Task线程内未捕获异常处理事件
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
{
Exception ex = e.Exception;
string msg = string.Format($"{ex.Message}\n\n{ ex.StackTrace}");
MessageBox.Show(msg, " Task异常");
MyUtil.SaveAppLogFile("ErrorLog", msg);
}