Skip to content

Instantly share code, notes, and snippets.

@DinisCruz
Created November 6, 2012 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DinisCruz/4022339 to your computer and use it in GitHub Desktop.
Save DinisCruz/4022339 to your computer and use it in GitHub Desktop.
O2 Script - Compile and run an O2 WinForms control (included in the O2_FluentSharp_BCL.dll)
"testing control...".popupWindow().add_Control<ascx_Simple_Script_Editor>();
//O2File:E:\O2_V4\O2.FluentSharp\O2.FluentSharp.REPL\Ascx\ascx_Simple_Script_Editor.cs
//O2Tag_OnlyAddReferencedAssemblies
//using O2.XRules.Database.Utils
//using O2.DotNetWrappers.ExtensionMethods
//O2Ref:O2_FluentSharp_BCL.dll
//O2Ref:O2_FluentSharp_CoreLib.dll
//O2Ref:System.Core.dll
//O2Ref:System.Windows.Forms.dll
//O2Ref:System.dll
var compileEngine = new CompileEngine(false);
var file = @"E:\O2_V4\O2.FluentSharp\O2.FluentSharp.REPL\Ascx\ascx_Simple_Script_Editor.cs";
var assembly = compileEngine.compileSourceFile(file);
var type = assembly.type("ascx_Simple_Script_Editor");
panel.clear().add_Control(type);
//using O2.Kernel;
//using O2.DotNetWrappers.DotNet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment