상속: System.EventArgs
예제 #1
0
 static void pWb_WBSecurityProblem(object sender, SecurityProblemEventArgs e)
 {
     Debug.Print("WBSecurityProblem==>" + e.problem.ToString());
 }
        private void WebBrower_WBSecurityProblem(object sender, SecurityProblemEventArgs e)
        {
            //处理一般安全提示
            if ((e.problem == WinInetErrors.HTTP_REDIRECT_NEEDS_CONFIRMATION) ||
                (e.problem == WinInetErrors.ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR) ||
                (e.problem == WinInetErrors.ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR) ||
                (e.problem == WinInetErrors.ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR) ||
                (e.problem == WinInetErrors.ERROR_INTERNET_MIXED_SECURITY))
            {
                e.handled = true;
                e.retvalue = Hresults.S_FALSE;
                return;
            }

            //非正常安全提示
            Logger.Log(e.problem.ToString());
            //log.Debug("WBSecurityProblem==>" + e.problem.ToString());
            //m_IsNavigationError = true;
            //m_IEErrorCode = e.problem;
            //lock (navigatelocker)
            //{
            //    Monitor.Pulse(navigatelocker);
            //}
        }