CefSharp - 实现 ChromiumFX 的访问方法

时间:2021-05-28 15:40:24

标签: c# winforms cefsharp chromium-embedded

我们的项目 (WinForms) 从 ChromiumFX(已过时)迁移到 CefSharp。 我有以下代码片段:

private string sourceSnapshot;

void OnLoad(EventArgs e) {
CfxStringVisitor cfxStringVisitor = new CfxStringVisitor();
cfxStringVisitor.Visit += GetSourceProcessor;
...
}
private void GetSourceProcessor(object sender, CfxStringVisitorVisitEventArgs e)
{
sourceSnapshot = e.String;
//some other stuff
}

在 CFX 中,CfxStringVisitor.Visit 是一个事件处理程序,但在 CefSharp 中,TaskStringVisitor.Visit() 是一个方法。我对如何重写这一点感到困惑。也许我什至不需要在我的代码的新版本中使用 Visit() ? 请帮忙。

0 个答案:

没有答案