private void LoadSettings() { CApplicationSettings serial = new CApplicationSettings(); serial.Load("aurora_stettings.xml"); this.textBoxDefaultLocation.Text = serial._fileDefaultLocation; this.textDefaultFile.Text = serial._fileDefaultFile; this.richTextBoxCompCore.Text = serial._compCore; this.richTextBoxCompVar.Text = serial._compPrimitiveInit; this.richTextBoxCompPrim.Text = serial._compPrimitiveFunctions; this.richTextBoxCompConst.Text = serial._compPrimitiveConstructor; }
private void button1_Click(object sender, EventArgs e) { CCompiler tCompiler = new CCompiler(); // Look for primitive properties in the settings CApplicationSettings settings = new CApplicationSettings(); settings.Load("aurora_stettings.xml"); // Really need another pointer ??? // CCellMatrix theMatrix = _cellMatrix; // Call the compiler and run the code; //serial._compCore = this.richTextBoxCompCore.Text; tCompiler._injection_definition = this.richTextBoxCompVar.Text; tCompiler._injection_constructor = this.richTextBoxCompConst.Text; tCompiler._injection_primitives = this.richTextBoxCompPrim.Text; string tScriptToTest = ""; // @richTextBoxScript.Text; // Main script to compile //tCompiler.PreCompileScript(tScriptToTest); //tCompiler.RunPrecompiledScript(theMatrix); // Get the feedback of the compilation/run; //richTextBoxFeedBack.Text = tCompiler._compilerOutput; //richTextBoxFeedBack.Text += tCompiler._runOutput; //textBoxPrevCellValue.Text = _cellMatrix._lastEvaluatedValue; //.ToString(); //_lastFeedback = tCompiler._runOutput; if (tCompiler.CheckSyntax(tScriptToTest)) { MessageBox.Show("Script is ok.", "P2 C# Compiler 1.07"); } else { MessageBox.Show(tCompiler._compilerOutput, "P2 C# Compiler 1.07"); } }
private void DoEval() { CCompiler tCompiler = new CCompiler(); // Apply Cycée counter to the cell evaluated _cell.CycleInc(); DisplayCellCycle(); // Look for primitive properties in the settings CApplicationSettings settings = new CApplicationSettings(); settings.Load("aurora_stettings.xml"); // Really need another pointer ??? CCellMatrix theMatrix = _cellMatrix; // Call the compiler and run the code; tCompiler._injection_definition = settings._compPrimitiveInit; tCompiler._injection_constructor = settings._compPrimitiveConstructor; tCompiler._injection_primitives = settings._compPrimitiveFunctions; string tScriptToTest = @richTextBoxScript.Text; // Main script to compile tCompiler.PreCompileScript(tScriptToTest); tCompiler.RunPrecompiledScript(theMatrix); // Get the feedback of the compilation/run; richTextBoxFeedBack.Text = tCompiler._compilerOutput; richTextBoxFeedBack.Text += tCompiler._runOutput; textBoxPrevCellValue.Text = _cellMatrix._lastEvaluatedValue; //.ToString(); _lastFeedback = tCompiler._runOutput; DisplayCellMainStatus(_cellMatrix._lastCellStatus); }