public HumanRouteMVVM(Route route) { Route = route; ShowCargoInformation = Route.Type == Route.RouteType.Cargo || Route.Type == Route.RouteType.Mixed; ShowPassengersInformation = Route.Type == Route.RouteType.Passenger || Route.Type == Route.RouteType.Mixed || Route.Type == Route.RouteType.Helicopter; IsEditable = true; // !this.Route.getAirliners().Exists(a => a.Status != FleetAirliner.AirlinerStatus.Stopped); Invoices = new List<MonthlyInvoice>(); foreach (Invoice.InvoiceType type in Route.GetRouteInvoiceTypes()) { Invoices.Add(new MonthlyInvoice(type, 1950, 1,1, Route.GetRouteInvoiceAmount(type))); } Legs = new List<Route>(); Legs.Add(Route); Legs.AddRange(Route.Stopovers.SelectMany(s => s.Legs)); Distance = MathHelpers.GetDistance(Route.Destination1, Route.Destination2); setFeedback(); }