Exemple #1
0
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string     sItem = listBox1.SelectedItem.ToString();
            IJobModule th    = moduleList.SingleOrDefault(s => s.Key.Id == Convert.ToInt32(sItem.Split('-')[0])).Value;

            label1.Text = th.IsRepeatable.ToString();
        }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            string sItem = listBox1.SelectedItem.ToString();

            IJobModule th = moduleList.SingleOrDefault(s => s.Key.Id == Convert.ToInt32(sItem.Split('-')[0])).Value;

            th.JobResume();

            label1.Text = "True";
        }
 public void Start()
 {
     // Take advantage of the Task Parallel Library to spread work out accross logical cores
     Parallel.ForEach(_modules, module =>
     {
         IJobModule closureSafeModule = module;
         var task = Task.Run(async() =>
         {
             var parameters = new Parameter[] { new NamedParameter("directory", closureSafeModule.ModuleName) };
             await closureSafeModule.BeginJobModule(DependenciesController.Instance.Container.Resolve <IStorageClient>(parameters));
             closureSafeModule.Dispose();
         });
         task.Wait();
     });
 }