Ejemplo n.º 1
0
 private void InitUi()
 {
     jobComboBox.DisplayMember = "Name";
     addButton.Click          += (sender, args) =>
     {
         var job = new SimpleJob()
         {
             Name = $"Job{instanceIndex++}",
             //State = "Stopped",
         };
         jobComboBox.Items.Add(job);
         jobComboBox.SelectedItem = job;
     };
 }
 private void InitUi()
 {
     jobComboBox.DisplayMember = "Name";
     addButton.Click          += (sender, args) =>
     {
         var initState = instanceIndex % 2 > 0 ? JobState.Running : JobState.Stopped;
         var job       = new SimpleJob()
         {
             Name  = $"Job{instanceIndex++}",
             State = initState
                     //State = "Stopped",
         };
         jobComboBox.Items.Add(job);
         Log("Created New Job : {0}", job);
         jobComboBox.SelectedItem = job;
     };
 }
Ejemplo n.º 3
0
 public void Stop(SimpleJob job)
 {
     _job = job;
     _machine.Fire(Trigger.Stop);
 }