Пример #1
0
        public void CompileAllToString()
        {
            string allCode = @"
using System; 
using System.Collections.Generic; 
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VisualScripting;

namespace VisualScripting
{ ";

            allCode += "\n";
            for (int i = 0; i < visualProject.visualClasses.Count; i++)
            {
                allCode += visualProject.visualClasses[i].CompileToString() + " \n ";
            }


            allCode += "}";
            Console.Out.WriteLine(allCode);
            if (ConsoleForm.Instance == null)
            {
                ConsoleForm c = new ConsoleForm();
                c.Show();
            }

            VisualScriptCompiler visualCompiler = new VisualScriptCompiler(allCode, this);

            visualCompiler = null;
        }
Пример #2
0
        void CompileAllToString()
        {
            string allCode = @"
                using System; 
                using System.Collections.Generic; 
                using System.Linq;
                using System.Text;
                using System.Threading.Tasks;

                namespace NewProgram
                {
                    class Program
                    {
                        static void Main(string[] args)
                        {
                        }

                        public void Start(string args)
                        {
                        
                        ";

            allCode += currentNodes[0].CompileToString();
            allCode += @"
                        }
                    }
                }";

            VisualScriptCompiler visualCompiler = new VisualScriptCompiler(allCode);

            visualCompiler = null;

            ConsoleForm c = new ConsoleForm();

            c.Show();
        }