Exemple #1
0
        /// <summary>
        /// Raises the <see cref="NavigateError"/> event.
        /// </summary>
        /// <exception cref="ArgumentNullException">Thrown when
        /// BrowserExtendedNavigateErrorEventArgs is null.</exception>
        protected void OnNavigateError(
            BrowserExtendedNavigateErrorEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException(@"e");
            }

            if (NavigateError != null)
            {
                NavigateError(this, e);
            }
        }
Exemple #2
0
            public void NavigateError(
                object pDisp,
                ref object url,
                ref object frame,
                ref object statusCode,
// ReSharper disable RedundantAssignment
                ref bool cancel)
// ReSharper restore RedundantAssignment
            {
                var urlUri = new Uri(url.ToString());

                var neStatus =
                    (NavigateErrorStatusCode)(uint)ConvertHelper.ToInt64(statusCode);

                var args =
                    new BrowserExtendedNavigateErrorEventArgs(pDisp, urlUri, neStatus, UrlContexts.None);

                _browser.OnNavigateError(args);

                cancel = args.Cancel;
            }
		/// <summary>
		/// Raises the <see cref="NavigateError"/> event.
		/// </summary>
		/// <exception cref="ArgumentNullException">Thrown when 
		/// BrowserExtendedNavigateErrorEventArgs is null.</exception>
		protected void OnNavigateError(
			BrowserExtendedNavigateErrorEventArgs e )
		{
			if ( e == null )
			{
				throw new ArgumentNullException( @"e" );
			}

			if ( NavigateError != null )
			{
				NavigateError( this, e );
			}
		}
			public void NavigateError(
				object pDisp,
				ref object url,
				ref object frame,
				ref object statusCode,
// ReSharper disable RedundantAssignment
				ref bool cancel )
// ReSharper restore RedundantAssignment
			{
				var urlUri = new Uri( url.ToString() );

				var neStatus =
					(NavigateErrorStatusCode)(uint)ConvertHelper.ToInt64( statusCode );

				var args =
					new BrowserExtendedNavigateErrorEventArgs( pDisp, urlUri, neStatus, UrlContexts.None );

				_browser.OnNavigateError( args );

				cancel = args.Cancel;
			}