protected override void ShowRecord() { if (!m_fullyInitialized || IsDisposed || m_mainView.IsDisposed || !Visible) { return; } base.ShowRecord(); var cmo = Clerk.CurrentObject; // Don't steal focus Enabled = false; m_mainView.DocumentCompleted += EnableRecordDocView; if (cmo != null && cmo.Hvo > 0) { var configurationFile = DictionaryConfigurationListener.GetCurrentConfiguration(m_propertyTable); if (String.IsNullOrEmpty(configurationFile)) { m_mainView.DocumentText = String.Format("<html><body><p>{0}</p></body></html>", xWorksStrings.ksNoConfiguration); return; } var configuration = new DictionaryConfigurationModel(configurationFile, Cache); var xhtmlPath = ConfiguredXHTMLGenerator.SavePreviewHtmlWithStyles(new [] { cmo.Hvo }, null, configuration, m_propertyTable); m_mainView.Url = new Uri(xhtmlPath); m_mainView.Refresh(WebBrowserRefreshOption.Completely); } else { m_mainView.DocumentText = "<html><body></body></html>"; } }
public void ExportDictionaryContent(string xhtmlPath, DictionaryConfigurationModel configuration = null, IThreadedProgress progress = null) { using (ClerkActivator.ActivateClerkMatchingExportType(DictionaryType, m_mediator)) { configuration = configuration ?? new DictionaryConfigurationModel( DictionaryConfigurationListener.GetCurrentConfiguration(m_mediator, "Dictionary"), m_cache); ExportConfiguredXhtml(xhtmlPath, configuration, DictionaryType, progress); } }
public void ExportReversalContent(string xhtmlPath, string reversalWs = null, DictionaryConfigurationModel configuration = null, IThreadedProgress progress = null) { using (ClerkActivator.ActivateClerkMatchingExportType(ReversalType, m_mediator)) using (ReversalIndexActivator.ActivateReversalIndex(reversalWs, m_mediator, m_cache)) { configuration = configuration ?? new DictionaryConfigurationModel( DictionaryConfigurationListener.GetCurrentConfiguration(m_mediator, "ReversalIndex"), m_cache); ExportConfiguredXhtml(xhtmlPath, configuration, ReversalType, progress); } }