public void WaitForInstall(Process proc) { this.Status = SrcdsStatus.Installing; WaitForExit oWait = new WaitForExit(proc, this, 2); Thread wThread = new Thread(new ThreadStart(oWait.Waiting)); wThread.Start(); }
public void WaitForUpdate(Process proc) { this.Status = SrcdsStatus.Updating; WaitForExit oWait = new WaitForExit(proc, this, 1); Thread wThread = new Thread(new ThreadStart(oWait.Waiting)); wThread.Start(); }
public void Start() { startInfo.Arguments = String.Format("-game {0} -console -ip {1} -port {2} -maxplayers_override {3}", game, ipAddr, port, maxplayers) + " " + commandLine; char[] temp = AffinityMask.ToCharArray(); Array.Reverse(temp); try { proc.Start(); proc.ProcessorAffinity = new IntPtr(Convert.ToInt32(new String(temp), 2)); } catch (Exception ex) { if (ex.GetType() == typeof(System.ComponentModel.Win32Exception)) { caller.ErrorBox(1); return; } else { throw; } } pinger.StartChecking(); WaitForExit oWait = new WaitForExit(proc, this, 0); oThread = new Thread(new ThreadStart(oWait.Waiting)); oThread.Start(); running = true; this.Status = SrcdsStatus.Online; cleanExit = false; startTime = DateTime.Now; }