static void Main(string[] args) { if (args.Length == 0) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } else { if (!File.Exists(args[0])) { return; } FlowDrawPanel.EnumerateClasses("dlls", new string[0]); var engine = new Engine(); try { using (FileStream stream = File.Open(args[0], FileMode.Open)) { var manager = engine.Load(stream, false); manager.Initialize(); engine.Start(); } } catch (Exception ex) { Console.WriteLine(ex.Message); Console.Write(ex); } Console.ReadLine(); } }
private void Form1_Load(object sender, EventArgs e) { FlowDrawPanel.EnumerateClasses("dlls", new string[0]); FlowDrawPanel.AddFilter(new NodeFilterInfo("Console", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineConsole\\."), new Regex("^FlowScriptEngineData\\.") }, null)); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null)); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD(Script)", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null, null, new Regex[] { new Regex("^PPD\\.Mod") })); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD(Mod)", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null)); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPDEditor", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPDEditor\\."), new Regex("^FlowScriptEngineData\\.") }, null)); AddEmptyFlowDrawPanel(); flowSearchPanel1.Searched += flowSearchPanel1_Searched; flowSearchPanel1.SelectionChanged += flowSearchPanel1_SelectionChanged; }
public ScriptManager() { InitializeComponent(); propertyForm = new FlowPropertyDockForm(); treeViewForm = new FlowTreeViewDockForm(); scriptListForm = new ScriptListDockForm(); searchForm = new FlowSearchDockForm(); executingPropertyForm = new FlowExecutingPropertyDockForm(); logForm = new FlowLogDockForm(); propertyForm.VisibleChanged += windowVisibleChanged; treeViewForm.VisibleChanged += windowVisibleChanged; scriptListForm.VisibleChanged += windowVisibleChanged; searchForm.VisibleChanged += windowVisibleChanged; executingPropertyForm.VisibleChanged += windowVisibleChanged; logForm.VisibleChanged += windowVisibleChanged; scriptListForm.Renamed += scriptListForm_Renamed; scriptListForm.Deleted += scriptListForm_Deleted; scriptListForm.ScriptSelected += scriptListForm_ScriptSelected; scriptListForm.Reloaded += scriptListForm_Reloaded; searchForm.FlowSearchPanel.Searched += FlowSearchPanel_Searched; searchForm.FlowSearchPanel.SelectionChanged += FlowSearchPanel_SelectionChanged; dockPanel1.ActiveDocumentChanged += dockPanel1_ActiveDocumentChanged; FlowDrawPanel.EnumerateClasses("dlls", new string[] { "FlowScriptEngineConsole" }); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null)); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD(Script)", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null, null, new Regex[] { new Regex("^PPD\\.Mod") })); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPD(Mod)", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPD\\."), new Regex("^FlowScriptEngineData\\.") }, null)); FlowDrawPanel.AddFilter(new NodeFilterInfo("PPDEditor", new Regex[] { new Regex("^FlowScriptEngineBasic\\."), new Regex("^FlowScriptEngineBasicExtension\\."), new Regex("^FlowScriptEngineSlimDX\\."), new Regex("^FlowScriptEnginePPDEditor\\."), new Regex("^FlowScriptEngineData\\.") }, null)); Load += ScriptManager_Load; }