ACAT.Extensions.Default.UI.Scanners.TalkApplicationScannerAlphabetical49Keys.loadPhrases C# (CSharp) Method

loadPhrases() private method

Loads phrases from the abbreviations list. These are abbreviations that are marked "Speak" as the mode.
private loadPhrases ( ) : void
return void
        private void loadPhrases()
        {
            _abbreviationsList = new List<Abbreviation>();

            foreach (var abbr in Context.AppAbbreviations.AbbrevationList)
            {
                if (abbr.Mnemonic.StartsWith("**") && abbr.Mode == Abbreviation.AbbreviationMode.Speak)
                {
                    _abbreviationsList.Add(abbr);
                }
            }

            _abbreviationsList = _abbreviationsList.OrderBy(f => f.Mnemonic).ToList();

            for (int index = 1, abbrIndex = 0; abbrIndex < _abbreviationsList.Count && index <= PhraseCount; index++)
            {
                String name = "Phrase" + index;

                var widget = _alphabetScannerCommon.ScannerCommon.GetRootWidget().Finder.FindChild(name);
                if (widget != null)
                {
                    (widget as TabStopScannerButton).SetTabStops(0.0f, new float[] { 0 });
                    widget.SetText(_abbreviationsList[abbrIndex].Expansion);
                    abbrIndex++;
                }
            }
        }