private void CMDsend_Click(object sender, RoutedEventArgs e) { string command; command = CMDbar.Text; //cmd.p.StandardInput.WriteLine(command); CMDbar.Clear(); }
private void CMDbar_KeyDown(object sender, KeyEventArgs e) { string command; if (e.Key == Key.Return) { command = CMDbar.Text; //cmd.p.StandardInput.WriteLine(command); CMDbar.Clear(); } }
private void CMDsend_Click(object sender, RoutedEventArgs e) { if (cmd.client.Connected) { command = CMDbar.Text; CMDbar.Clear(); cmd.send_data = Encoding.Unicode.GetBytes(command); cmd.client.Send(cmd.send_data); } else { CMD_text.AppendText("client not connected"); } }
private void CMDbar_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Return) { if (cmd.client.Connected) { command = CMDbar.Text; CMDbar.Clear(); cmd.send_data = Encoding.Unicode.GetBytes(command); cmd.client.Send(cmd.send_data); } else { CMD_text.AppendText("client not connected"); } } }