private void Reset(JobTemplate template) { this.Status = JobStatus.Ready; this.TimeLeft = template.TimeLeft; this.Potency = template.Potency; this.Template = template; }
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; } }
public Job(DigitalMicroWave microWave) { JobTemplate template = new JobTemplate(microWave.TimeLeft, microWave.Potency); Reset(template); }
public Job(JobTemplate template) { Reset(template); }
public void SetJobTemplate(JobTemplate template) { this.CurrentJob = new Job(template); this.Status = MicroWaveStatus.Ready; }
public void DeleteTemplate(JobTemplate template) { this._templateList.Remove(template); }