Esempio n. 1
0
 private void uxListBox_KeyUp(object sender, KeyEventArgs e)
 {
     if (Mode == DisplayData.Question)
     {
         if (e.KeyCode == Keys.Enter)
         {
             var selectedText = uxListBox.GetItemText(uxListBox.SelectedItem);
             ClearList();
             Mode             = DisplayData.Default;
             uxInputText.Text = "";
             HideForm();
             uxInputText.Enabled = true;
             //PluginCallback?.Invoke(selectedText);
             if (PluginCallback != null)
             {
                 PluginCallback.Invoke(selectedText);
             }
             else
             {
                 ClearList();
             }
         }
         else if (e.KeyCode == Keys.Escape)
         {
             uxInputText.Text = "";
             ClearList();
             Mode = DisplayData.Default;
         }
     }
 }
Esempio n. 2
0
        private async Task OnPluginCallback(object source, ActionEventArgs e)
        {
            if (PluginCallback == null)
            {
                return;
            }

            await PluginCallback.Invoke(source, e);
        }