protected void UpdateListPlanetsVisibility(tPlanetsGroup pg, List <PlanetsVisibility> lpv) { tPlanetType ptstart = tPlanetType.PT_EARTH; tPlanetType ptend = tPlanetType.PT_EARTH; switch (pg) { case tPlanetsGroup.PG_MAIN: ptstart = tPlanetType.PT_SUN; ptend = tPlanetType.PT_PLUTO; break; case tPlanetsGroup.PG_FICTITIOUS: ptstart = tPlanetType.PT_TRUE_NODE; ptend = tPlanetType.PT_MEAN_APOG; break; case tPlanetsGroup.PG_SMALL: ptstart = tPlanetType.PT_CHIRON; ptend = tPlanetType.PT_VESTA; break; } ; for (int index = (int)ptstart; index <= (int)ptend; ++index) { lpv.Add(new PlanetsVisibility() { IsVisible = pg == tPlanetsGroup.PG_MAIN? true:false, PlanetsType = (tPlanetType)index }); } }
public void SetPanelData(PlanetsVisibilityPanelView pv, tPlanetsGroup pg) { var collection = GroupMapPlanetsVisibilityCollectionLst.Where(x => x.PlanetGroup == pg).FirstOrDefault(); pv.SetData(collection.MapPlanetsVisibilityCollection); pv.InitPanel(pg); }
protected void CreatePainter(tPlanetsGroup pg) { _pg = pg; switch (pg) { case tPlanetsGroup.PG_MAIN: _painter = new MainPlanetsVisibilityPanelPainter(); break; case tPlanetsGroup.PG_FICTITIOUS: _painter = new FictitiousPlanetsVisibilityPanelPainter(); break; case tPlanetsGroup.PG_SMALL: _painter = new SmallPlanetsVisibilityPanelPainter(); break; default: _painter = new MainPlanetsVisibilityPanelPainter(); break; } ; _painter.MapPlanetsVisibilityCollection = MapPlanetsVisibilityCollection; }
protected void UpdateVisibility(tPlanetsGroup pg, tAstroMapType mt, tPlanetType pt) { GroupMapPlanetsVisibilityCollection gmpvc = GroupMapPlanetsVisibilityCollectionLst.Where(x => x.PlanetGroup == pg).First(); MapPlanetsVisibilityCollectionProcessor proc = new MapPlanetsVisibilityCollectionProcessor(); proc.Data = gmpvc.MapPlanetsVisibilityCollection; proc.ToggleValue(mt, pt); }
protected GroupMapPlanetsVisibilityCollection GetCollection(tPlanetsGroup pg) { GroupMapPlanetsVisibilityCollection gmpvc = GroupMapPlanetsVisibilityCollectionLst.Where(x => x.PlanetGroup == pg).First(); return(gmpvc); }
public void InitPanel(tPlanetsGroup pg) { CreatePainter(pg); }