TipService.cs 759 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.Show();
  19. }
  20. public void Tcolse()
  21. {
  22. loadingView.Dispatcher.BeginInvoke(new Action(() => loadingView.Close()));
  23. }
  24. public void ShowMsg(string msg)
  25. {
  26. loadingView.Dispatcher.BeginInvoke(new Action(() => loadingView.Str=msg));
  27. }
  28. }
  29. }