Пример #1
0
            public bool onerror(string description, string urlString, int line)
            {
                HtmlElementErrorEventArgs e = new HtmlElementErrorEventArgs(description, urlString, line);

                this.FireEvent(HtmlWindow.EventError, e);
                return(e.Handled);
            }
 void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
   // We got a script error, record it
   ScriptErrorManager.Instance.RegisterScriptError(e.Url, e.Description, e.LineNumber);
   // Let the browser know we handled this error.
   e.Handled = true;
 }
Пример #3
0
        internal void OnError(object sender, EventArgs ev)
        {
            HtmlElementErrorEventHandler eh = (HtmlElementErrorEventHandler)(Events[ErrorEvent]);

            if (eh != null)
            {
                HtmlElementErrorEventArgs e = new HtmlElementErrorEventArgs(String.Empty, 0, null);
                eh(this, e);
            }
        }
 public bool onerror(string description, string urlString, int line)
 {
     HtmlElementErrorEventArgs e = new HtmlElementErrorEventArgs(description, urlString, line);
     this.FireEvent(HtmlWindow.EventError, e);
     return e.Handled;
 }
Пример #5
0
 private void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     ScriptErrorManager.Instance.RegisterScriptError(e.Url, e.Description, e.LineNumber);
     e.Handled = true;
 }
Пример #6
0
 void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     if (this.m_bSuppressScriptErrors == true)
         e.Handled = true;
 }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// htmlelementerroreventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this HtmlElementErrorEventHandler htmlelementerroreventhandler, Object sender, HtmlElementErrorEventArgs e, AsyncCallback callback)
        {
            if(htmlelementerroreventhandler == null) throw new ArgumentNullException("htmlelementerroreventhandler");

            return htmlelementerroreventhandler.BeginInvoke(sender, e, callback, null);
        }
Пример #8
0
 public void SuppressScriptErrorsHandler(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Пример #9
0
 void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Пример #10
0
 private void OnWebBrowserDocumentWindowError(object sender, System.Windows.Forms.HtmlElementErrorEventArgs e)
 {
     //Suppresses a dialog and continues running scripts on the page
     e.Handled = true;
 }
Пример #11
0
		internal void OnError (object sender, EventArgs ev)
		{
			HtmlElementErrorEventHandler eh = (HtmlElementErrorEventHandler) (Events[ErrorEvent]);
			if (eh != null) {
				HtmlElementErrorEventArgs e = new HtmlElementErrorEventArgs (String.Empty, 0, null);
				eh (this, e);
			}
		}
Пример #12
0
 /// <summary>
 /// 处理此浏览器中载入的html文档对象的html元素错误.
 /// 如果HtmlElementErrorsSuppressed设定成true,则设定处理标识为true以防止浏览器
 /// 显示这个错误.
 /// </summary>
 protected void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     if (HtmlElementErrorsSuppressed)
     {
         e.Handled = true;
     }
 }
Пример #13
0
 private void webBrowser1_Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Пример #14
0
        //对错误进行处理
        void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // 自己的处理代码
            Log.logger(e.Description);
            System.GC.Collect();

            e.Handled = true;
        }
Пример #15
0
		void Window_Error(object sender, HtmlElementErrorEventArgs e)
		{
			MessageBox.Show(e.LineNumber + "," + e.Description, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
		}
Пример #16
0
 private void Window_Error(object sender,  HtmlElementErrorEventArgs e)
 {
     // Ignore the error and suppress the error dialog box.
     e.Handled = true;
 }
Пример #17
0
        /// <summary>
        /// Called when there is a script error in the window
        /// </summary>
        /// <param name="sender">The sending object</param>
        /// <param name="e">Event arguments</param>
        private void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // Handle the original error
            e.Handled = true;

            // Build the error data
            GEEventArgs ea = new GEEventArgs();

            ea.Message = "Document Error";
            ea.Data = "line " + e.LineNumber.ToString() + " - " + e.Description;

            ////string badline = Properties.Resources.Plugin.Split('\n')[e.LineNumber - 1];

            // Bubble the error
            this.OnScriptError(e.ToString(), ea);
        }
Пример #18
0
 //捕获控件的错误
 private void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     // 自己的处理代码
     e.Handled = true;
 }
 /// <summary>
 /// Handles any native errors in the window and raises a custom script error in their place.
 /// </summary>
 /// <param name="w">the window object</param>
 /// <param name="we">the error arguments</param>
 private void OnWindow_Error(object w, HtmlElementErrorEventArgs we)
 {
     we.Handled = true;
     this.ScriptError(this, new GEEventArgs("line:" + we.LineNumber, "Description: " + we.Description));
 }
Пример #20
0
        /// <summary>
        /// Called when there is a script error in the window
        /// </summary>
        /// <param name="sender">The sending object</param>
        /// <param name="e">Event arguments</param>
        private void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // Handle the original error
            e.Handled = true;

            // Copy the error data
            GEEventArgs ea = new GEEventArgs();
            ea.Message = e.Description;
            ea.Data = e.LineNumber.ToString();

            // Bubble the error
            this.OnScriptError(this, ea);
        }
Пример #21
0
 /// <summary>
 /// If a script error occurs, stop processing
 /// </summary>
 /// <param name="sender">The sender of the event</param>
 /// <param name="e">The event arguments</param>
 void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     navCount = 2;
     errorText = e.Description;
 }
Пример #22
0
        private void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // Ignore the error and suppress the error dialog box.
            e.Handled = true;
               // MessageBox.Show("Suppressed error!");

            //Muestro informacion en el laber estado
            Estado.Text = "Suppressed error!";

            //Ultima informacion encontrada sobre este error
            //http://msdn.microsoft.com/es-es/library/vstudio/system.windows.forms.htmlelementerroreventargs.handled(v=vs.100).aspx
        }