| | |
| | | using GZ.DB.Repository.OIDATABASE; |
| | | using GZ.DB.IRepository.OIDATABASE; |
| | | using GZ.DB.Entity.OIDATABASE; |
| | | using Microsoft.Web.WebView2.Wpf; |
| | | using System.Threading; |
| | | |
| | | namespace GZ.Projects.AuxAllWCS |
| | | { |
| | |
| | | this.DataContext = ViewModel.CreateInstance(this,typeof(View1)); |
| | | this.Loaded += (this.DataContext as ViewModel).View1_LoadEvent; |
| | | this.Closing += (this.DataContext as ViewModel).View1_CloseEvent; |
| | | |
| | | commmd(); |
| | | } |
| | | |
| | | public async void commmd() |
| | | { |
| | | await webView.EnsureCoreWebView2Async(); |
| | | labbb: |
| | | if (!string.IsNullOrEmpty(HttpServer._listenerPrefix)) |
| | | if (webView.Source != new Uri(HttpServer._listenerPrefix)) |
| | | { |
| | | webView.CoreWebView2.Navigate(HttpServer._listenerPrefix + "/index.html"); |
| | | goto EndInit; |
| | | } |
| | | System.Threading.Thread.Sleep(2000); |
| | | goto labbb; |
| | | EndInit: |
| | | Console.WriteLine("end"); |
| | | } |
| | | } |
| | | } |