示例#1
0
        private void TestRunArbitraryJavaScriptToolStripMenuItemClick(object sender, EventArgs e)
        {
            InputForm inputForm = new InputForm();

            if (inputForm.ShowDialog() == DialogResult.OK)
            {
                string script = inputForm.GetInput();
                try
                {
                    string result = _browserControl.RunScript(script, "about:blank", 1, 5000);
                    MessageBox.Show(result, "Result");
                }
                catch (Exception err)
                {
                    MessageBox.Show(err.ToString(), "Error");
                }
            }
        }
示例#2
0
 private void TestRunArbitraryJavaScriptToolStripMenuItemClick(object sender, EventArgs e)
 {
     InputForm inputForm = new InputForm();
     if(inputForm.ShowDialog() == DialogResult.OK)
     {
         string script = inputForm.GetInput();
         try
         {
             string result = _browserControl.RunScript(script, "about:blank", 1, 5000);
             MessageBox.Show(result, "Result");
         }
         catch(Exception err)
         {
             MessageBox.Show(err.ToString(), "Error");
         }
     }
 }