Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public User(Client c, string clientId, ulong id)
 {
     Id     = new ChatItemId(clientId, id);
     Client = c;
 }