private int OnBeforeUnloadDialog(IntPtr self, IntPtr browser, IntPtr messagetext, int isreload, IntPtr callback)
        {
            var e = new PageChangeNotificationDialogOpeningEventArgs {
                Browser = Browser.FromHandle(browser),
                IsReload = Convert.ToBoolean(isreload),
                Message = StringUtf16.ReadString(messagetext),
                Callback =
                    JavaScriptDialogCallback.FromHandle(callback)
            };

            _browserDelegate.OnPageChangeNotificationDialogOpening(e);

            return e.IsHandled ? 0 : 1;
        }
示例#2
0
 protected internal virtual void OnPageChangeNotificationDialogOpening(
     PageChangeNotificationDialogOpeningEventArgs e)
 {
     var handler = PageChangeNotificationDialogOpening;
     if (handler != null) {
         handler(this, e);
     }
 }