void IResourceDisplayer.DisplayResource(Control displayPane, IResource resource) { _navigateComplete = false; _highlightWords = false; if (_MSWord != null) { try { _MSWord.Quit(ref FALSE, ref MissingValue, ref MissingValue); } catch (Exception exception) { _tracer.TraceException(exception); } _MSWord = null; } _strFileName = FileResource.GetSourceFile(resource, _pluginEnvironment); if (_strFileName != null) { _savedEditFlags = FileTypesMap.GetEditFlags("Word.Document"); FileTypesMap.SetEditFlags("Word.Document", _savedEditFlags | 0x10000); // FTA_OpenIsSafe _refreshTimer.Start(); AxIEBrowser.AxCIEBrowserCtl preview = (AxIEBrowser.AxCIEBrowserCtl)displayPane; preview.Navigate(_strFileName); } }
void IResourceDisplayer.EndDisplayResource(Control displayPane, IResource resource) { if (_savedEditFlags != -1) { FileTypesMap.SetEditFlags("Word.Document", _savedEditFlags); _savedEditFlags = -1; } if (_strFileName != null) { try { _cleanup = true; _cleanupResource = resource; _preview.Navigate("about:blank"); } catch (Exception exception) { _tracer.TraceException(exception); } } }