Browse Source

提交优化

master
胡超1 1 year ago
parent
commit
1b90db90e4
  1. 19
      CPF_Cef/FrmMain.cs
  2. 1
      CPF_Cef/MainModel.cs

19
CPF_Cef/FrmMain.cs

@ -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)

1
CPF_Cef/MainModel.cs

@ -1112,7 +1112,6 @@ namespace AksWebBrowser
}); });
if (!isFuncisFuncObject("playVideo")) if (!isFuncisFuncObject("playVideo"))
{ {
return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "视频播放设备未授权使用" + "\"}"; return "{\"timestamp\":\"" + Utils.GetTimestamp() + "\",\"message\":\"Falied\",\"code\":\"400\",\"status\":false,\"data\":\"" + "视频播放设备未授权使用" + "\"}";
} }
else else

Loading…
Cancel
Save