3 Replies - 701 Views - Last Post: 10 February 2013 - 02:10 PM Rate Topic: -----

#1 nstrydom  Icon User is offline

  • New D.I.C Head

Reputation: 11
  • View blog
  • Posts: 39
  • Joined: 26-April 12

C# shell app

Posted 09 February 2013 - 10:59 PM

I'm in the process of engineering an interactive windows app gui that has 3 textboxes that have use shell input and output, I was going to stream the text and have each one running a thread, but it seems messy, but then I had another idea of using a .dat file to temparily hold output and a thread would be used to constantly resfresh text in the box, that would be even messier and slower but I feel it would be easier. if any of this makes sense, any advice on which one I should choose.

Is This A Good Question/Topic? 0
  • +

Replies To: C# shell app

#2 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3662
  • View blog
  • Posts: 11,463
  • Joined: 05-May 12

Re: C# shell app

Posted 10 February 2013 - 09:35 AM

Are you using WinForms or WPF? With WinForms, your can't have your text boxes running in different threads. They all have to be running on the UI thread.

Now, as for the operations that are run as a result of input into the textboxes, those can run is separate threads. Why do you think it would be messy? If you just pipe the output from the commands into a stream, you don't need to have a separate .dat file. You would just keep reading from the pipe and display them.
Was This Post Helpful? 1
  • +
  • -

#3 nstrydom  Icon User is offline

  • New D.I.C Head

Reputation: 11
  • View blog
  • Posts: 39
  • Joined: 26-April 12

Re: C# shell app

Posted 10 February 2013 - 10:42 AM

Because if I'm running commands from the textbox to cmd.exe, wouldn't I need 3 instances of cmd?
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is offline

  • Code herder
  • member icon

Reputation: 3662
  • View blog
  • Posts: 11,463
  • Joined: 05-May 12

Re: C# shell app

Posted 10 February 2013 - 02:10 PM

Why are you running cmd.exe? If you are writing a shell application, write a shell application. If all want is to have multiple CMD windows, it's not worth the bother. Just open multiple CMD windows, or buy Take Command from JP Soft.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1