Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Using ShellStream and readline gives me double prompts

$
0
0
Here is my code:
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:

Image

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 :)

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>