Exemplo n.º 1
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        private void myRunButton_Click(object sender, EventArgs e)
        {
            Connection conn   = MainWindow.Instance.Connection;
            string     script = myScriptBox.Text;

            if (script.StartsWith("%%"))
            {
                ScriptControlWindow scw = new ScriptControlWindow(script);
                scw.Show();
            }
            else
            {
                conn.SendCommand(myScriptBox.Text);
            }
        }
Exemplo n.º 2
0
        ///////////////////////////////////////////////////////////////////////////////////////////
        private void myPromptBox_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                e.Handled = true;
                myConnection.SendCommand(myPromptBox.Text);

                if (!myAutocompletionList.Contains(myPromptBox.Text))
                {
                    myAutocompletionList.Add(myPromptBox.Text);
                    myPromptPopupMenu.Items.SetAutocompleteItems(myAutocompletionList);
                }

                myPromptBox.Text = "";
            }
        }