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