diff --git a/HKCardOUT/HKCardOUT.csproj b/HKCardOUT/HKCardOUT.csproj index 2b95ada..2ac5b58 100644 --- a/HKCardOUT/HKCardOUT.csproj +++ b/HKCardOUT/HKCardOUT.csproj @@ -26,6 +26,7 @@ + diff --git a/HKCardOUT/ViewModels/AdWindowViewModel.cs b/HKCardOUT/ViewModels/AdWindowViewModel.cs new file mode 100644 index 0000000..1ac5de6 --- /dev/null +++ b/HKCardOUT/ViewModels/AdWindowViewModel.cs @@ -0,0 +1,13 @@ +using Stylet; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HKCardOUT.ViewModels +{ + public class AdWindowViewModel : PropertyChangedBase + { + } +} diff --git a/HKCardOUT/Views/AdWindow.xaml b/HKCardOUT/Views/AdWindow.xaml new file mode 100644 index 0000000..de5499e --- /dev/null +++ b/HKCardOUT/Views/AdWindow.xaml @@ -0,0 +1,21 @@ + + + + + diff --git a/HKCardOUT/Views/AdWindow.xaml.cs b/HKCardOUT/Views/AdWindow.xaml.cs new file mode 100644 index 0000000..81abd04 --- /dev/null +++ b/HKCardOUT/Views/AdWindow.xaml.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace HKCardOUT.Views +{ + /// + /// AdWindow.xaml 的交互逻辑 + /// + public partial class AdWindow : HandyControl.Controls.Window + { + public AdWindow() + { + InitializeComponent(); + InitView2(); + } + public async void InitView2() + { + await view2.EnsureCoreWebView2Async(null); + view2.CoreWebView2.Settings.AreDefaultContextMenusEnabled = false; + view2.CoreWebView2.Settings.AreDevToolsEnabled = false; + view2.CoreWebView2.NavigateToString("
hello world
"); + } + } +} diff --git a/HKCardOUT/Views/RootView.xaml.cs b/HKCardOUT/Views/RootView.xaml.cs index eaf6e6d..44f97b7 100644 --- a/HKCardOUT/Views/RootView.xaml.cs +++ b/HKCardOUT/Views/RootView.xaml.cs @@ -11,6 +11,8 @@ namespace HKCardOUT.Views public RootView() { InitializeComponent(); + AdWindow ad = new AdWindow(); + ad.Show(); if (Screen.AllScreens.Count() >= 2) { Dispatcher.Invoke(() =>