Example #1
0
 private void Reset(JobTemplate template)
 {
     this.Status   = JobStatus.Ready;
     this.TimeLeft = template.TimeLeft;
     this.Potency  = template.Potency;
     this.Template = template;
 }
Example #2
0
        public void SaveTemplate(JobTemplate newTemplate)
        {
            var oldVersion = this._templateList.FirstOrDefault(t => t.Id.Equals(newTemplate.Id));

            if (oldVersion == null)
            {
                this._templateList.Add(newTemplate);
            }
            else
            {
                oldVersion = newTemplate;
            }
        }
Example #3
0
        public Job(DigitalMicroWave microWave)
        {
            JobTemplate template = new JobTemplate(microWave.TimeLeft, microWave.Potency);

            Reset(template);
        }
Example #4
0
 public Job(JobTemplate template)
 {
     Reset(template);
 }
Example #5
0
 public void SetJobTemplate(JobTemplate template)
 {
     this.CurrentJob = new Job(template);
     this.Status     = MicroWaveStatus.Ready;
 }
Example #6
0
 public void DeleteTemplate(JobTemplate template)
 {
     this._templateList.Remove(template);
 }