CSScript 是基于C#的脚本库组件,控件下载
private void button1_Click(object sender, EventArgs e) { CSScript.GlobalSettings.InMemoryAsssembly=true; CSScript.CacheEnabled = false; Assembly asm=CSScript.Load("HelloScript.cs"); AsmHelper scriptAsm = new AsmHelper(asm); scriptAsm.Invoke("CSScriptTest1.HelloScript.callIt", "xieguoqing"); }
HelloScript.cs 是脚本文件
//css_import h2; using System; using System.Collections.Generic; using System.Text; using System.Windows.Forms; namespace CSScriptTest1 { public class HelloScript:Form { public static void callIt(String name) { /** MessageBox.Show(name+"12345"); HelloScript f = new HelloScript(); f.Text = "hello form"; f.ShowDialog(); **/ CSScriptTest1.h2.callIt2(); } } }
获取本站源码,请联系QQ15620030或微信zeyunsoft。本站同时还可以提供服务:远程环境搭建、项目代码运行、BUG修复调试、代码讲解等。本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。 地址:https://www.biyeyuanma.cn/post/89.html