Various refactorings to support ItemFilterPreview

This commit is contained in:
Ben Wallis
2016-01-31 10:51:53 +00:00
parent d159f0b262
commit 86dc03f4ff
49 changed files with 623 additions and 212 deletions

View File

@@ -0,0 +1,39 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.Extensions
{
public static class ItemRarityExtensions
{
public static Color DefaultRarityTextColor(this ItemRarity itemRarity)
{
switch (itemRarity)
{
case ItemRarity.Magic:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.MagicItem];
}
case ItemRarity.Normal:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
}
case ItemRarity.Rare:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.RareItem];
}
case ItemRarity.Unique:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.UniqueItem];
}
case ItemRarity.NotSet:
{
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.QuestItem];
}
default:
throw new ArgumentOutOfRangeException(nameof(itemRarity), itemRarity, null);
}
}
}
}