Bridge.cs 788 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using Microsoft.Web.WebView2.Core;
  9. using Muchinfo.MTPClient.Trade.Views.ERMCP;
  10. namespace Muchinfo.MTPClient.UI.ViewModels
  11. {
  12. [ClassInterface(ClassInterfaceType.AutoDual)]
  13. [ComVisible(true)]
  14. public class Bridge
  15. {
  16. public string Func(string param)
  17. {
  18. // 对冲保值
  19. HedgingEntrustWindow hedgingEntrustWindow = new HedgingEntrustWindow(param)
  20. {
  21. WindowStartupLocation = WindowStartupLocation.CenterScreen
  22. };
  23. _ = hedgingEntrustWindow.ShowDialog();
  24. return "Example: " + param;
  25. }
  26. }
  27. }