Ejemplo n.º 1
0
 private void CityOnPropertyChanged(ICity city, PropertyChangedEventArgs ev)
 {
     if (ev.PropertyName == city.GetProperty(c => c.Radius))
     {
         RadiusUpdateEvent(city);
     }
     else if (ev.PropertyName == city.GetProperty(c => c.Battle))
     {
         if (city.Battle == null)
         {
             BattleEnded(city);
         }
         else
         {
             BattleStarted(city);
         }
     }
     else if (ev.PropertyName == city.GetProperty(c => c.HideNewUnits))
     {
         HideNewUnitsUpdate(city);
     }
     else if (ev.PropertyName == city.GetProperty(c => c.AttackPoint) ||
              ev.PropertyName == city.GetProperty(c => c.DefensePoint) ||
              ev.PropertyName == city.GetProperty(c => c.AlignmentPoint) ||
              ev.PropertyName == city.GetProperty(c => c.Value))
     {
         PointUpdate(city);
     }
     else if (ev.PropertyName == city.GetProperty(c => c.DefaultTheme))
     {
         DefaultThemeUpdate(city);
     }
     else if (ev.PropertyName == city.GetProperty(c => c.TroopTheme))
     {
         TroopThemeUpdate(city);
     }
 }