Ejemplo n.º 1
0
        private void shellControl1_CommandEntered(object sender, CommandEnteredEventArgs e)
        {
            if (!ProcessInternalCommand(e.Command))
            {
                if (rbDos.Checked)
                {
                    string s = DOSPrompt.CMDAutomate(e.Command);
                    shellControl1.WriteText(s);
                    txtLastOutput.Text = s;
                }

                if (rbASCII.Checked)
                {
                    byte[] r = Common.SendBytes(txtIP.Text, txtPort.Text, ASCIIEncoding.ASCII.GetBytes(e.Command));
                    shellControl1.WriteText(ASCIIEncoding.ASCII.GetString(r));
                }

                if (rbHEX.Checked)
                {
                    byte[] r = Common.SendBytes(txtIP.Text, txtPort.Text, Common.GetBytesFromHex(e.Command));
                    shellControl1.WriteText(ASCIIEncoding.ASCII.GetString(r));
                }
            }
        }
Ejemplo n.º 2
0
 private void shellControl1_CommandEntered(object sender, CommandEnteredEventArgs e)
 {
 }