public override string ToString() { var sb = new StringBuilder(); if (Crane.LocationId == 0) { sb.AppendLine(Crane.ToString()); } sb.AppendLine(Production.ToString()); foreach (var b in Buffers.OrderBy(x => x.Id)) { if (Crane.LocationId == b.Id) { sb.AppendLine(Crane.ToString()); } sb.AppendLine(b.ToString()); } if (Crane.LocationId == Handover.Id) { sb.AppendLine(Crane.ToString()); } sb.AppendLine(Handover.ToString()); sb.AppendLine(KPIs.ToString()); return(sb.ToString()); }
public override string ToString() { var sb = new StringBuilder(); bool a = false, b = false; sb.AppendLine(Now.ToString()); foreach (var loc in Locations.OrderBy(x => x.GirderPosition)) { if (ShuffleCrane.GirderPosition <= loc.GirderPosition && !a) { sb.AppendLine(ShuffleCrane.ToString()); a = true; } if (HandoverCrane.GirderPosition <= loc.GirderPosition && !b) { sb.AppendLine(HandoverCrane.ToString()); b = true; } sb.AppendLine(loc.ToString()); } if (!a) { sb.AppendLine(ShuffleCrane.ToString()); } if (!b) { sb.AppendLine(HandoverCrane.ToString()); } sb.AppendLine(KPIs.ToString()); return(sb.ToString()); }