Example #1
0
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);
            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            return ps;
        }
            public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
            {
                PlanetSystem ps = new PlanetSystem(this, orbitRadius, orbitPosition);

                ps.Movement = new CircularMovementStrategy(period, orbitRadius);
                ps.Animate(orbitPosition);

                planetSystems.Add(ps);

                return(ps);
            }
        public PlanetSystemViewer(PlanetSystem planetSystem, OpenView openViewDelegate)
        {
            this.openViewDelegate = openViewDelegate;

            this.planetSystem = planetSystem;
            this.planetSystem.Moved += new MovedEventHandler(planetSystem_Moved);

            InitializeComponent();

            planetSystem_Moved(planetSystem);
        }
Example #4
0
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);
            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            OnChanged(); // Вызываем обработку события изменения

            return ps;
        }
        public PlanetSystem CreatePlanetSystem(double period, double orbitRadius, double orbitPosition)
        {
            PlanetSystem ps = new PlanetSystem(this);

            ps.Movement = new CircularMovementStrategy(period, orbitRadius);
            ps.Animate(orbitPosition);

            planetSystems.Add(ps);

            OnChanged(); // Вызываем обработку события изменения

            return(ps);
        }
Example #6
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color        = Color.Blue;
     this.Radius       = 5;
 }
Example #7
0
 public Satellite(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color = Color.Gray;
     this.Radius = 2;
 }
 public Satellite(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color        = Color.Gray;
     this.Radius       = 2;
 }
Example #9
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
     this.Color = Color.Blue;
     this.Radius = 5;
 }
Example #10
0
 public Planet(PlanetSystem planetSystem)
 {
     this.planetSystem = planetSystem;
 }