private void StatusChanged(object sender, LinkableComponentStatusChangeEventArgs e) { formerStatus = e.OldStatus; currentStatus = e.NewStatus; }
public override string StatusChangeEventMessage(LinkableComponentStatus oldStatus, LinkableComponentStatus newStatus) { if (newStatus == LinkableComponentStatus.Updated || newStatus == LinkableComponentStatus.Updating || newStatus == LinkableComponentStatus.WaitingForData) { // This accesses engine so newStatus has to appropriate for the engine to still be available string engineTime = new Time(((IEngineTime)Engine).GetCurrentTime()).ToString(); return string.Format("{0} at engine time {1}", base.StatusChangeEventMessage(oldStatus, newStatus), engineTime); } else return base.StatusChangeEventMessage(oldStatus, newStatus); }