private void closeRequestAction() { if (this.onCloseScript != null) { foreach (Control element in this.Controls) { //this.onCloseScript.updateVarByObject() string nameOfObject = element.Name; string objectValue = element.Text; this.onCloseScript.createOrUpdateStringVar("&" + nameOfObject + "." + "Text", objectValue); if (this.onCloseScript.Parent != null) { this.onCloseScript.Parent.createOrUpdateStringVar("&" + this.ScriptIdent + "." + nameOfObject + "." + "Text", objectValue); } } if (this.onCloseScript.getNotRuntimeErrorCount() == 0) { RefScriptExecute executer = new RefScriptExecute(this.onCloseScript, this); executer.run(); } } }
private void onDoneCsv() { if (this.onDoneExportCsv != null) { RefScriptExecute executer = new RefScriptExecute(this.onDoneExportCsv, this); executer.run(); } }
private void timer1_Tick(object sender, EventArgs e) { if (this.onTimerScr != null) { RefScriptExecute exec = new RefScriptExecute(this.onTimerScr, this); exec.run(); } }
private void TextBox_Enter(object sender, EventArgs e) { if (this.onEnterScr != null) { RefScriptExecute exec = new RefScriptExecute(this.onEnterScr, this); exec.run(); } }
private void onCloseFomrmScr() { if (this.onCloseScript != null) { RefScriptExecute executer = new RefScriptExecute(this.onCloseScript, this); executer.run(); } }
private void execOnStart() { if (this.startIterateScript != null) { RefScriptExecute exec = new RefScriptExecute(this.startIterateScript, this); exec.run(); } }
private void execOnDone() { if (this.endIterateScript != null) { RefScriptExecute exec = new RefScriptExecute(this.endIterateScript, this); exec.run(); } }
private void onDone() { if (this.onDoneScript != null) { RefScriptExecute executer = new RefScriptExecute(this.onDoneScript, this); executer.run(); } }
private void execOnError(string message) { if (this.OnErrorScript != null) { this.OnErrorScript.createOrUpdateStringVar("&" + this.errorScriptVar, message); RefScriptExecute exec = new RefScriptExecute(this.OnErrorScript, this); exec.run(); } }
private void TextBox_TextChanged(object sender, EventArgs e) { this.Text = TextBox.Text; if (this.onChangeScr != null) { RefScriptExecute exec = new RefScriptExecute(this.onChangeScr, this); exec.run(); } }
public void invoke(ReflectionScript script) { this.Script = script; if (this.Script.getErrorCount() == 0) { RefScriptExecute executer = new RefScriptExecute(this.Script, this); executer.run(); } }
private void StartBtn_Click(object sender, EventArgs e) { if (this.script != null) { runTimer.Enabled = true; this.StartBtn.Enabled = false; this.BackgroundImage = Projector.Properties.Resources.green_bar; RefScriptExecute exec = new RefScriptExecute(this.script.Script, this.parent); exec.run(); } }
public void showOpenFileDialog() { if (this.opener.ShowDialog() == DialogResult.OK) { if (this.openScript != null) { this.openScript.createOrUpdateStringVar("&" + this.nameOfVar, this.opener.FileName); RefScriptExecute exec = new RefScriptExecute(this.openScript, this); exec.run(); } } }
private void onStatusChange(string message) { if (this.onStatusScript != null) { if (this.statusMessageVar != null) { this.onStatusScript.createOrUpdateStringVar("&" + this.statusMessageVar, message); } RefScriptExecute executer = new RefScriptExecute(this.onStatusScript, this); executer.run(); } }
private void Button_Click(object sender, EventArgs e) { if (this.invokeOnClickScr != null) { RefScriptExecute executer = new RefScriptExecute(this.invokeOnClickScr, this); executer.run(); } if (autoCloseParent) { closeForm(); } }
private void scriptExec_Click(object sender, EventArgs e) { if (this.scriptText != null) { ReflectionScript script = new ReflectionScript(); script.setCode(this.scriptText); if (script.getNotRuntimeErrorCount() == 0) { RefScriptExecute executer = new RefScriptExecute(script, this); executer.run(); } } }
private void executeScript() { lastLineUpdate = -1; this.logbook.Items.Clear(); this.logbook.Items.Add("START ..."); this.Highlight.clearExecutions(); script.setCode(codingBox.Text, true); if (script.getErrorCount() == 0) { errorLabels.Text = "Start exec"; errorLabels.ForeColor = Color.LightBlue; errorLabels.BackColor = Color.DarkBlue; errorLabels.ToolTipText = ""; Application.DoEvents(); executer = new RefScriptExecute(script, this.execObject); // set me as watcher if (inspectRunToolStripMenuItem.Checked) { executer.setWatcher(this, "watcher"); script.registerDebugWatcher(this, "varChange"); } isRunning = true; runButton.Enabled = false; Boolean succeed = executer.run(); runningCheck.Enabled = true; if (!inspectRunToolStripMenuItem.Checked) { errorLabels.Text = "Execution is done "; errorLabels.ForeColor = Color.DarkGreen; errorLabels.BackColor = Color.LightGreen; errorLabels.ToolTipText = ""; isRunning = false; runButton.Enabled = true; continueBtn.Enabled = false; } } else { string errorMessages = script.getErrors(); errorLabels.Text = script.getNotRuntimeErrorCount() + "parsing errors: " + script.getErrors(); errorLabels.ForeColor = Color.Red; errorLabels.BackColor = Color.LightGoldenrodYellow; errorLabels.ToolTipText = script.getErrors(); } }
private void intIterate(ListViewItem lItem) { if (this.onSelectScript != null) { int number = 0; foreach (ListViewItem.ListViewSubItem lwItem in lItem.SubItems) { string headName = this.listView.Columns[number].Text; string[] solits = headName.Split(' '); string varName = solits[0]; this.onSelectScript.createOrUpdateStringVar("&" + varName, lwItem.Text); number++; this.onSelectScript.createOrUpdateStringVar("&ROW." + number, lwItem.Text); } RefScriptExecute executer = new RefScriptExecute(this.onSelectScript, this); executer.run(); } }
public void Message(string name, string message) { if (this.OnMessageScript != null) { this.OnMessageScript.createOrUpdateStringVar("&" + name, message); RefScriptExecute executer = new RefScriptExecute(this.OnMessageScript, this); executer.run(); } foreach (Control element in this.Controls) { if (element is PrConsole) { PrConsole console = (PrConsole)element; console.addMessage(message); } } }
private void httpWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { NetHtAccess webCall = (NetHtAccess)e.UserState; string error = webCall.getLastError(); if (error != "") { MessageBox.Show(error, "Error On Webrequest", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { if (this.OnWebResultScript != null) { if (this.webRequestName != "") { this.OnWebResultScript.createOrUpdateStringVar("&" + this.webRequestName, webCall.getContent()); } RefScriptExecute exec = new RefScriptExecute(this.OnWebResultScript, this); exec.run(); } } this.Enabled = true; }
private void listView_SelectedIndexChanged(object sender, EventArgs e) { if (this.onSelectScript != null) { if (this.listView.SelectedItems.Count > 0) { int number = 0; foreach (ListViewItem.ListViewSubItem lwItem in this.listView.SelectedItems[0].SubItems) { if (number < this.listView.Columns.Count) { string headName = this.listView.Columns[number].Text; string[] solits = headName.Split(' '); string varName = solits[0]; this.onSelectScript.createOrUpdateStringVar("&" + varName, lwItem.Text); number++; this.onSelectScript.createOrUpdateStringVar("&ROW." + number, lwItem.Text); } } RefScriptExecute executer = new RefScriptExecute(this.onSelectScript, this); executer.run(); } } }
public void invoke(ReflectionScript invokeScript) { RefScriptExecute executer = new RefScriptExecute(invokeScript, this); executer.run(); }