public MainForm() { _instance = this; InitializeComponent(); FormUtil.restoreLocation(this); webBrowser1.ObjectForScripting = new BrowserInterop(webBrowser1, new InteropMethods(this)); webBrowser1.Url = Utils.getUriForBrowser("index.html"); TextHook.instance.setContextFactory(new MyContextFactory(TextHook.instance)); /*Logger.onLog += (text) => { webBrowser1.callScript("log", "DEBUG: " + text); };*/ }
internal InteropMethods(MainForm form) { this.form = form; }