/// <summary> /// Send command /// </summary> private void button5_Click(object sender, EventArgs e) { string command = textBox3.Text; textBox3.Text = ""; textBox3.Focus(); if (command.Length > 0) { CommPort com = CommPort.Instance; com.Send(command); if (Settings.Option.LocalEcho) { outputList_Add(command + "\n", sentColor); } } }
private void button6_Click_1(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); dialog.RestoreDirectory = false; dialog.Title = "Select a file"; if (dialog.ShowDialog() == DialogResult.OK) { String text = System.IO.File.ReadAllText(dialog.FileName); CommPort com = CommPort.Instance; com.Send(text); if (Settings.Option.LocalEcho) { outputList_Add("SendFile " + dialog.FileName + "," + text.Length.ToString() + " byte(s)\n", sentColor); } } }
private void button5_Click(object sender, EventArgs e) { string command = comboboxSend.Text; comboboxSend.Items.Add(comboboxSend.Text); comboboxSend.Text = ""; comboboxSend.Focus(); if (command.Length > 0) { command = ConvertEscapeSequences(command); CommPort com = CommPort.Instance; com.Send(command); if (Settings.Option.LocalEcho) { outputList_Add(command + "\n", sentColor); } } }