public bool HandleCommand(string command, ref Exception error)
 {
     try
     {
         ScriptingValue value = scriptingEnvironment.ParseValue(command);
         callback.ShowMessage(value.ToString());
         return(true);
     }
     catch (Exception ex)
     {
         error = ex;
         return(false);
     }
 }
Exemplo n.º 2
0
        private void Run(ScriptingValue value)
        {
            string result = "";

            try
            {
                result = value.ToString();
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            Invoke(new MethodInvoker(() =>
            {
                textOutput.Text += result + "\r\n";
                textOutput.Select(textOutput.Text.Length, 0);
                textOutput.ScrollToCaret();
            }));
        }