예제 #1
0
        public void Run(object instance)
        {
            BfgMinerRunner runner = instance as BfgMinerRunner;

            if (runner == null)
            {
                return;
            }

            Process p = null;

            try
            {
                p                                  = new Process();
                p.StartInfo                        = new ProcessStartInfo();
                p.StartInfo.FileName               = runner.FileName;
                p.StartInfo.Arguments              = runner.Arguments;
                p.StartInfo.WindowStyle            = ProcessWindowStyle.Hidden;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.UseShellExecute        = false;
                p.StartInfo.CreateNoWindow         = true;//让窗体不显示
                p.Start();
                //p.WaitForExit();
            }
            catch (Exception ex)
            {
                LOG.Error(ex);
            }
        }
예제 #2
0
        public void RunApplication(string fileName, MinerInfo config)
        {
            BfgMinerRunner runner = new BfgMinerRunner(fileName, config.GetCommandLine2());

            ThreadPool.QueueUserWorkItem(new WaitCallback(runner.Run), this);
        }
예제 #3
0
 public void RunApplication(string fileName, MinerInfo config)
 {
     BfgMinerRunner runner = new BfgMinerRunner(fileName, config.GetCommandLine2());
     ThreadPool.QueueUserWorkItem(new WaitCallback(runner.Run), this);
 }