Пример #1
0
        private void CMDsend_Click(object sender, RoutedEventArgs e)
        {
            string command;

            command = CMDbar.Text;
            //cmd.p.StandardInput.WriteLine(command);
            CMDbar.Clear();
        }
Пример #2
0
        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();
            }
        }
Пример #3
0
 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");
     }
 }
Пример #4
0
 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");
         }
     }
 }