public void SetLog(IRobotLog log) { if (this.log != null) { this.log.NewEntry -= log_NewEntry; this.log.EntriesCleared -= Log_EntriesCleared; } Clear(); this.log = log; foreach (var entry in log.Entries) { AddEntry(new RobotLogEntryViewModel(entry)); } log.NewEntry += log_NewEntry; log.EntriesCleared += Log_EntriesCleared; }
public RobotState(IProgramExecutionService programExecutionService, IRobot robot, IRobotLog robotLog) { this.programExecutionService = programExecutionService; this.Robot = robot; this.RobotLog = robotLog; this.Id = uniqueId.Id; this.Name = $"Robot {Id}"; }