示例#1
0
        public void RunScript()
        {
            if (!srm.HasStdOutputListener(this))
            {
                srm.AddStdOutputListener(this);
            }

            try
            {
                CompiledScript cs = srm.Compile(editor.Text);
                object         v  = srm.RunCompiledScript(cs);

                if (ScriptExecuted != null)
                {
                    ScriptExecuted(this, null);
                }

                timer.Enabled = true;
                //LogValue(v);
            }
            catch (Exception ex)
            {
                Log("error: " + ex.Message);
            }
        }