public void ChangeGalaxy(int id, Galaxy newGalaxy)
 {
     OrbFaildArgumentException(_galaxies, id);
     _galaxies.Remove(id);
     _galaxies.Add(id, newGalaxy);
     NotifyPropertyChanged("Galaxies");
 }
Example #2
0
 public void DeleteStar(int id)
 {
     OrbFaildArgumentException(_stars, id);
     _stars.Remove(id);
     if (_stars.Count == 0)
     {
         _stars = null;
     }
     NotifyPropertyChanged("Stars");
 }
Example #3
0
 public void DeletePlanet(int id)
 {
     OrbFaildArgumentException(_planets, id, "Планета");
     _planets.Remove(id);
     if (_planets.Count == 0)
     {
         _planets = null;
     }
     NotifyPropertyChanged("Planets");
 }
Example #4
0
 public void DeleteSecondaryPlanet(int id)
 {
     OrbFaildArgumentException(_secondaryPlanets, id, "Планета-спутник");
     _secondaryPlanets.Remove(id);
     if (_secondaryPlanets.Count == 0)
     {
         _secondaryPlanets = null;
     }
     NotifyPropertyChanged("SecondaryPlanets");
 }