private void txtSnippet_AutoCompleteAccepted(object sender, AutoCompleteAcceptedEventArgs e)
        {
            string shortcut = txtSnippet.AutoComplete.SelectedText;

            Hide();
            Scintilla.Snippets.InsertSnippet(shortcut);
        }
Exemple #2
0
        /// <summary>
        ///     Raises the <see cref="AutoCompleteAccepted"/> event.
        /// </summary>
        /// <param name="e">An <see cref="AutoCompleteAcceptedEventArgs"/> that contains the event data.</param>
        protected virtual void OnAutoCompleteAccepted(AutoCompleteAcceptedEventArgs e)
        {
            EventHandler<AutoCompleteAcceptedEventArgs> handler = Events[_autoCompleteAcceptedEventKey] as EventHandler<AutoCompleteAcceptedEventArgs>;
            if (handler != null)
                handler(this, e);

            if (e.Cancel)
                AutoComplete.Cancel();
        }
 private void txtSnippet_AutoCompleteAccepted(object sender, AutoCompleteAcceptedEventArgs e)
 {
     string shortcut = txtSnippet.AutoComplete.SelectedText;
     Hide();
     Scintilla.Snippets.InsertSnippet(shortcut);
 }