JSInterfaces.cs 889 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. 
  2. using CefSharp;
  3. using efunbox_xyyf_windows.contract;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace efunbox_xyyf_windows
  11. {
  12. public class JSInterfaces
  13. {
  14. MainContract.IView mView;
  15. public JSInterfaces(MainContract.IView view)
  16. {
  17. mView = view;
  18. }
  19. /*
  20. * 弹出提示
  21. * **/
  22. public void showMessage(string message)
  23. {
  24. MessageBox.Show(message);
  25. }
  26. /*
  27. * 退出应用
  28. * **/
  29. public void exitApp()
  30. {
  31. Cef.Shutdown();
  32. if (mView.getWebView() != null)
  33. {
  34. mView.getWebView().Dispose();
  35. }
  36. Process.GetCurrentProcess().Kill();
  37. }
  38. }
  39. }