Exemplo n.º 1
0
        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
                });
            }
        }
Exemplo n.º 2
0
        public void SetPanelData(PlanetsVisibilityPanelView pv, tPlanetsGroup pg)
        {
            var collection = GroupMapPlanetsVisibilityCollectionLst.Where(x => x.PlanetGroup == pg).FirstOrDefault();

            pv.SetData(collection.MapPlanetsVisibilityCollection);
            pv.InitPanel(pg);
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        protected GroupMapPlanetsVisibilityCollection GetCollection(tPlanetsGroup pg)
        {
            GroupMapPlanetsVisibilityCollection gmpvc = GroupMapPlanetsVisibilityCollectionLst.Where(x => x.PlanetGroup == pg).First();

            return(gmpvc);
        }
Exemplo n.º 6
0
 public void InitPanel(tPlanetsGroup pg)
 {
     CreatePainter(pg);
 }