コード例 #1
0
 /// ------------------------------------------------------------------------------------
 /// <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();
     }
 }
コード例 #2
0
        /// ------------------------------------------------------------------------------------
        /// <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));
        }