TipService.cs 790 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using LampInspectionMachine.Views;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace LampInspectionMachine.Core
  8. {
  9. public class TipService
  10. {
  11. LoadingView loadingView=new LoadingView();
  12. public TipService()
  13. {
  14. Tshow();
  15. }
  16. public void Tshow()
  17. {
  18. loadingView.Topmost = true;
  19. loadingView.Show();
  20. }
  21. public void Tcolse()
  22. {
  23. loadingView.Dispatcher.BeginInvoke(new Action(() => loadingView.Close()));
  24. }
  25. public void ShowMsg(string msg)
  26. {
  27. loadingView.Dispatcher.BeginInvoke(new Action(() => loadingView.Str=msg));
  28. }
  29. }
  30. }