Ejemplo n.º 1
0
        public AutocompleteList()
        {
            this.SelectedIndex = -1;

            //retrieve the tokens from the modules
            //add them to the master list along with the descriptions of each
            List <string> tokens = new FunctionModule().GetTokens();

            foreach (string token in tokens)
            {
                this.allItems.Add(new AutocompleteItem(AutocompleteItemType.Function, token, Autocomplete.ResourceManager.GetString(token)));
            }

            tokens = new ConstantModule().GetTokens();

            foreach (string token in tokens)
            {
                this.allItems.Add(new AutocompleteItem(AutocompleteItemType.Constant, token, Autocomplete.ResourceManager.GetString(token)));
            }

            //sort by alpha
            this.allItems.Sort(new Comparison <AutocompleteItem> ((x, y) => x.Name.CompareTo(y.Name)));
        }
Ejemplo n.º 2
0
 public void AddConstantModule(ConstantModule constantModule)
 {
     constantModules.Add(constantModule);
     router.Add(constantModules.Count);
 }