/// ------------------------------------------------------------------------------------ /// <summary> /// Restores the filtered out words (i.e. puts them back into the application's /// word cache). /// </summary> /// ------------------------------------------------------------------------------------ public static void Restore() { if (s_unusedWordsCache.Count > 0 && PaApp.WordCache != null) { PaApp.WordCache.AddRange(s_unusedWordsCache); PaApp.BuildPhoneCache(); s_unusedWordsCache.Clear(); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// /// </summary> /// ------------------------------------------------------------------------------------ public static void ApplyFilter(PaFilter filter) { Restore(); s_currFilter = filter; if (filter != null) { filter.Apply(); PaApp.BuildPhoneCache(); } PaApp.MsgMediator.SendMessage("DataSourcesModified", PaApp.Project.ProjectFileName); UpdateFilterGuiComponents(); PaApp.SettingsHandler.SaveSettingsValue("PaFiltersAddOn", "currfilter", (filter != null ? filter.Name : string.Empty)); }