public void SetDlgInfo(Mediator mediator, PropertyTable propertyTable, IWfiWordform wordform, ParserListener parserListener) { Mediator = mediator; PropTable = propertyTable; m_persistProvider = new PersistenceProvider(Mediator, propertyTable, PersistProviderID); m_cache = PropTable.GetValue <LcmCache>("cache"); m_parserListener = parserListener; Text = m_cache.ProjectId.UiName + " - " + Text; SetRootSite(); SetFontInfo(); // restore window location and size after setting up the form textbox, because it might adjust size of // window causing the window to grow every time it is opened m_persistProvider.RestoreWindowSettings(PersistProviderID, this); if (wordform == null) { GetLastWordUsed(); } else { SetWordToUse(wordform.Form.VernacularDefaultWritingSystem.Text); } m_webPageInteractor = new WebPageInteractor(m_htmlControl, Mediator, m_cache, m_wordformTextBox); // No such thing as FwApp.App now: if(FwApp.App != null) // Could be null during testing var helpTopicProvider = PropTable.GetValue <IHelpTopicProvider>("HelpTopicProvider"); if (helpTopicProvider != null) // trying this { m_helpProvider.HelpNamespace = helpTopicProvider.HelpFile; m_helpProvider.SetHelpKeyword(this, helpTopicProvider.GetHelpString(HelpTopicID)); m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic); } if (m_parserListener.Connection != null) { m_parserListener.Connection.TryAWordDialogIsRunning = true; m_statusLabel.Text = GetString("ParserStatusPrefix") + ParserUIStrings.ksIdle_ + GetString("ParserStatusSuffix"); } else { m_statusLabel.Text = ParserStoppedMessage(); } }
public void SetDlgInfo(Mediator mediator, IWfiWordform wordform, ParserListener parserListener) { m_mediator = mediator; m_persistProvider = new PersistenceProvider(PersistProviderID, m_mediator.PropertyTable); m_cache = (FdoCache) m_mediator.PropertyTable.GetValue("cache"); m_parserListener = parserListener; Text = m_cache.ProjectId.UiName + " - " + Text; SetRootSite(); SetFontInfo(); // restore window location and size after setting up the form textbox, because it might adjust size of // window causing the window to grow every time it is opened m_persistProvider.RestoreWindowSettings(PersistProviderID, this); if (wordform == null) GetLastWordUsed(); else SetWordToUse(wordform.Form.VernacularDefaultWritingSystem.Text); m_webPageInteractor = new WebPageInteractor(m_htmlControl, m_mediator, m_wordformTextBox); #if !__MonoCS__ m_htmlControl.Browser.ObjectForScripting = m_webPageInteractor; #endif // HermitCrab does not currently support selected tracing /*if (m_cache.LangProject.MorphologicalDataOA.ActiveParser == "HC") { m_parserCanDoSelectMorphs = false; m_doSelectMorphsCheckBox.Enabled = false; } */ // No such thing as FwApp.App now: if(FwApp.App != null) // Could be null during testing if (m_mediator.HelpTopicProvider != null) // trying this { m_helpProvider.HelpNamespace = m_mediator.HelpTopicProvider.HelpFile; m_helpProvider.SetHelpKeyword(this, m_mediator.HelpTopicProvider.GetHelpString(HelpTopicID)); m_helpProvider.SetHelpNavigator(this, HelpNavigator.Topic); } if (m_parserListener.Connection != null) { m_parserListener.Connection.TryAWordDialogIsRunning = true; m_statusLabel.Text = GetString("ParserStatusPrefix") + ParserUIStrings.ksIdle_ + GetString("ParserStatusSuffix"); } else { m_statusLabel.Text = ParserStoppedMessage(); } }