Esempio n. 1
0
        private async void Loop()
        {
            SolutionPushModel spush;

            while (_queue.TryTake(out spush, 500))
            {
                try
                {
                    var ps = new JudgeProcess(spush);
                    await ps.ExecuteAsync();
                }
                catch (Exception e)
                {
                    _log.FatalExt(() => e.Message);
                    throw;
                }
            }
            _task = null;
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            int uid, pid, std_test_num;

            try
            {
                uid          = int.Parse(args[0]);
                pid          = int.Parse(args[1]);
                std_test_num = int.Parse(args[2]);
            }
            catch
            {
                Console.WriteLine("Invalid Parameter.");
                return;
            }
            JudgeProcess judge = new JudgeProcess(uid, pid, std_test_num);

            judge.shell = "sh";
            judge.DoJudge();
        }
Esempio n. 3
0
 public MainWindow()
 {
     InitializeComponent();
     choseList.SelectedIndex = 0;
     jp = new JudgeProcess(ConfigurationService.GetRoot());
 }