public py_api_doc(string _api_doc_str, Icon _icon, string _title) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); // // TODO: Add constructor code after the InitializeComponent() call. // if (m_instance == null) { m_instance = this; } this.Icon = _icon; this.Text = _title; try { // check if browser component exists HTMLBrowser.Refresh(); } catch (Exception /*_err*/) { this.Controls.Remove(HTMLBrowser); this.Text = "Ooops!.. It seems like you need to install 'libgluezilla' to view the in-app document or try to select 'In-Browser Doc' option or press F1"; return; } this.HTMLBrowser.DocumentText = _api_doc_str; }
private void OnLoaded(object sender, RoutedEventArgs e) { System.Diagnostics.Debug.WriteLine("OnLoaded."); if (!DocumentIsReady) { string HtmlSource = ""; string StyleSheet = ""; HTMLBrowser.NavigateToString(WrapHtmlContent(HtmlSource, StyleSheet)); } }