Exemple #1
0
        // After destinationInput of the user it will show an autosuggestion or removes the autosuggestions.
        private void DestinationInputTextChanged(object sender, EventArgs e)
        {
            AutoSuggestion autosuggest = new AutoSuggestion(this);

            autosuggest.SetList(nodeList);
            destinationInput.ForeColor = Color.Black;
            if (destinationInput.Text != "" && changeInput == false)
            {
                autosuggest.CheckInput(destinationInput.Text);

                if (autosuggest.suggestionsList.Count > 0)
                {
                    backupList = autosuggest.suggestionsList;
                    AutosuggestVisible();
                    autosuggest.SetupSuggestions(sender);
                }
                else
                {
                    // If there are no suggestions show the last suggested autoSuggestion.
                    if (backupList.Count() != 0)
                    {
                        autosuggest.ShowBackupList(backupList);
                    }
                    else
                    {
                        AutosuggesInVisible();
                        autosuggest.ClearAutosuggest();
                    }
                }
            }
            else
            {
                AutosuggesInVisible();
            }
        }
Exemple #2
0
        private void StationTypeIconClick(object sender, EventArgs e)
        {
            AutoSuggestion a = new AutoSuggestion(_form);

            a.FillTextbox(_stationName, _departureInput);
        }