public string GetSeated() { if (Seated == DateTime.MaxValue) { return(string.Empty); } else { return(Seated.ToString()); } }
public void CarArrived(object sender, EventArgs e) { if (sender is Car taxi && !destinationPoint.IsEmpty) { if (inTaxi) { inTaxi = false; destinationPoint = PointLatLng.Empty; } else { inTaxi = true; Seated?.Invoke(this, null); taxi.moveTo(destinationPoint); } } //сесть в машину }