Beispiel #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;
 }
Beispiel #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;
 }
Beispiel #5
0
 private void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     ScriptErrorManager.Instance.RegisterScriptError(e.Url, e.Description, e.LineNumber);
     e.Handled = true;
 }
Beispiel #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);
        }
Beispiel #8
0
 public void SuppressScriptErrorsHandler(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Beispiel #9
0
 void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Beispiel #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;
 }
		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);
			}
		}
Beispiel #12
0
 /// <summary>
 /// 处理此浏览器中载入的html文档对象的html元素错误.
 /// 如果HtmlElementErrorsSuppressed设定成true,则设定处理标识为true以防止浏览器
 /// 显示这个错误.
 /// </summary>
 protected void Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     if (HtmlElementErrorsSuppressed)
     {
         e.Handled = true;
     }
 }
 private void webBrowser1_Window_Error(object sender, HtmlElementErrorEventArgs e)
 {
     e.Handled = true;
 }
Beispiel #14
0
        //对错误进行处理
        void Window_Error(object sender, HtmlElementErrorEventArgs e)
        {
            // 自己的处理代码
            Log.logger(e.Description);
            System.GC.Collect();

            e.Handled = true;
        }
Beispiel #15
0
		void Window_Error(object sender, HtmlElementErrorEventArgs e)
		{
			MessageBox.Show(e.LineNumber + "," + e.Description, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
		}
Beispiel #16
0
 private void Window_Error(object sender,  HtmlElementErrorEventArgs e)
 {
     // Ignore the error and suppress the error dialog box.
     e.Handled = true;
 }
Beispiel #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);
        }
Beispiel #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));
 }
Beispiel #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);
        }
 /// <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;
 }
Beispiel #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
        }