private void OnDocumentCompleted(object sender, System.Windows.Forms.WebBrowserDocumentCompletedEventArgs arg) { Log.UIService.LogDebugFormat("The url[{0}] has navigate completed", arg.Url.ToString()); //if ( 0 != string.Compare( arg.Url.ToString(), m_curUrl, true ) ) //if ( !arg.Url.ToString().Equals( m_curUrl, StringComparison.OrdinalIgnoreCase ) ) //{ // return; //} RemoveEventHandlesOfHtmlDocument(m_curHtmlDocument); m_curHtmlDocument = null; m_curHtmlDocument = ((System.Windows.Forms.WebBrowser)sender).Document; Debug.Assert(null != m_curHtmlDocument); ChangeCssResource(); ExtractAllScreenElements(m_curHtmlDocument); // m_curHtmlDocument.InvokeScript(s_ChangeLangScript, new object[] { m_application.CurrentLanguage }); AddEventHandlesOfHtmlDocument(m_curHtmlDocument); if (null != OwnerScreen) { OwnerScreen.NotifyScreenOk(m_curHtmlDocument); } // FindAllButtonsInHtml(m_curHtmlDocument); // Log.UIService.LogDebug("Notify UIServiceApp : navigate completd"); m_application.OnNavigateCompleted(); }
void View_ViewChanged(object sender, ViewChangedEventArgs e) { OwnerScreen.NotifyViewChanged(this, e); }