Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 protected internal virtual void OnPageChangeNotificationDialogOpening(
     PageChangeNotificationDialogOpeningEventArgs e)
 {
     var handler = PageChangeNotificationDialogOpening;
     if (handler != null) {
         handler(this, e);
     }
 }