Here is my code:
I want to create a windows form application like Xshell but I don't know how to bring command line to form in windows form. So I create a fake command line and write command and result to black textbox.
Thank you for helping me :)
var command = txtCommand.Text;
try
{
writer.AutoFlush = true;
var text = reader.ReadToEnd();
writer.WriteLine(command);
while (stream.Length == 0)
{
Thread.Sleep(500);
}
text = reader.ReadToEnd();
txtResult.AppendText(text);
txtCommand.Text = "";
txtCommand.Focus();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
And this is my application:I want to create a windows form application like Xshell but I don't know how to bring command line to form in windows form. So I create a fake command line and write command and result to black textbox.
Thank you for helping me :)