public PurchaseViewModel GetPurchaseViewModel() { var vm = new PurchaseViewModel(); vm.InitHandle(_mainHandler, Dispatcher.CurrentDispatcher); vm.Initlize(new string[] { "Durable" }, new string[] { "9P3F93X9QJRV", "9PM5NZ2V9D6S", "9P98QTMNM1VZ" }); vm.VIPContent = new VIPContent($"巨应工作室VIP QQ群:{VIPGroup}", VIPGroup, "https://shang.qq.com/wpa/qunwpa?idkey=24010e6212fe3c7ba6f79f5f91e6b216c6708d7a47abceb6f7e26890c3b15944"); return(vm); }
public static PurchaseViewModel GetPurchaseViewModel() { var vm = new PurchaseViewModel(); vm.Initlize(new string[] { "Durable" }, new string[] { "9N5XR16ZVS8M", "9NMV8XM83L0W", "9NWRT6CM2ZK4" }); var mainWindow = Application.Current.MainWindow; if (mainWindow != null) { IntPtr windowHandle = new WindowInteropHelper(mainWindow).Handle; //不初始化的情况下,内部注册窗口会自己调 vm.InitHandle(windowHandle, mainWindow.Dispatcher); } string VIPGroup = "864039359"; vm.VIPContent = new VIPContent($"巨应工作室VIP QQ群:{VIPGroup}", VIPGroup, "https://shang.qq.com/wpa/qunwpa?idkey=24010e6212fe3c7ba6f79f5f91e6b216c6708d7a47abceb6f7e26890c3b15944"); return(vm); }