Ejemplo n.º 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();
        }
Ejemplo n.º 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";
        }
Ejemplo n.º 3
0
 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();
     });
 }