chore(browser): sync current working implementation

Rollback tag: pre-current-browser-sync-20260818
This commit is contained in:
2026-08-18 14:30:23 +08:00
parent 6b78bbbf04
commit d3587a16f1
17 changed files with 133 additions and 437 deletions
+14
View File
@@ -16,6 +16,7 @@ namespace Lskj.PubBrower2
public previewFrm()
{
InitializeComponent();
this.SizeChanged += OnSizeChanged;
}
/// <summary>
/// <para>说明:窗口加载</para>
@@ -48,5 +49,18 @@ namespace Lskj.PubBrower2
}
}
/// <summary>
/// 窗体大小改变时
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnSizeChanged(object sender, EventArgs e)
{
if (this.moduleWebView.cefBrowserSettings != null)
{
var handle = this.moduleWebView.cefBrowserSettings.GetHost().GetWindowHandle();
this.moduleWebView.ResizeWindow(handle, this.Width, this.Height);
}
}
}
}