diff --git a/Filtration.Common/Filtration.Common.csproj b/Filtration.Common/Filtration.Common.csproj index 115f66b..dd810f2 100644 --- a/Filtration.Common/Filtration.Common.csproj +++ b/Filtration.Common/Filtration.Common.csproj @@ -79,6 +79,7 @@ + diff --git a/Filtration/Utilities/LineReader.cs b/Filtration.Common/Utilities/LineReader.cs similarity index 98% rename from Filtration/Utilities/LineReader.cs rename to Filtration.Common/Utilities/LineReader.cs index cb68df3..94dea54 100644 --- a/Filtration/Utilities/LineReader.cs +++ b/Filtration.Common/Utilities/LineReader.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.IO; using System.Text; -namespace Filtration.Utilities +namespace Filtration.Common.Utilities { public sealed class LineReader : IEnumerable diff --git a/Filtration.ItemFilterPreview.Tests/Filtration.ItemFilterPreview.Tests.csproj b/Filtration.ItemFilterPreview.Tests/Filtration.ItemFilterPreview.Tests.csproj index 1887d0e..280602d 100644 --- a/Filtration.ItemFilterPreview.Tests/Filtration.ItemFilterPreview.Tests.csproj +++ b/Filtration.ItemFilterPreview.Tests/Filtration.ItemFilterPreview.Tests.csproj @@ -42,12 +42,12 @@ 4 - - ..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.dll + + ..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.dll True - - ..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.Core.dll + + ..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.Core.dll True @@ -61,6 +61,10 @@ + + ..\packages\YamlDotNet.3.7.0\lib\net35\YamlDotNet.dll + True + @@ -74,6 +78,7 @@ True Resources.resx + diff --git a/Filtration.ItemFilterPreview.Tests/Services/TestItemBlockItemMatcher.cs b/Filtration.ItemFilterPreview.Tests/Services/TestItemBlockItemMatcher.cs index 98c90fd..15c6929 100644 --- a/Filtration.ItemFilterPreview.Tests/Services/TestItemBlockItemMatcher.cs +++ b/Filtration.ItemFilterPreview.Tests/Services/TestItemBlockItemMatcher.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; using Filtration.ItemFilterPreview.Model; using Filtration.ItemFilterPreview.Services; using Filtration.ObjectModel; diff --git a/Filtration.ItemFilterPreview.Tests/Services/TestItemFilterProcessor.cs b/Filtration.ItemFilterPreview.Tests/Services/TestItemFilterProcessor.cs index 95d5f71..b6be80c 100644 --- a/Filtration.ItemFilterPreview.Tests/Services/TestItemFilterProcessor.cs +++ b/Filtration.ItemFilterPreview.Tests/Services/TestItemFilterProcessor.cs @@ -1,13 +1,10 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; -using System.Resources; -using System.Runtime.Versioning; using Filtration.ItemFilterPreview.Model; using Filtration.ItemFilterPreview.Services; using Filtration.ItemFilterPreview.Tests.Properties; using Filtration.ObjectModel; -using Filtration.ObjectModel.BlockItemBaseTypes; using Filtration.ObjectModel.BlockItemTypes; using Filtration.ObjectModel.Enums; using Filtration.Translators; @@ -45,11 +42,11 @@ namespace Filtration.ItemFilterPreview.Tests.Services //Assert _testUtility.MockBlockItemMatcher.Verify(); - Assert.AreEqual(testInputBlock, result[testInputItem]); + Assert.AreEqual(testInputBlock, result.First(r => r.ItemFilterBlock == testInputBlock).ItemFilterBlock); } [Test] - public void ProcessItemsAgainstItemFilterScript_DoesNotMatch_ReturnsFalse() + public void ProcessItemsAgainstItemFilterScript_DoesNotMatch_ResultHasNullItemFilterBlock() { //Arrange var testInputItem = Mock.Of(); @@ -66,7 +63,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services //Assert _testUtility.MockBlockItemMatcher.Verify(); - Assert.AreEqual(null, result[testInputItem]); + Assert.AreEqual(null, result.First(r => r.Item == testInputItem).ItemFilterBlock); } [Test] @@ -96,7 +93,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services var result = itemFilterProcessor.ProcessItemsAgainstItemFilterScript(script, new List { testInputItem }); //Assert - Assert.AreEqual("Wands", result.Values.First().BlockItems.OfType().First().Items.First()); + Assert.AreEqual("Wands", result.First().ItemFilterBlock.BlockItems.OfType().First().Items.First()); } [Test] @@ -228,7 +225,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services var result = itemFilterProcessor.ProcessItemsAgainstItemFilterScript(script, testInputItems); //Assert - Assert.AreEqual("Wands", result.Values.First().BlockItems.OfType().First().Items.First()); + Assert.AreEqual("Wands", result.First().ItemFilterBlock.BlockItems.OfType().First().Items.First()); } private class ItemFilterProcessorTestUtility diff --git a/Filtration.ItemFilterPreview.Tests/Services/serializationtest.cs b/Filtration.ItemFilterPreview.Tests/Services/serializationtest.cs new file mode 100644 index 0000000..35e87a7 --- /dev/null +++ b/Filtration.ItemFilterPreview.Tests/Services/serializationtest.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml; +using System.Xml.Serialization; +using Filtration.ItemFilterPreview.Model; +using Filtration.ObjectModel; +using Filtration.ObjectModel.Enums; +using NUnit.Framework; +using YamlDotNet.Serialization; + +namespace Filtration.ItemFilterPreview.Tests.Services +{ + class serializationtest + { + [Test] + public void test_serialization() + { + //Arrange + var item = new Item + { + ItemClass = "Test Class", + BaseType = "Test Base Type", + DropLevel = 54, + Height = 2, + Width = 2, + ItemLevel = 50, + ItemRarity = ItemRarity.Rare, + SocketGroups = new List {new SocketGroup(new List {new Socket(SocketColor.Red), new Socket(SocketColor.Blue), new Socket(SocketColor.White)}, true)}, + Quality = 12 + }; + + //Act + + var serializer = new XmlSerializer(item.GetType()); + var output = string.Empty; + using (var textWriter = new StringWriter()) + { + serializer.Serialize(textWriter, item); + output = textWriter.ToString(); + } + + var x = 2; + //Assert + } + } +} diff --git a/Filtration.ItemFilterPreview.Tests/app.config b/Filtration.ItemFilterPreview.Tests/app.config index 354702a..8362b90 100644 --- a/Filtration.ItemFilterPreview.Tests/app.config +++ b/Filtration.ItemFilterPreview.Tests/app.config @@ -4,7 +4,7 @@ - + diff --git a/Filtration.ItemFilterPreview.Tests/packages.config b/Filtration.ItemFilterPreview.Tests/packages.config index b43dde7..9adfa15 100644 --- a/Filtration.ItemFilterPreview.Tests/packages.config +++ b/Filtration.ItemFilterPreview.Tests/packages.config @@ -1,6 +1,7 @@  - + + \ No newline at end of file diff --git a/Filtration.ItemFilterPreview/App.xaml b/Filtration.ItemFilterPreview/App.xaml index cb2d0cd..aeb8145 100644 --- a/Filtration.ItemFilterPreview/App.xaml +++ b/Filtration.ItemFilterPreview/App.xaml @@ -1,8 +1,7 @@  + Startup="Application_Startup"> diff --git a/Filtration.ItemFilterPreview/App.xaml.cs b/Filtration.ItemFilterPreview/App.xaml.cs index 496477f..c1e7f86 100644 --- a/Filtration.ItemFilterPreview/App.xaml.cs +++ b/Filtration.ItemFilterPreview/App.xaml.cs @@ -1,8 +1,24 @@ using System.Windows; +using Castle.Facilities.TypedFactory; +using Castle.Windsor; +using Castle.Windsor.Installer; +using Filtration.ItemFilterPreview.Views; namespace Filtration.ItemFilterPreview { public partial class App : Application { + private IWindsorContainer _container; + + private void Application_Startup(object sender, StartupEventArgs e) + { + _container = new WindsorContainer(); + + _container.AddFacility(); + _container.Install(FromAssembly.InThisApplication()); + + var mainWindow = _container.Resolve(); + mainWindow.Show(); + } } } diff --git a/Filtration.ItemFilterPreview/Filtration.ItemFilterPreview.csproj b/Filtration.ItemFilterPreview/Filtration.ItemFilterPreview.csproj index 88a29c1..a7e83eb 100644 --- a/Filtration.ItemFilterPreview/Filtration.ItemFilterPreview.csproj +++ b/Filtration.ItemFilterPreview/Filtration.ItemFilterPreview.csproj @@ -37,15 +37,35 @@ - ..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll + ..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll True ..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll True + + ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.dll + True + + + ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll + True + + + ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll + True + + + ..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + True + + + ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\System.Windows.Interactivity.dll + True + @@ -64,15 +84,34 @@ MSBuild:Compile Designer + - + + + ItemControl.xaml + ItemSocketsControl.xaml + + + + LootExplosionView.xaml + + + - + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + MSBuild:Compile Designer @@ -80,7 +119,7 @@ App.xaml Code - + MainWindow.xaml Code @@ -113,11 +152,16 @@ Settings.Designer.cs + + + {8cb44f28-2956-4c2a-9314-72727262edd4} + Filtration.Common + {4aac3beb-1dc1-483e-9d11-0e9334e80227} Filtration.ObjectModel diff --git a/Filtration.ItemFilterPreview/MainWindow.xaml b/Filtration.ItemFilterPreview/MainWindow.xaml deleted file mode 100644 index febba74..0000000 --- a/Filtration.ItemFilterPreview/MainWindow.xaml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Filtration.ItemFilterPreview/Model/FilteredItem.cs b/Filtration.ItemFilterPreview/Model/FilteredItem.cs new file mode 100644 index 0000000..bb970fd --- /dev/null +++ b/Filtration.ItemFilterPreview/Model/FilteredItem.cs @@ -0,0 +1,45 @@ +using System.Windows.Media; +using Filtration.ObjectModel; +using Filtration.ObjectModel.BlockItemTypes; +using Filtration.ObjectModel.Enums; + +namespace Filtration.ItemFilterPreview.Model +{ + public interface IFilteredItem + { + IItem Item { get; } + IItemFilterBlock ItemFilterBlock { get; } + BlockAction BlockAction { get; } + Color BackgroundColor { get; } + Color BorderColor { get; } + Color TextColor { get; } + } + + public class FilteredItem : IFilteredItem + { + public FilteredItem(IItem item, IItemFilterBlock itemFilterBlock) + { + Item = item; + ItemFilterBlock = itemFilterBlock; + } + + public IItem Item { get; private set; } + public IItemFilterBlock ItemFilterBlock { get; private set; } + + public BlockAction BlockAction => ItemFilterBlock?.Action ?? BlockAction.Show; + public Color BackgroundColor => ItemFilterBlock.HasBlockItemOfType() ? ItemFilterBlock.DisplayBackgroundColor : new Color { A = 255, R = 0, G = 0, B = 0 }; + public Color BorderColor => ItemFilterBlock.HasBlockItemOfType() ? ItemFilterBlock.DisplayBorderColor : new Color { A = 255, R = 0, G = 0, B = 0 }; + public Color TextColor + { + get + { + if (ItemFilterBlock.HasBlockItemOfType()) + { + return ItemFilterBlock.DisplayTextColor; + } + + return Item.DefaultTextColor; + } + } + } +} diff --git a/Filtration.ItemFilterPreview/Model/Item.cs b/Filtration.ItemFilterPreview/Model/Item.cs index 8759a2e..1b5ee6b 100644 --- a/Filtration.ItemFilterPreview/Model/Item.cs +++ b/Filtration.ItemFilterPreview/Model/Item.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; +using System.Windows.Media; +using System.Xml.Serialization; using Filtration.ObjectModel; using Filtration.ObjectModel.Enums; +using Filtration.ObjectModel.Extensions; namespace Filtration.ItemFilterPreview.Model { @@ -21,8 +24,10 @@ namespace Filtration.ItemFilterPreview.Model int LinkedSockets { get; } IEnumerable LinkedSocketGroups { get; } List SocketGroups { get; set; } + Color DefaultTextColor { get; } } + [Serializable] public class Item : IItem { private List _socketGroups; @@ -35,9 +40,13 @@ namespace Filtration.ItemFilterPreview.Model public int Width { get; set; } public int Quality { get; set; } public ItemRarity ItemRarity { get; set; } + + [XmlIgnore] public int Sockets { get; private set; } + [XmlIgnore] public int LinkedSockets { get; private set; } + [XmlIgnore] public IEnumerable LinkedSocketGroups { get { return SocketGroups.Where(s => s.Linked); } @@ -76,5 +85,7 @@ namespace Filtration.ItemFilterPreview.Model } } + + public Color DefaultTextColor => ItemRarity.DefaultRarityTextColor(); } } diff --git a/Filtration.ItemFilterPreview/Model/ItemCollection.cs b/Filtration.ItemFilterPreview/Model/ItemCollection.cs deleted file mode 100644 index fae5a61..0000000 --- a/Filtration.ItemFilterPreview/Model/ItemCollection.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace Filtration.ItemFilterPreview.Model -{ - class FilteredItemDictionary : Dictionary - { - - } -} diff --git a/Filtration.ItemFilterPreview/Resources/Fontin-SmallCaps.ttf b/Filtration.ItemFilterPreview/Resources/Fontin-SmallCaps.ttf new file mode 100644 index 0000000..25efca5 Binary files /dev/null and b/Filtration.ItemFilterPreview/Resources/Fontin-SmallCaps.ttf differ diff --git a/Filtration.ItemFilterPreview/Services/ItemFilterProcessor.cs b/Filtration.ItemFilterPreview/Services/ItemFilterProcessor.cs index 5c77249..e8a59a9 100644 --- a/Filtration.ItemFilterPreview/Services/ItemFilterProcessor.cs +++ b/Filtration.ItemFilterPreview/Services/ItemFilterProcessor.cs @@ -8,7 +8,7 @@ namespace Filtration.ItemFilterPreview.Services { internal interface IItemFilterProcessor { - IReadOnlyDictionary ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable items); + List ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable items); } internal class ItemFilterProcessor : IItemFilterProcessor @@ -20,11 +20,11 @@ namespace Filtration.ItemFilterPreview.Services _blockItemMatcher = blockItemMatcher; } - public IReadOnlyDictionary ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable items) + public List ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable items) { var overallsw = Stopwatch.StartNew(); - - var matchedItemBlockPairs = new Dictionary(); + + var filteredItems = new List(); var sw = Stopwatch.StartNew(); foreach (var item in items) @@ -32,10 +32,10 @@ namespace Filtration.ItemFilterPreview.Services sw.Restart(); var matchedBlock = itemFilterScript.ItemFilterBlocks - .Where(b => !(b is ItemFilterSection)) - .FirstOrDefault(block => _blockItemMatcher.ItemBlockMatch(block, item)); + .Where(b => !(b is ItemFilterSection)) + .FirstOrDefault(block => _blockItemMatcher.ItemBlockMatch(block, item)); - matchedItemBlockPairs.Add(item, matchedBlock); + filteredItems.Add(new FilteredItem(item, matchedBlock)); Debug.WriteLine("Processed Item in {0}ms", sw.ElapsedMilliseconds); } @@ -43,7 +43,7 @@ namespace Filtration.ItemFilterPreview.Services overallsw.Stop(); Debug.WriteLine("Total processing time: {0}ms", overallsw.ElapsedMilliseconds); - return matchedItemBlockPairs; + return filteredItems; } } } diff --git a/Filtration.ItemFilterPreview/UserControls/DesignTime/DesignTimeItemControl.cs b/Filtration.ItemFilterPreview/UserControls/DesignTime/DesignTimeItemControl.cs new file mode 100644 index 0000000..a9808d3 --- /dev/null +++ b/Filtration.ItemFilterPreview/UserControls/DesignTime/DesignTimeItemControl.cs @@ -0,0 +1,12 @@ +using System.Windows.Media; + +namespace Filtration.ItemFilterPreview.UserControls.DesignTime +{ + public class DesignTimeItemControl + { + public Color BackgroundColor => Colors.Bisque; + public Color TextColor => Colors.Maroon; + public Color BorderColor => Colors.CornflowerBlue; + public int FontSize => 15; + } +} diff --git a/Filtration.ItemFilterPreview/UserControls/ItemControl.xaml b/Filtration.ItemFilterPreview/UserControls/ItemControl.xaml new file mode 100644 index 0000000..9725c36 --- /dev/null +++ b/Filtration.ItemFilterPreview/UserControls/ItemControl.xaml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Filtration.ItemFilterPreview/ViewModels/LootExplosionViewModel.cs b/Filtration.ItemFilterPreview/ViewModels/LootExplosionViewModel.cs new file mode 100644 index 0000000..0045e56 --- /dev/null +++ b/Filtration.ItemFilterPreview/ViewModels/LootExplosionViewModel.cs @@ -0,0 +1,10 @@ +namespace Filtration.ItemFilterPreview.ViewModels +{ + internal class LootExplosionViewModel + { + public LootExplosionViewModel() + { + + } + } +} diff --git a/Filtration.ItemFilterPreview/Views/LootExplosionView.xaml b/Filtration.ItemFilterPreview/Views/LootExplosionView.xaml new file mode 100644 index 0000000..63982ba --- /dev/null +++ b/Filtration.ItemFilterPreview/Views/LootExplosionView.xaml @@ -0,0 +1,13 @@ + + + + + + diff --git a/Filtration.ItemFilterPreview/MainWindow.xaml.cs b/Filtration.ItemFilterPreview/Views/LootExplosionView.xaml.cs similarity index 72% rename from Filtration.ItemFilterPreview/MainWindow.xaml.cs rename to Filtration.ItemFilterPreview/Views/LootExplosionView.xaml.cs index 5281ccc..ca4ea60 100644 --- a/Filtration.ItemFilterPreview/MainWindow.xaml.cs +++ b/Filtration.ItemFilterPreview/Views/LootExplosionView.xaml.cs @@ -13,14 +13,14 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Filtration.ItemFilterPreview +namespace Filtration.ItemFilterPreview.Views { /// - /// Interaction logic for MainWindow.xaml + /// Interaction logic for LootExplosionView.xaml /// - public partial class MainWindow : Window + public partial class LootExplosionView : UserControl { - public MainWindow() + public LootExplosionView() { InitializeComponent(); } diff --git a/Filtration.ItemFilterPreview/WindsorInstallers/ViewModelsInstaller.cs b/Filtration.ItemFilterPreview/WindsorInstallers/ViewModelsInstaller.cs new file mode 100644 index 0000000..2fdd4f9 --- /dev/null +++ b/Filtration.ItemFilterPreview/WindsorInstallers/ViewModelsInstaller.cs @@ -0,0 +1,18 @@ +using Castle.MicroKernel.Registration; +using Castle.MicroKernel.SubSystems.Configuration; +using Castle.Windsor; +using Filtration.ItemFilterPreview.ViewModels; + +namespace Filtration.ItemFilterPreview.WindsorInstallers +{ + public class ViewModelsInstaller : IWindsorInstaller + { + public void Install(IWindsorContainer container, IConfigurationStore store) + { + container.Register( + Component.For() + .ImplementedBy() + .LifeStyle.Singleton); + } + } +} diff --git a/Filtration.ItemFilterPreview/WindsorInstallers/ViewsInstaller.cs b/Filtration.ItemFilterPreview/WindsorInstallers/ViewsInstaller.cs new file mode 100644 index 0000000..f4cefbf --- /dev/null +++ b/Filtration.ItemFilterPreview/WindsorInstallers/ViewsInstaller.cs @@ -0,0 +1,18 @@ +using Castle.MicroKernel.Registration; +using Castle.MicroKernel.SubSystems.Configuration; +using Castle.Windsor; +using Filtration.ItemFilterPreview.Views; + +namespace Filtration.ItemFilterPreview.WindsorInstallers +{ + public class ViewsInstaller : IWindsorInstaller + { + public void Install(IWindsorContainer container, IConfigurationStore store) + { + container.Register( + Component.For() + .ImplementedBy() + .LifeStyle.Singleton); + } + } +} diff --git a/Filtration.ItemFilterPreview/packages.config b/Filtration.ItemFilterPreview/packages.config index 866ff2c..cb63c9f 100644 --- a/Filtration.ItemFilterPreview/packages.config +++ b/Filtration.ItemFilterPreview/packages.config @@ -1,5 +1,7 @@  - + + + \ No newline at end of file diff --git a/Filtration.ObjectModel/Enums/ItemRarity.cs b/Filtration.ObjectModel/Enums/ItemRarity.cs index 2e33b12..affa59e 100644 --- a/Filtration.ObjectModel/Enums/ItemRarity.cs +++ b/Filtration.ObjectModel/Enums/ItemRarity.cs @@ -4,6 +4,8 @@ namespace Filtration.ObjectModel.Enums { public enum ItemRarity { + [Description("Not Set")] + NotSet, [Description("Normal")] Normal, [Description("Magic")] diff --git a/Filtration.ObjectModel/Enums/PathOfExileNamedColor.cs b/Filtration.ObjectModel/Enums/PathOfExileNamedColor.cs new file mode 100644 index 0000000..882e53c --- /dev/null +++ b/Filtration.ObjectModel/Enums/PathOfExileNamedColor.cs @@ -0,0 +1,36 @@ +namespace Filtration.ObjectModel.Enums +{ + public enum PathOfExileNamedColor + { + Default, + ValueDefault, + Pink, + DodgerBlue, + Fire, + Cold, + Lightning, + Chaos, + Augmented, + Crafted, + Unmet, + UniqueItem, + RareItem, + MagicItem, + WhiteItem, + GemItem, + CurrencyItem, + QuestItem, + NemesisMod, + NemesisModOutline, + Title, + Corrupted, + Favour, + SupporterPackNewItem, + SupporterPackItem, + BloodlineMod, + BloodlineModOutline, + TormentMod, + TormentModOutline, + CantTradeorModify + } +} \ No newline at end of file diff --git a/Filtration.ObjectModel/Enums/SocketColor.cs b/Filtration.ObjectModel/Enums/SocketColor.cs index cb6cfa4..f0a1658 100644 --- a/Filtration.ObjectModel/Enums/SocketColor.cs +++ b/Filtration.ObjectModel/Enums/SocketColor.cs @@ -1,9 +1,12 @@ -using System.ComponentModel; +using System; +using System.ComponentModel; namespace Filtration.ObjectModel.Enums { + [Serializable] public enum SocketColor { + Yellow, [Description("R")] Red, [Description("G")] diff --git a/Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs b/Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs new file mode 100644 index 0000000..943a1e3 --- /dev/null +++ b/Filtration.ObjectModel/Extensions/ItemRarityExtensions.cs @@ -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); + } + } + } +} diff --git a/Filtration.ObjectModel/Filtration.ObjectModel.csproj b/Filtration.ObjectModel/Filtration.ObjectModel.csproj index 453d2fe..de6e67d 100644 --- a/Filtration.ObjectModel/Filtration.ObjectModel.csproj +++ b/Filtration.ObjectModel/Filtration.ObjectModel.csproj @@ -72,6 +72,7 @@ + @@ -79,6 +80,8 @@ + + diff --git a/Filtration.ObjectModel/ItemFilterBlock.cs b/Filtration.ObjectModel/ItemFilterBlock.cs index c34f6f1..82a7c77 100644 --- a/Filtration.ObjectModel/ItemFilterBlock.cs +++ b/Filtration.ObjectModel/ItemFilterBlock.cs @@ -1,8 +1,11 @@ using System; using System.Collections.ObjectModel; using System.Linq; +using System.Windows.Media; using Filtration.ObjectModel.BlockItemBaseTypes; +using Filtration.ObjectModel.BlockItemTypes; using Filtration.ObjectModel.Enums; +using Filtration.ObjectModel.Extensions; namespace Filtration.ObjectModel { @@ -13,6 +16,10 @@ namespace Filtration.ObjectModel ItemFilterBlockGroup BlockGroup { get; set; } BlockAction Action { get; set; } ObservableCollection BlockItems { get; } + Color DisplayBackgroundColor { get; } + Color DisplayTextColor { get; } + Color DisplayBorderColor { get; } + double DisplayFontSize { get; } int BlockCount(Type type); bool AddBlockItemAllowed(Type type); bool HasBlockItemOfType(); @@ -115,5 +122,49 @@ namespace Filtration.ObjectModel Action = BlockAction.Show; } } + + public Color DisplayTextColor + { + get + { + var textColorBlockItem = BlockItems.OfType().FirstOrDefault(); + if (textColorBlockItem != null) + { + return textColorBlockItem.Color; + } + + var rarityBlockItem = BlockItems.OfType().FirstOrDefault(); + return rarityBlockItem != null + ? ((ItemRarity) rarityBlockItem.FilterPredicate.PredicateOperand).DefaultRarityTextColor() + : PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem]; + } + } + + public Color DisplayBackgroundColor + { + get + { + var backgroundColorBlockItem = BlockItems.OfType().FirstOrDefault(); + return backgroundColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 }; + } + } + + public Color DisplayBorderColor + { + get + { + var borderColorBlockItem = BlockItems.OfType().FirstOrDefault(); + return borderColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 }; + } + } + + public double DisplayFontSize + { + get + { + var fontSizeBlockItem = BlockItems.OfType().FirstOrDefault(); + return fontSizeBlockItem?.Value ?? 34; + } + } } } diff --git a/Filtration.ObjectModel/PathOfExileNamedColors.cs b/Filtration.ObjectModel/PathOfExileNamedColors.cs new file mode 100644 index 0000000..aa19e16 --- /dev/null +++ b/Filtration.ObjectModel/PathOfExileNamedColors.cs @@ -0,0 +1,44 @@ +using System.Collections.Generic; +using System.Windows.Media; +using Filtration.ObjectModel.Enums; + +namespace Filtration.ObjectModel +{ + public static class PathOfExileNamedColors + { + public static Dictionary Colors => new Dictionary + { + {PathOfExileNamedColor.Default, new Color {A = 255, R = 127, G = 127, B = 127}}, + {PathOfExileNamedColor.ValueDefault, new Color {A = 255, R = 255, G = 255, B = 255}}, + {PathOfExileNamedColor.Pink, new Color {A = 255, R = 255, G = 192, B = 203}}, + {PathOfExileNamedColor.DodgerBlue, new Color {A = 255, R = 30, G = 144, B = 255}}, + {PathOfExileNamedColor.Fire, new Color {A = 255, R = 150, G = 0, B = 0}}, + {PathOfExileNamedColor.Cold, new Color {A = 255, R = 54, G = 100, B = 146}}, + {PathOfExileNamedColor.Lightning, new Color {A = 255, R = 255, G = 215, B = 0}}, + {PathOfExileNamedColor.Chaos, new Color {A = 255, R = 208, G = 32, B = 144}}, + {PathOfExileNamedColor.Augmented, new Color {A = 255, R = 136, G = 136, B = 255}}, + {PathOfExileNamedColor.Crafted, new Color {A = 255, R = 184, G = 218, B = 242}}, + {PathOfExileNamedColor.Unmet, new Color {A = 255, R = 210, G = 0, B = 0}}, + {PathOfExileNamedColor.UniqueItem, new Color {A = 255, R = 175, G = 96, B = 37}}, + {PathOfExileNamedColor.RareItem, new Color {A = 255, R = 255, G = 255, B = 119}}, + {PathOfExileNamedColor.MagicItem, new Color {A = 255, R = 136, G = 136, B = 255}}, + {PathOfExileNamedColor.WhiteItem, new Color {A = 255, R = 200, G = 200, B = 200}}, + {PathOfExileNamedColor.GemItem, new Color {A = 255, R = 27, G = 162, B = 155}}, + {PathOfExileNamedColor.CurrencyItem, new Color {A = 255, R = 170, G = 158, B = 130}}, + {PathOfExileNamedColor.QuestItem, new Color {A = 255, R = 74, G = 230, B = 58}}, + {PathOfExileNamedColor.NemesisMod, new Color {A = 255, R = 255, G = 200, B = 0}}, + {PathOfExileNamedColor.NemesisModOutline, new Color {A = 220, R = 255, G = 40, B = 0}}, + {PathOfExileNamedColor.Title, new Color {A = 255, R = 231, G = 180, B = 120}}, + {PathOfExileNamedColor.Corrupted, new Color {A = 255, R = 210, G = 0, B = 0}}, + {PathOfExileNamedColor.Favour, new Color {A = 255, R = 170, G = 158, B = 130}}, + {PathOfExileNamedColor.SupporterPackNewItem, new Color {A = 255, R = 180, G = 96, B = 0}}, + {PathOfExileNamedColor.SupporterPackItem, new Color {A = 255, R = 163, G = 141, B = 109}}, + {PathOfExileNamedColor.BloodlineMod, new Color {A = 255, R = 210, G = 0, B = 220}}, + {PathOfExileNamedColor.BloodlineModOutline, new Color {A = 200, R = 74, G = 0, B = 160}}, + {PathOfExileNamedColor.TormentMod, new Color {A = 255, R = 50, G = 230, B = 100}}, + {PathOfExileNamedColor.TormentModOutline, new Color {A = 200, R = 0, G = 100, B = 150}}, + {PathOfExileNamedColor.CantTradeorModify, new Color {A = 255, R = 210, G = 0, B = 0}}, + }; + + } +} diff --git a/Filtration.ObjectModel/Socket.cs b/Filtration.ObjectModel/Socket.cs index 7fa01c4..30679d7 100644 --- a/Filtration.ObjectModel/Socket.cs +++ b/Filtration.ObjectModel/Socket.cs @@ -1,9 +1,15 @@ -using Filtration.ObjectModel.Enums; +using System; +using Filtration.ObjectModel.Enums; namespace Filtration.ObjectModel { + [Serializable] public class Socket { + private Socket() + { + } + public Socket(SocketColor color) { Color = color; diff --git a/Filtration.ObjectModel/SocketGroup.cs b/Filtration.ObjectModel/SocketGroup.cs index 89e72ba..24af1ad 100644 --- a/Filtration.ObjectModel/SocketGroup.cs +++ b/Filtration.ObjectModel/SocketGroup.cs @@ -3,8 +3,14 @@ using System.Collections.Generic; namespace Filtration.ObjectModel { + [Serializable] public class SocketGroup : List { + private SocketGroup() + { + + } + public SocketGroup(List sockets, bool linked) { if (sockets.Count < 1 || sockets.Count > 6) diff --git a/Filtration.Tests/Filtration.Tests.csproj b/Filtration.Tests/Filtration.Tests.csproj index f71a49f..c8bea23 100644 --- a/Filtration.Tests/Filtration.Tests.csproj +++ b/Filtration.Tests/Filtration.Tests.csproj @@ -31,12 +31,12 @@ 4 - - ..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.dll + + ..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.dll True - - ..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.Core.dll + + ..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.Core.dll True diff --git a/Filtration.Tests/app.config b/Filtration.Tests/app.config index b0ca7b2..3dedc60 100644 --- a/Filtration.Tests/app.config +++ b/Filtration.Tests/app.config @@ -4,7 +4,7 @@ - + diff --git a/Filtration.Tests/packages.config b/Filtration.Tests/packages.config index af6f21a..c3f6e5b 100644 --- a/Filtration.Tests/packages.config +++ b/Filtration.Tests/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/Filtration.ThemeEditor/Filtration.ThemeEditor.csproj b/Filtration.ThemeEditor/Filtration.ThemeEditor.csproj index fdada7a..51136c2 100644 --- a/Filtration.ThemeEditor/Filtration.ThemeEditor.csproj +++ b/Filtration.ThemeEditor/Filtration.ThemeEditor.csproj @@ -31,8 +31,8 @@ 4 - - ..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll + + ..\packages\AutoMapper.4.2.0\lib\net45\AutoMapper.dll True @@ -78,28 +78,28 @@ - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.DataGrid.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.DataGrid.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.Toolkit.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.Toolkit.dll True diff --git a/Filtration.ThemeEditor/packages.config b/Filtration.ThemeEditor/packages.config index 627e334..1bdb57a 100644 --- a/Filtration.ThemeEditor/packages.config +++ b/Filtration.ThemeEditor/packages.config @@ -1,10 +1,10 @@  - + - + \ No newline at end of file diff --git a/Filtration.sln.DotSettings b/Filtration.sln.DotSettings index 2d2bbe3..c7dfe84 100644 --- a/Filtration.sln.DotSettings +++ b/Filtration.sln.DotSettings @@ -1,2 +1,4 @@  - True \ No newline at end of file + True + <data /> + <data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="Filtration.ItemFilterPreview.Tests" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /><Filter ModuleMask="Filtration.ObjectModel.Tests" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /><Filter ModuleMask="Filtration.ThemeEditor.Tests" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /><Filter ModuleMask="Filtration.Tests" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data> \ No newline at end of file diff --git a/Filtration/App.config b/Filtration/App.config index cf2a739..f490c15 100644 --- a/Filtration/App.config +++ b/Filtration/App.config @@ -31,7 +31,7 @@ - + diff --git a/Filtration/App.xaml.cs b/Filtration/App.xaml.cs index d152e1b..c471c85 100644 --- a/Filtration/App.xaml.cs +++ b/Filtration/App.xaml.cs @@ -28,6 +28,7 @@ namespace Filtration _container = new WindsorContainer(); + // Disable property injection var propInjector = _container.Kernel.ComponentModelBuilder .Contributors .OfType() diff --git a/Filtration/Filtration.csproj b/Filtration/Filtration.csproj index b0065a1..54f05d7 100644 --- a/Filtration/Filtration.csproj +++ b/Filtration/Filtration.csproj @@ -42,8 +42,8 @@ Resources\filtration.ico - - ..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll + + ..\packages\AutoMapper.4.2.0\lib\net45\AutoMapper.dll True @@ -69,9 +69,11 @@ ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll True - - ..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll + + ..\packages\MahApps.Metro.1.2.4.0\lib\net45\MahApps.Metro.dll + True + ..\packages\NLog.4.2.3\lib\net45\NLog.dll True @@ -88,7 +90,7 @@ - ..\packages\MvvmLightLibs.5.2.0.0\lib\net45\System.Windows.Interactivity.dll + ..\packages\MahApps.Metro.1.2.4.0\lib\net45\System.Windows.Interactivity.dll True @@ -99,40 +101,40 @@ - - ..\packages\WpfAnimatedGif.1.4.13\lib\net\WpfAnimatedGif.dll + + ..\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll True False ..\packages\WPFToolkit.3.5.50211.1\lib\WPFToolkit.dll - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll True False libs\Xceed.Wpf.AvalonDock.Themes.VS2013.dll - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.DataGrid.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.DataGrid.dll True - - ..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.Toolkit.dll + + ..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.Toolkit.dll True @@ -184,7 +186,6 @@ - diff --git a/Filtration/NLog.xsd b/Filtration/NLog.xsd index 0ed97b6..a719741 100644 --- a/Filtration/NLog.xsd +++ b/Filtration/NLog.xsd @@ -986,31 +986,32 @@ - + - - + - - - - - + + + - - + + + + + + @@ -1042,11 +1043,6 @@ Line ending mode. - - - Maximum number of archive files that should be kept. - - Way file archives are numbered. @@ -1067,6 +1063,11 @@ Size in bytes above which log files will be automatically archived. Warning: combining this with isn't supported. We cannot create multiple archive files, if they should have the same name. Choose: + + + Maximum number of archive files that should be kept. + + Indicates whether to compress archive files into the zip archive format. @@ -1077,14 +1078,9 @@ Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation. - + - File attributes (Windows only). - - - - - Indicates whether to replace file contents on each write instead of appending log message at the end. + Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. @@ -1107,34 +1103,24 @@ Indicates whether to create directories if they do not exist. - - - Indicates whether to delete old log file on startup. - - Indicates whether to enable log file(s) to be deleted. - + - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + File attributes (Windows only). - + - Indicates whether concurrent writes to the log file by multiple processes on different network hosts. + Indicates whether to delete old log file on startup. - + - Maximum number of log filenames that should be stored as existing. - - - - - Indicates whether to keep log file open instead of opening and closing it on each logging event. + Indicates whether to replace file contents on each write instead of appending log message at the end. @@ -1142,19 +1128,19 @@ Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - Number of times the write is appended on the file before NLog discards the log message. - - Delay in milliseconds to wait before attempting to write to the file again. - + - Indicates whether to automatically flush the file buffers after each log message. + Maximum number of log filenames that should be stored as existing. + + + + + Indicates whether concurrent writes to the log file by multiple processes on different network hosts. @@ -1162,11 +1148,31 @@ Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + + + Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + + Log file buffer size in bytes. + + + Indicates whether to automatically flush the file buffers after each log message. + + + + + Number of times the write is appended on the file before NLog discards the log message. + + + + + Indicates whether to keep log file open instead of opening and closing it on each logging event. + + diff --git a/Filtration/Services/StaticDataService.cs b/Filtration/Services/StaticDataService.cs index a602212..a962012 100644 --- a/Filtration/Services/StaticDataService.cs +++ b/Filtration/Services/StaticDataService.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Windows; using Filtration.Common.Services; +using Filtration.Common.Utilities; using Filtration.Utilities; namespace Filtration.Services diff --git a/Filtration/Translators/ItemFilterBlockTranslator.cs b/Filtration/Translators/ItemFilterBlockTranslator.cs index f0055ed..6428add 100644 --- a/Filtration/Translators/ItemFilterBlockTranslator.cs +++ b/Filtration/Translators/ItemFilterBlockTranslator.cs @@ -5,13 +5,13 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; using System.Windows.Media; +using Filtration.Common.Utilities; using Filtration.ObjectModel; using Filtration.ObjectModel.BlockItemBaseTypes; using Filtration.ObjectModel.BlockItemTypes; using Filtration.ObjectModel.Enums; using Filtration.ObjectModel.Extensions; using Filtration.ObjectModel.ThemeEditor; -using Filtration.Utilities; namespace Filtration.Translators { diff --git a/Filtration/Translators/ItemFilterScriptTranslator.cs b/Filtration/Translators/ItemFilterScriptTranslator.cs index 5d6d09b..4298170 100644 --- a/Filtration/Translators/ItemFilterScriptTranslator.cs +++ b/Filtration/Translators/ItemFilterScriptTranslator.cs @@ -3,10 +3,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; -using Castle.Core.Internal; +using Filtration.Common.Utilities; using Filtration.ObjectModel; using Filtration.Properties; -using Filtration.Utilities; namespace Filtration.Translators { @@ -112,7 +111,7 @@ namespace Filtration.Translators } } - if (!script.Description.IsNullOrEmpty()) + if (!string.IsNullOrEmpty(script.Description)) { script.Description = script.Description.TrimEnd('\n').TrimEnd('\r'); } diff --git a/Filtration/ViewModels/ItemFilterBlockViewModel.cs b/Filtration/ViewModels/ItemFilterBlockViewModel.cs index 9d403dc..3bd4a62 100644 --- a/Filtration/ViewModels/ItemFilterBlockViewModel.cs +++ b/Filtration/ViewModels/ItemFilterBlockViewModel.cs @@ -216,40 +216,13 @@ namespace Filtration.ViewModels public ObservableCollection AvailableColors => PathOfExileColors.DefaultColors; - public bool HasTextColor => Block.HasBlockItemOfType(); - - public Color DisplayTextColor => HasTextColor - ? BlockItems.OfType().First().Color - : new Color {A = 255, R = 200, G = 200, B = 200}; - - public bool HasBackgroundColor => Block.HasBlockItemOfType(); - - public Color DisplayBackgroundColor => HasBackgroundColor - ? BlockItems.OfType().First().Color - : new Color { A = 255, R = 0, G = 0, B = 0 }; - - public bool HasBorderColor => Block.HasBlockItemOfType(); - - public Color DisplayBorderColor => HasBorderColor - ? BlockItems.OfType().First().Color - : new Color { A = 255, R = 0, G = 0, B = 0 }; - - public bool HasFontSize => Block.HasBlockItemOfType(); - - public double DisplayFontSize - { - // Dividing by 1.8 roughly scales in-game font sizes down to WPF sizes - get - { - var fontSize = HasFontSize ? BlockItems.OfType().First().Value / 1.8 : 19; - - return fontSize; - } - } - + public Color DisplayTextColor => Block.DisplayTextColor; + public Color DisplayBackgroundColor => Block.DisplayBackgroundColor; + public Color DisplayBorderColor => Block.DisplayBorderColor; + public double DisplayFontSize => Block.DisplayFontSize/1.8; + public bool HasSound => Block.HasBlockItemOfType(); - - + public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any(); private void OnSwitchBlockItemsViewCommand() diff --git a/Filtration/packages.config b/Filtration/packages.config index a271df8..dad6566 100644 --- a/Filtration/packages.config +++ b/Filtration/packages.config @@ -1,16 +1,16 @@  - + - + - + - - - + + + \ No newline at end of file