Example #1
0
        private bool CompileCode(string code)
        {
            string[] result = TccHelper.CompileByTcc(code);
            if (!String.IsNullOrEmpty(result[0]))
            {
                tbCompiledOutput.BackColor = Color.PeachPuff;
                tbCompiledOutput.Text      = result[0];
                return(false);
            }

            tbCompiledOutput.BackColor = Color.Gainsboro;
            if (!string.IsNullOrEmpty(result[1]))
            {
                tbCompiledOutput.Text = "Compiled Error: " + Environment.NewLine
                                        + "---------------" + Environment.NewLine
                                        + result[1];
            }
            else
            {
                tbCompiledOutput.Text = "Compiled successfully";
            }

            return(true);
        }