|
|
@ -53,15 +53,6 @@ namespace AksWebBrowser |
|
|
|
{ |
|
|
|
{ |
|
|
|
PresenterFor = this, |
|
|
|
PresenterFor = this, |
|
|
|
Name = nameof(Parame.webBrowser), |
|
|
|
Name = nameof(Parame.webBrowser), |
|
|
|
Bindings = |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
nameof(CusWebBrowser.Title), |
|
|
|
|
|
|
|
"Title", |
|
|
|
|
|
|
|
//this, |
|
|
|
|
|
|
|
//BindingMode.OneWayToSource |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
MarginTop=0, |
|
|
|
MarginTop=0, |
|
|
|
MarginLeft=0, |
|
|
|
MarginLeft=0, |
|
|
|
MarginRight=0, |
|
|
|
MarginRight=0, |
|
|
@ -86,15 +77,13 @@ namespace AksWebBrowser |
|
|
|
MainModel.DeviceControllerInit(); |
|
|
|
MainModel.DeviceControllerInit(); |
|
|
|
Parame.webBrowser = FindPresenterByName<CusWebBrowser>(nameof(Parame.webBrowser)); |
|
|
|
Parame.webBrowser = FindPresenterByName<CusWebBrowser>(nameof(Parame.webBrowser)); |
|
|
|
textBox = FindPresenterByName<TextBox>(nameof(textBox)); |
|
|
|
textBox = FindPresenterByName<TextBox>(nameof(textBox)); |
|
|
|
|
|
|
|
|
|
|
|
Parame.webBrowser.CusRequest.CusResquestEvent += CusRequest_CusResquestEvent; |
|
|
|
Parame.webBrowser.CusRequest.CusResquestEvent += CusRequest_CusResquestEvent; |
|
|
|
|
|
|
|
|
|
|
|
//浏览器大小 |
|
|
|
//浏览器大小 |
|
|
|
Parame.webBrowser.Width = w; |
|
|
|
Parame.webBrowser.Width = w; |
|
|
|
Parame.webBrowser.Height = h; |
|
|
|
Parame.webBrowser.Height = h; |
|
|
|
Parame.webBrowser.Url = "http://127.0.0.1:8096/#/main-out"; |
|
|
|
//Parame.webBrowser.Url = "http://127.0.0.1:8096/#/main-out"; |
|
|
|
// Parame.webBrowser.Url = "http://192.168.0.232:8848/html/index.html"; |
|
|
|
//Parame.webBrowser.Url = "http://192.168.0.232:8848/html/index.html"; |
|
|
|
//Parame.webBrowser.Url = "http://192.168.0.34:8078/#/main-out"; |
|
|
|
Parame.webBrowser.Url = "http://192.168.0.34:8078/#/main-out"; |
|
|
|
//Parame.webBrowser.Url = Application.StartupPath + @"\html\index.html"; |
|
|
|
//Parame.webBrowser.Url = Application.StartupPath + @"\html\index.html"; |
|
|
|
//开发者工具暂时只能支持Windows |
|
|
|
//开发者工具暂时只能支持Windows |
|
|
|
//webBrowser.ShowDev(); |
|
|
|
//webBrowser.ShowDev(); |
|
|
@ -110,7 +99,7 @@ namespace AksWebBrowser |
|
|
|
MainModel.KillProcessByName("AksWebBrowser"); |
|
|
|
MainModel.KillProcessByName("AksWebBrowser"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool showDev = false; |
|
|
|
bool showDev = true; |
|
|
|
private void WebBrowser_LoadEnd(object sender, LoadEndEventArgs e) |
|
|
|
private void WebBrowser_LoadEnd(object sender, LoadEndEventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!showDev) |
|
|
|
if (!showDev) |
|
|
|