Exemple #1
0
		public void AddHandler (NavigationRequestedEventHandler value) {
			if (Events[WebBrowser.NavigationRequestedEvent] == null) {
				if (owner.Navigation != null) {
					nsIWebBrowser browser = (nsIWebBrowser) owner.navigation.navigation;
					browser.setParentURIContentListener (this);
				}
			}
			Events.AddHandler (WebBrowser.NavigationRequestedEvent, value);
		}
        protected virtual void OnNavigationRequested(string path)
        {
            NavigationRequestedEventHandler handler = NavigationRequested;

            if (handler != null)
            {
                handler(this, path);
            }
        }
Exemple #3
0
 public void AddHandler(NavigationRequestedEventHandler value)
 {
     if (Events[WebBrowser.NavigationRequestedEvent] == null)
     {
         if (owner.Navigation != null)
         {
             nsIWebBrowser browser = (nsIWebBrowser)owner.navigation.navigation;
             browser.setParentURIContentListener(this);
         }
     }
     Events.AddHandler(WebBrowser.NavigationRequestedEvent, value);
 }
Exemple #4
0
        bool nsIURIContentListener.onStartURIOpen(nsIURI aURI)
        {
            NavigationRequestedEventHandler eh = (NavigationRequestedEventHandler)(Events[WebBrowser.NavigationRequestedEvent]);

            if (eh != null)
            {
                AsciiString uri = new Mono.Mozilla.AsciiString("");
                aURI.getSpec(uri.Handle);
                NavigationRequestedEventArgs args = new NavigationRequestedEventArgs(uri.ToString());
                eh(this, args);
                return(args.Cancel);
            }
            return(true);
        }
Exemple #5
0
		public void RemoveHandler (NavigationRequestedEventHandler value) {
			Events.RemoveHandler (WebBrowser.NavigationRequestedEvent, value);
		}
Exemple #6
0
 public void RemoveHandler(NavigationRequestedEventHandler value)
 {
     Events.RemoveHandler(WebBrowser.NavigationRequestedEvent, value);
 }