예제 #1
0
        public BatchCompilerWindow(SplashWindow splashWindow)
        {
            InitializeComponent();

            (this.splashWindow = splashWindow).Hide();

            compiler = new TomScriptCompiler();
        }
        public CodePlaygroundWindow(SplashWindow splashWindow)
        {
            InitializeComponent();

            (this.splashWindow = splashWindow).Hide();

            compiler = new TomScriptCompiler(new CompilerOptions
            {
                UserFriendlyAppendages = false,
                Verbose = false
            });
        }
예제 #3
0
        public IActionResult OnPost(string submit)
        {
            if (submit == "Compile")
            {
                if (string.IsNullOrWhiteSpace(InputCode))
                {
                    return(null);
                }

                var compiler = new TomScriptCompiler(InputCode);
                GeneratedCode = compiler.Compile();
            }
            else if (submit == "Download")
            {
                if (string.IsNullOrWhiteSpace(GeneratedCode))
                {
                    return(null);
                }

                return(DownloadGeneratedCodeFile());
            }
            return(null);
        }