private void replMonitorToolStripMenuItem_Click(object sender, EventArgs e) { Enabled = false; using (ReplForm form = new ReplForm(Device.Execute)) form.ShowDialog(); Enabled = true; }
private void runToolStripMenuItem_Click(object sender, EventArgs e) { lock (ThreadLock) { // create repl window and run script file in it // also display the script output in the repl window string scriptFile = SelectedFilePath.Replace("\\", "/").Trim(); try { using (ReplForm replWindow = new ReplForm(Device.Execute)) { replWindow.RunCommand($"exec( open( '{scriptFile}' ).read() )"); replWindow.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, $"Error running '{scriptFile}'"); } } }