ACAT.Extensions.Default.FunctionalAgents.AbbreviationsAgent.AbbreviationsScanner.LoadAbbreviations C# (CSharp) Method

LoadAbbreviations() public method

Get the list of abbreviations and populates the list
public LoadAbbreviations ( ) : void
return void
        public void LoadAbbreviations()
        {
            Windows.SetText(SearchFilter, String.Empty);

            _allAbbreviationsList = Context.AppAbbreviations.AbbrevationList;
            _abbreviationsList = _allAbbreviationsList.ToList();

            refreshAbbreviationsList();
        }

Usage Example

Example #1
0
        /// <summary>
        /// Adds a new abbreviation to the list, saves
        /// and reloads the abbreviation list
        /// </summary>
        /// <param name="abbr">abbreviation to add</param>
        private void addAbbreviation(Abbreviation abbr)
        {
            Windows.SetVisible(_abbrForm, false);

            var operation = new AbbrOperation {
                InputAbbreviation = abbr, Add = true
            };

            editOrAddAbbreviation(operation);

            if (!operation.Cancel)
            {
                Context.AppAbbreviations.Add(operation.OutputAbbreviation);
                Context.AppAbbreviations.Save();
                Context.AppAbbreviations.Load();
            }

            _abbrForm.LoadAbbreviations();

            Windows.SetVisible(_abbrForm, true);
        }