Beispiel #1
0
 public PowerStanding(int id, string name, int position, StandingChange change, bool turmoil, string allegiance, string shortname, DateTime updated)
 {
     Id          = id;
     Name        = name;
     Position    = position;
     Change      = change;
     Turmoil     = turmoil;
     Allegiance  = allegiance;
     ShortName   = shortname;
     LastUpdated = updated;
 }
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(String.Empty);
            }
            StandingChange change = (StandingChange)value;

            switch (change)
            {
            case StandingChange.up:
                return(FA5FreeSolid.CaretUp);

            case StandingChange.down:
                return(FA5FreeSolid.CaretDown);

            default:
                return(String.Empty);
            }
        }
Beispiel #3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value == null)
            {
                return(Color.Transparent);
            }
            StandingChange change = (StandingChange)value;

            switch (change)
            {
            case StandingChange.up:
                return(Color.LawnGreen);

            case StandingChange.down:
                return(Color.Red);

            default:
                return(Color.Transparent);
            }
        }