示例#1
0
 //----< "Run" button >------------------------------
 private void button3_Click(object sender, EventArgs e)
 {
     endflag = false;
     sbOutput.Remove(0, sbOutput.Length);
     richTextBox2.Clear();
     WriteBufferDelegate d1 = WriteOutput;
     consoleProgram theprogram = new consoleProgram();
     content = rbtSourceCode.Text;
     //content.Replace('\n', ' ');
     theprogram.setText(content);
     theprogram.setDelegate(d1);
     Thread oThread = new Thread(new ThreadStart(theprogram.VisitLine));
     oThread.Start();
     while (!endflag)
     {
         ReadFromBuffer();
     }
     oThread.Abort();
 }
示例#2
0
文件: Program.cs 项目: zuzhu/SPINA
 //----< deprecated, only for console application >------------------------------
 public static void Main(String[] args)
 {
     consoleProgram theprogram = new consoleProgram();
     theprogram.setText("a=[1,2,3;4,5,6]; b=[2;4;6]; c=a*b; print c;");
     theprogram.VisitLine();
 }