/// <summary> /// Implement the add words to spelling dictionary command. (May be called by reflection, /// though I don't think there is a current explicit menu item.) /// </summary> /// <param name="argument"></param> /// <returns></returns> public bool OnAddWordsToSpellDict(object argument) { CheckDisposed(); if (Cache == null) { return(false); // impossible? } WfiWordformServices.ConformSpellingDictToWordforms(Cache); return(true); // handled }
/// <summary> /// Implement the add words to spelling dictionary command. (May be called by reflection, /// though I don't think there is a current explicit menu item.) /// </summary> /// <param name="argument"></param> /// <returns></returns> public bool OnAddWordsToSpellDict(object argument) { CheckDisposed(); FdoCache cache = (FdoCache)m_mediator.PropertyTable.GetValue("cache"); if (cache == null) { return(false); // impossible? } WfiWordformServices.ConformSpellingDictToWordforms(cache); return(true); // handled }
private static FwXWindow RefreshCacheWindowAndAll(LexTextApp app, string fullProjectFileName) { var manager = app.FwManager; var appArgs = new FwAppArgs(fullProjectFileName); var newAppWindow = (FwXWindow)manager.ReopenProject(manager.Cache.ProjectId.Name, appArgs).ActiveMainWindow; if (IsVernacularSpellingEnabled(newAppWindow.Mediator)) { WfiWordformServices.ConformSpellingDictToWordforms(newAppWindow.Cache); } //clear out any sort cache files (or whatever else might mess us up) and then refresh newAppWindow.ClearInvalidatedStoredData(); newAppWindow.RefreshDisplay(); return(newAppWindow); }