private void InitializeRouteThreads() { int n = Ctx.Project.BlockRoutes.Count; if (n == 0) { return; } var blockRoutes = Ctx.Project.BlockRoutes; if (blockRoutes == null || blockRoutes.Count == 0) { return; } foreach (var route in blockRoutes) { if (route == null) { continue; } var childThread = AutoplayRouteThread.Start(Ctx, this, route); _blockRouteThreads.Add(childThread); } }
public static AutoplayRouteThread Start(RailwayEssentialModel model, Autoplay autoplayer, Analyze.Route route) { var c = new AutoplayRouteThread { Model = model, Autoplayer = autoplayer, Route = route }; c.Initialize(); return(c); }