private void richTextBox1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { int index = richTextBox1.SelectionStart; int line = richTextBox1.GetLineFromCharIndex(index); string text = richTextBox1.Lines[line]; int firstChar = richTextBox1.GetFirstCharIndexFromLine(line); // delegate if (!Javapad.InterProcDelegate().HasExited) { Javapad.InterProcDelegate().StandardInput.WriteLine(text); } } }
private void Javapad_Load(object sender, EventArgs e) { form = this; location = this.Location; doc = new Document(); encode.Add(COLOR1, keywordset1); encode.Add(COLOR2, keywordset2); encode.Add(COLOR6, keywordset3); encode.Add(COLOR7, keywordset4); encode.Add(COLOR5, keywordset5); encode.Add(COLOR4, keywordset6); lineBox.Font = editorBox.Font; editorBox.Select(); AddLineNumbers(); ShowPanel(consoleView, lblConsole); posLabel.Text = "Ln " + currentLine + ", Col " + currentCol + ", Pos " + currentPos; // Detect JDK [also runs the registry functions] searchJDKWorker.RunWorkerAsync(); if (!String.IsNullOrEmpty(RegistryManager.JDKPath)) { jdk_path = RegistryManager.JDKPath; } }
private void newWindow() { Javapad j = new Javapad(); j.Show(); }