public ScriptEditor(Bootstrap.Expr expr) { InitializeComponent(); _expr = expr; if (_expr != null) { tbScript.Text = _expr.Decompile(); } }
private void UpdateScriptPreview(TextBoxExt textBox, Bootstrap.Expr expr, string defValue) { if (expr != null && expr.Valid) { textBox.Text = expr.Decompile(); } else { textBox.Text = defValue; } }
private void btnOK_Click(object sender, EventArgs e) { // grab the text from the text box amd compile it. Bootstrap.Expr expr = new Bootstrap.Expr(tbScript.Text); // check for errors. if (expr.Errors != null) { tbErrors.Text = expr.Errors; return; } // store the new expression. _expr = expr; }
private void btnCompile_Click(object sender, EventArgs e) { // grab the text from the text box amd compile it. Bootstrap.Expr expr = new Bootstrap.Expr(tbScript.Text); // check for errors. if (expr.Errors != null) { tbErrors.Text = expr.Errors; return; } else { tbErrors.Text = ""; } }