星火直播PC
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718
  1. using System;
  2. using System.Threading;
  3. using System.Windows.Threading;
  4. namespace XHZB.Desktop.Utils
  5. {
  6. internal class ZDelayUtil
  7. {
  8. public static void delay(int sec, Dispatcher dispatcher, Action act)
  9. {
  10. new Thread(o =>
  11. {
  12. Thread.Sleep(sec * 1000);
  13. dispatcher.Invoke(act);
  14. }).Start();
  15. }
  16. }
  17. }