Пример #1
0
        public void CompleteChoice()
        {
            if (Choices is null || !ChoicesVisible)
            {
                return;
            }
            string sc = Choices.ElementAtOrDefault(SelectedChoice);

            if (sc is null)
            {
                return;
            }
            if (start > end)
            {
                end = selection.Text.Length;
            }
            string newText = selection.Text.Substring(0, start);
            string curText = selection.Text.Substring(start, end - start);

            newText += sc;
            newText += selection.Text.Substring(end);
            selection.SelectionStart  = start + sc.Length;
            selection.SelectionLength = 0;
            selection.Text            = newText;
            SetBuffers2(newText);
            ChoicesVisible = false;
            AllTogether.Remove(choices);
            AllTogether.Remove(choicesBG);
            AllTogether.Remove(choicesSel);
        }
Пример #2
0
 public void HideChoices()
 {
     ShowingChoices = false;
     ChoicesVisible = false;
     AllTogether.Remove(choices);
     AllTogether.Remove(choicesBG);
     AllTogether.Remove(choicesSel);
 }