Ejemplo n.º 1
0
 private void CommandText_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         if (CommandText.Text.IndexOf("tail") > -1)
         {
             this.Text = IP.Text + " - LogAnalysis - [" + CommandText.Text + "]";
         }
         else
         {
             //this.Text = IP.Text + " - LogAnalysis ";
         }
         byte[] sb = System.Text.Encoding.Default.GetBytes(CommandText.Text + " \n");
         reader._pf.Transmit(sb);
         addComboBoxList((ComboBox)sender, CommandText.Text);
         CommandText.SelectAll();
     }
     if (e.KeyChar.Equals(Convert.ToChar(Keys.Cancel)))
     {
         this.Text = IP.Text + " - LogAnalysis ";
         reader._pf.Transmit(new byte[] { Convert.ToByte(Keys.Cancel) });
     }
 }