Вверх ↑
Главный модератор
Ответов: 2997
Рейтинг: 395
#1: 2017-11-19 15:59:09 ЛС | профиль | цитата
Добавлен элемент CScript:
wiki

Description
   C# script execution engine

Properties
  • Arguments<int> - Sets the number of arguments.
  • Script<string> - Sets the script code to be executed.
  • UseClass<bool> - Allows you to define a script as a class.
    Methods
  • doCheck() - Checks the script.
  • doCScript(object[] args) - Executes the script.
    Events
  • onError<string> - Occurs if the script contains syntax errors and returns the debug information.
  • onResult<object> - Occurs after the script finishes and returns the result to the flow.
    Variables
  • Result<object> - Returns the result of the script execution.
    Examples
    
    #sha
    Add(EntryPoint,2953706,133,77)
    {
    Left=20
    Top=105
    Width=325
    StartPosition=1
    link(onCreate,8:doData,[])
    Point(doText)
    }
    Add(CScript,3,77,77)
    {
    Script=""
    Arguments=1
    UseClass=0
    link(onResult,2953706:doText,[])
    link(Arg1,7:Text,[])
    Point(onError)
    link(onError,5:doShow,[(121,90)(121,125)])
    Point(doScript)
    }
    Add(Button,4,21,77)
    {
    Left=114
    Top=204
    Text="Execute"
    Point(onClick)
    link(onClick,3:doCScript,[])
    }
    Add(MessageBox,5,133,119)
    {
    }
    Add(TextBox,7,77,21)
    {
    Left=94
    Top=177
    Width=115
    Text="C# script engine"
    Point(doText)
    Point(Text)
    Point(Data)
    }
    Add(DoData,8,189,77)
    {
    link(onEventData,3:doScript,[(237,83)(237,167)(63,167)(63,90)])
    link(Data,9:Text,[])
    }
    Add(TextBox,9,189,21)
    {
    Left=19
    Top=7
    Width=266
    Height=136
    Text="using System;\r\n\r\npublic class Script\r\n{\r\n public static string Main(object[] args)\r\n {\r\n return String.Format("Hello {0}!", args[0]);\r\n }\r\n}"
    Multiline=0
    Point(doText)
    Point(Text)
    Point(Data)
    }
    Notes

    Find more information: http://www.csscript.net

    Element update: [svn]CScript.cs[/svn]
  • карма: 6
    Дорогу осилит идущий. Install/Update HiAsm.NET
    0