Various refactorings to support ItemFilterPreview
This commit is contained in:
parent
d159f0b262
commit
86dc03f4ff
|
@ -79,6 +79,7 @@
|
|||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\FileSystemService.cs" />
|
||||
<Compile Include="Services\MessageBoxService.cs" />
|
||||
<Compile Include="Utilities\LineReader.cs" />
|
||||
<Compile Include="ViewModels\FiltrationViewModelBase.cs" />
|
||||
<Compile Include="ViewModels\PaneViewModel.cs" />
|
||||
<Compile Include="WindsorInstallers\ServicesInstaller.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<string>
|
|
@ -42,12 +42,12 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentAssertions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.dll</HintPath>
|
||||
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentAssertions.Core, Version=4.1.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.Core.dll</HintPath>
|
||||
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
|
@ -61,6 +61,10 @@
|
|||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="YamlDotNet, Version=3.7.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\YamlDotNet.3.7.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
|
||||
|
@ -74,6 +78,7 @@
|
|||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Services\serializationtest.cs" />
|
||||
<Compile Include="Services\TestItemBlockItemMatcher.cs" />
|
||||
<Compile Include="Services\TestItemFilterProcessor.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<IItem>();
|
||||
|
@ -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<IItem> { testInputItem });
|
||||
|
||||
//Assert
|
||||
Assert.AreEqual("Wands", result.Values.First().BlockItems.OfType<ClassBlockItem>().First().Items.First());
|
||||
Assert.AreEqual("Wands", result.First().ItemFilterBlock.BlockItems.OfType<ClassBlockItem>().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<ClassBlockItem>().First().Items.First());
|
||||
Assert.AreEqual("Wands", result.First().ItemFilterBlock.BlockItems.OfType<ClassBlockItem>().First().Items.First());
|
||||
}
|
||||
|
||||
private class ItemFilterProcessorTestUtility
|
||||
|
|
|
@ -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<SocketGroup> {new SocketGroup(new List<Socket> {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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.5.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FluentAssertions" version="4.1.1" targetFramework="net461" />
|
||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net461" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.0.1" targetFramework="net46" />
|
||||
<package id="YamlDotNet" version="3.7.0" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,8 +1,7 @@
|
|||
<Application x:Class="Filtration.ItemFilterPreview.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Filtration.ItemFilterPreview"
|
||||
StartupUri="MainWindow.xaml">
|
||||
Startup="Application_Startup">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
|
|
|
@ -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<TypedFactoryFacility>();
|
||||
_container.Install(FromAssembly.InThisApplication());
|
||||
|
||||
var mainWindow = _container.Resolve<IMainWindow>();
|
||||
mainWindow.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,15 +37,35 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight, Version=5.2.0.37222, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.2.0.37222, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.2.0.37226, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
|
@ -64,15 +84,34 @@
|
|||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Model\FilteredItem.cs" />
|
||||
<Compile Include="Model\Item.cs" />
|
||||
<Compile Include="Model\ItemCollection.cs" />
|
||||
<Compile Include="Services\BlockItemMatcher.cs" />
|
||||
<Compile Include="Services\ItemFilterProcessor.cs" />
|
||||
<Compile Include="UserControls\DesignTime\DesignTimeItemControl.cs" />
|
||||
<Compile Include="UserControls\ItemControl.xaml.cs">
|
||||
<DependentUpon>ItemControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\ItemSocketsControl.xaml.cs">
|
||||
<DependentUpon>ItemSocketsControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewModels\LootExplosionViewModel.cs" />
|
||||
<Compile Include="ViewModels\MainWindowViewModel.cs" />
|
||||
<Compile Include="Views\LootExplosionView.xaml.cs">
|
||||
<DependentUpon>LootExplosionView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WindsorInstallers\ViewModelsInstaller.cs" />
|
||||
<Compile Include="WindsorInstallers\ViewsInstaller.cs" />
|
||||
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Page Include="UserControls\ItemControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\LootExplosionView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Views\MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
@ -80,7 +119,7 @@
|
|||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<Compile Include="Views\MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
@ -113,11 +152,16 @@
|
|||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<AppDesigner Include="Properties\" />
|
||||
<Resource Include="Resources\Fontin-SmallCaps.ttf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Filtration.Common\Filtration.Common.csproj">
|
||||
<Project>{8cb44f28-2956-4c2a-9314-72727262edd4}</Project>
|
||||
<Name>Filtration.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>
|
||||
<Name>Filtration.ObjectModel</Name>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
<Window x:Class="Filtration.ItemFilterPreview.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Filtration.ItemFilterPreview"
|
||||
xmlns:userControls="clr-namespace:Filtration.ItemFilterPreview.UserControls"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="350" Width="525">
|
||||
<Grid>
|
||||
<Grid Background="Black">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<userControls:ItemSocketsControl />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
|
@ -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<BackgroundColorBlockItem>() ? ItemFilterBlock.DisplayBackgroundColor : new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
public Color BorderColor => ItemFilterBlock.HasBlockItemOfType<BorderColorBlockItem>() ? ItemFilterBlock.DisplayBorderColor : new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
public Color TextColor
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ItemFilterBlock.HasBlockItemOfType<TextColorBlockItem>())
|
||||
{
|
||||
return ItemFilterBlock.DisplayTextColor;
|
||||
}
|
||||
|
||||
return Item.DefaultTextColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<SocketGroup> LinkedSocketGroups { get; }
|
||||
List<SocketGroup> SocketGroups { get; set; }
|
||||
Color DefaultTextColor { get; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class Item : IItem
|
||||
{
|
||||
private List<SocketGroup> _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<SocketGroup> LinkedSocketGroups
|
||||
{
|
||||
get { return SocketGroups.Where(s => s.Linked); }
|
||||
|
@ -76,5 +85,7 @@ namespace Filtration.ItemFilterPreview.Model
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
public Color DefaultTextColor => ItemRarity.DefaultRarityTextColor();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Filtration.ItemFilterPreview.Model
|
||||
{
|
||||
class FilteredItemDictionary : Dictionary<Item, bool>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -8,7 +8,7 @@ namespace Filtration.ItemFilterPreview.Services
|
|||
{
|
||||
internal interface IItemFilterProcessor
|
||||
{
|
||||
IReadOnlyDictionary<IItem, IItemFilterBlock> ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable<IItem> items);
|
||||
List<IFilteredItem> ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable<IItem> items);
|
||||
}
|
||||
|
||||
internal class ItemFilterProcessor : IItemFilterProcessor
|
||||
|
@ -20,11 +20,11 @@ namespace Filtration.ItemFilterPreview.Services
|
|||
_blockItemMatcher = blockItemMatcher;
|
||||
}
|
||||
|
||||
public IReadOnlyDictionary<IItem, IItemFilterBlock> ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable<IItem> items)
|
||||
public List<IFilteredItem> ProcessItemsAgainstItemFilterScript(IItemFilterScript itemFilterScript, IEnumerable<IItem> items)
|
||||
{
|
||||
var overallsw = Stopwatch.StartNew();
|
||||
|
||||
var matchedItemBlockPairs = new Dictionary<IItem, IItemFilterBlock>();
|
||||
var filteredItems = new List<IFilteredItem>();
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
foreach (var item in items)
|
||||
|
@ -35,7 +35,7 @@ namespace Filtration.ItemFilterPreview.Services
|
|||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
<UserControl x:Class="Filtration.ItemFilterPreview.UserControls.ItemControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:designTime="clr-namespace:Filtration.ItemFilterPreview.UserControls.DesignTime"
|
||||
xmlns:converters="clr-namespace:Filtration.Common.Converters;assembly=Filtration.Common"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemControl, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="35" d:DesignWidth="170">
|
||||
<UserControl.Resources>
|
||||
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
|
||||
<Style x:Key="PathOfExileFont">
|
||||
<Setter Property="TextElement.FontFamily" Value="pack://application:,,,/resources/#Fontin SmallCaps" />
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin="3" Padding="4,0,4,0" BorderThickness="1">
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="{Binding BackgroundColor}" />
|
||||
</Border.Background>
|
||||
<Border.BorderBrush>
|
||||
<SolidColorBrush Color="{Binding BorderColor}" />
|
||||
</Border.BorderBrush>
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Item Preview" Style="{StaticResource PathOfExileFont}" FontSize="{Binding FontSize}">
|
||||
<TextBlock.Foreground>
|
||||
<SolidColorBrush Color="{Binding TextColor}" />
|
||||
</TextBlock.Foreground>
|
||||
</TextBlock>
|
||||
</Border>
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -0,0 +1,10 @@
|
|||
namespace Filtration.ItemFilterPreview.ViewModels
|
||||
{
|
||||
internal class LootExplosionViewModel
|
||||
{
|
||||
public LootExplosionViewModel()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<UserControl x:Class="Filtration.ItemFilterPreview.Views.LootExplosionView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Filtration.ItemFilterPreview.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
|
||||
<Grid>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
|
@ -13,14 +13,14 @@ using System.Windows.Media.Imaging;
|
|||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Filtration.ItemFilterPreview
|
||||
namespace Filtration.ItemFilterPreview.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// Interaction logic for LootExplosionView.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
public partial class LootExplosionView : UserControl
|
||||
{
|
||||
public MainWindow()
|
||||
public LootExplosionView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
|
@ -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<IMainWindowViewModel>()
|
||||
.ImplementedBy<MainWindowViewModel>()
|
||||
.LifeStyle.Singleton);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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<IMainWindow>()
|
||||
.ImplementedBy<MainWindow>()
|
||||
.LifeStyle.Singleton);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="3.3.0" targetFramework="net461" />
|
||||
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
|
||||
<package id="Castle.Windsor" version="3.3.0" targetFramework="net461" />
|
||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net461" />
|
||||
<package id="MvvmLightLibs" version="5.2.0.0" targetFramework="net461" />
|
||||
</packages>
|
|
@ -4,6 +4,8 @@ namespace Filtration.ObjectModel.Enums
|
|||
{
|
||||
public enum ItemRarity
|
||||
{
|
||||
[Description("Not Set")]
|
||||
NotSet,
|
||||
[Description("Normal")]
|
||||
Normal,
|
||||
[Description("Magic")]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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")]
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -72,6 +72,7 @@
|
|||
<Compile Include="Enums\SocketColor.cs" />
|
||||
<Compile Include="Enums\ThemeComponentType.cs" />
|
||||
<Compile Include="Extensions\EnumHelper.cs" />
|
||||
<Compile Include="Extensions\ItemRarityExtensions.cs" />
|
||||
<Compile Include="IAudioVisualBlockItem.cs" />
|
||||
<Compile Include="IItemFilterBlockItem.cs" />
|
||||
<Compile Include="ItemFilterBlock.cs" />
|
||||
|
@ -79,6 +80,8 @@
|
|||
<Compile Include="ItemFilterScript.cs" />
|
||||
<Compile Include="ItemFilterSection.cs" />
|
||||
<Compile Include="NumericFilterPredicate.cs" />
|
||||
<Compile Include="PathOfExileNamedColors.cs" />
|
||||
<Compile Include="Enums\PathOfExileNamedColor.cs" />
|
||||
<Compile Include="Properties\Annotations.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ReplaceColorsParameterSet.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<IItemFilterBlockItem> BlockItems { get; }
|
||||
Color DisplayBackgroundColor { get; }
|
||||
Color DisplayTextColor { get; }
|
||||
Color DisplayBorderColor { get; }
|
||||
double DisplayFontSize { get; }
|
||||
int BlockCount(Type type);
|
||||
bool AddBlockItemAllowed(Type type);
|
||||
bool HasBlockItemOfType<T>();
|
||||
|
@ -115,5 +122,49 @@ namespace Filtration.ObjectModel
|
|||
Action = BlockAction.Show;
|
||||
}
|
||||
}
|
||||
|
||||
public Color DisplayTextColor
|
||||
{
|
||||
get
|
||||
{
|
||||
var textColorBlockItem = BlockItems.OfType<TextColorBlockItem>().FirstOrDefault();
|
||||
if (textColorBlockItem != null)
|
||||
{
|
||||
return textColorBlockItem.Color;
|
||||
}
|
||||
|
||||
var rarityBlockItem = BlockItems.OfType<RarityBlockItem>().FirstOrDefault();
|
||||
return rarityBlockItem != null
|
||||
? ((ItemRarity) rarityBlockItem.FilterPredicate.PredicateOperand).DefaultRarityTextColor()
|
||||
: PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
|
||||
}
|
||||
}
|
||||
|
||||
public Color DisplayBackgroundColor
|
||||
{
|
||||
get
|
||||
{
|
||||
var backgroundColorBlockItem = BlockItems.OfType<BackgroundColorBlockItem>().FirstOrDefault();
|
||||
return backgroundColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
}
|
||||
}
|
||||
|
||||
public Color DisplayBorderColor
|
||||
{
|
||||
get
|
||||
{
|
||||
var borderColorBlockItem = BlockItems.OfType<BorderColorBlockItem>().FirstOrDefault();
|
||||
return borderColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
}
|
||||
}
|
||||
|
||||
public double DisplayFontSize
|
||||
{
|
||||
get
|
||||
{
|
||||
var fontSizeBlockItem = BlockItems.OfType<FontSizeBlockItem>().FirstOrDefault();
|
||||
return fontSizeBlockItem?.Value ?? 34;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<PathOfExileNamedColor, Color> Colors => new Dictionary<PathOfExileNamedColor, Color>
|
||||
{
|
||||
{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}},
|
||||
};
|
||||
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -3,8 +3,14 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Filtration.ObjectModel
|
||||
{
|
||||
[Serializable]
|
||||
public class SocketGroup : List<Socket>
|
||||
{
|
||||
private SocketGroup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public SocketGroup(List<Socket> sockets, bool linked)
|
||||
{
|
||||
if (sockets.Count < 1 || sockets.Count > 6)
|
||||
|
|
|
@ -31,12 +31,12 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentAssertions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.dll</HintPath>
|
||||
<Reference Include="FluentAssertions, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="FluentAssertions.Core, Version=4.1.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.1.1\lib\net45\FluentAssertions.Core.dll</HintPath>
|
||||
<Reference Include="FluentAssertions.Core, Version=4.2.1.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentAssertions.4.2.1\lib\net45\FluentAssertions.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.2.1510.2205, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.5.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="FluentAssertions" version="4.1.1" targetFramework="net451" />
|
||||
<package id="FluentAssertions" version="4.2.1" targetFramework="net461" />
|
||||
<package id="Moq" version="4.2.1510.2205" targetFramework="net451" />
|
||||
<package id="NUnit" version="3.0.1" targetFramework="net451" />
|
||||
</packages>
|
|
@ -31,8 +31,8 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoMapper, Version=4.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll</HintPath>
|
||||
<Reference Include="AutoMapper, Version=4.2.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.4.2.0\lib\net45\AutoMapper.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
|
@ -78,28 +78,28 @@
|
|||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.DataGrid, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.DataGrid, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.Toolkit, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.Toolkit, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="4.1.1" targetFramework="net451" />
|
||||
<package id="AutoMapper" version="4.2.0" targetFramework="net461" />
|
||||
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
|
||||
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
|
||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" />
|
||||
<package id="Extended.Wpf.Toolkit" version="2.5" targetFramework="net451" />
|
||||
<package id="Extended.Wpf.Toolkit" version="2.6" targetFramework="net461" />
|
||||
<package id="MvvmLightLibs" version="5.2.0.0" targetFramework="net451" />
|
||||
<package id="NLog" version="4.2.3" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,2 +1,4 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=Filtration_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=Filtration_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue"><data /></s:String>
|
||||
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue"><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></s:String></wpf:ResourceDictionary>
|
|
@ -31,7 +31,7 @@
|
|||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.5.0.0" newVersion="2.5.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.0.0" newVersion="2.6.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace Filtration
|
|||
|
||||
_container = new WindsorContainer();
|
||||
|
||||
// Disable property injection
|
||||
var propInjector = _container.Kernel.ComponentModelBuilder
|
||||
.Contributors
|
||||
.OfType<PropertiesDependenciesModelInspector>()
|
||||
|
|
|
@ -42,8 +42,8 @@
|
|||
<ApplicationIcon>Resources\filtration.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AutoMapper, Version=4.1.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.4.1.1\lib\net45\AutoMapper.dll</HintPath>
|
||||
<Reference Include="AutoMapper, Version=4.2.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\AutoMapper.4.2.0\lib\net45\AutoMapper.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
|
@ -69,9 +69,11 @@
|
|||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="MahApps.Metro">
|
||||
<HintPath>..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll</HintPath>
|
||||
<Reference Include="MahApps.Metro, Version=1.2.4.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\MahApps.Metro.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.2.3\lib\net45\NLog.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -88,7 +90,7 @@
|
|||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MvvmLightLibs.5.2.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
||||
<HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
|
@ -99,40 +101,40 @@
|
|||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="WpfAnimatedGif, Version=1.4.13.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WpfAnimatedGif.1.4.13\lib\net\WpfAnimatedGif.dll</HintPath>
|
||||
<Reference Include="WpfAnimatedGif, Version=1.4.14.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\WPFToolkit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2013, Version=2.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>libs\Xceed.Wpf.AvalonDock.Themes.VS2013.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.DataGrid, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.DataGrid, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xceed.Wpf.Toolkit, Version=2.5.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.5\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
<Reference Include="Xceed.Wpf.Toolkit, Version=2.6.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Extended.Wpf.Toolkit.2.6\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@ -184,7 +186,6 @@
|
|||
</Compile>
|
||||
<Compile Include="Utilities\AutoMapperHelpers.cs" />
|
||||
<Compile Include="Utilities\BlockGroupMapper.cs" />
|
||||
<Compile Include="Utilities\LineReader.cs" />
|
||||
<Compile Include="ViewModels\AvalonDockWorkspaceViewModel.cs" />
|
||||
<Compile Include="ViewModels\SettingsPageViewModel.cs" />
|
||||
<Compile Include="ViewModels\ToolPanes\BlockGroupBrowserViewModel.cs" />
|
||||
|
|
|
@ -986,31 +986,32 @@
|
|||
<xs:element name="footer" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||
<xs:element name="encoding" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||
<xs:element name="lineEnding" minOccurs="0" maxOccurs="1" type="LineEndingMode" />
|
||||
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="archiveNumbering" minOccurs="0" maxOccurs="1" type="NLog.Targets.ArchiveNumberingMode" />
|
||||
<xs:element name="archiveFileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||
<xs:element name="archiveEvery" minOccurs="0" maxOccurs="1" type="NLog.Targets.FileArchivePeriod" />
|
||||
<xs:element name="archiveAboveSize" minOccurs="0" maxOccurs="1" type="xs:long" />
|
||||
<xs:element name="maxArchiveFiles" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="enableArchiveFileCompression" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="forceManaged" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="fileAttributes" minOccurs="0" maxOccurs="1" type="NLog.Targets.Win32FileAttributes" />
|
||||
<xs:element name="replaceFileContentsOnEachWrite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="cleanupFileName" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="fileName" minOccurs="0" maxOccurs="1" type="Layout" />
|
||||
<xs:element name="archiveDateFormat" minOccurs="0" maxOccurs="1" type="xs:string" />
|
||||
<xs:element name="archiveOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="createDirs" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="deleteOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="enableFileDelete" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="openFileCacheTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="networkWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="maxLogFilenames" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="keepFileOpen" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="fileAttributes" minOccurs="0" maxOccurs="1" type="NLog.Targets.Win32FileAttributes" />
|
||||
<xs:element name="deleteOldFileOnStartup" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="replaceFileContentsOnEachWrite" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="concurrentWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="concurrentWriteAttempts" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="concurrentWriteAttemptDelay" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="autoFlush" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="maxLogFilenames" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="networkWrites" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="openFileCacheSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="openFileCacheTimeout" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="bufferSize" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="autoFlush" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
<xs:element name="concurrentWriteAttempts" minOccurs="0" maxOccurs="1" type="xs:integer" />
|
||||
<xs:element name="keepFileOpen" minOccurs="0" maxOccurs="1" type="xs:boolean" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="name" type="xs:string">
|
||||
<xs:annotation>
|
||||
|
@ -1042,11 +1043,6 @@
|
|||
<xs:documentation>Line ending mode.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="archiveNumbering" type="NLog.Targets.ArchiveNumberingMode">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Way file archives are numbered.</xs:documentation>
|
||||
|
@ -1067,6 +1063,11 @@
|
|||
<xs:documentation>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: </xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="maxArchiveFiles" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Maximum number of archive files that should be kept.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="enableArchiveFileCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to compress archive files into the zip archive format.</xs:documentation>
|
||||
|
@ -1077,14 +1078,9 @@
|
|||
<xs:documentation>Gets or set a value indicating whether a managed file stream is forced, instead of used the native implementation.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="fileAttributes" type="NLog.Targets.Win32FileAttributes">
|
||||
<xs:attribute name="cleanupFileName" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>File attributes (Windows only).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="replaceFileContentsOnEachWrite" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to replace file contents on each write instead of appending log message at the end.</xs:documentation>
|
||||
<xs:documentation>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.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="fileName" type="SimpleLayoutAttribute">
|
||||
|
@ -1107,34 +1103,24 @@
|
|||
<xs:documentation>Indicates whether to create directories if they do not exist.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="deleteOldFileOnStartup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to delete old log file on startup.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="enableFileDelete" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to enable log file(s) to be deleted.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="openFileCacheTimeout" type="xs:integer">
|
||||
<xs:attribute name="fileAttributes" type="NLog.Targets.Win32FileAttributes">
|
||||
<xs:annotation>
|
||||
<xs:documentation>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.</xs:documentation>
|
||||
<xs:documentation>File attributes (Windows only).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="networkWrites" type="xs:boolean">
|
||||
<xs:attribute name="deleteOldFileOnStartup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether concurrent writes to the log file by multiple processes on different network hosts.</xs:documentation>
|
||||
<xs:documentation>Indicates whether to delete old log file on startup.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="maxLogFilenames" type="xs:integer">
|
||||
<xs:attribute name="replaceFileContentsOnEachWrite" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Maximum number of log filenames that should be stored as existing.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="keepFileOpen" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to keep log file open instead of opening and closing it on each logging event.</xs:documentation>
|
||||
<xs:documentation>Indicates whether to replace file contents on each write instead of appending log message at the end.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="concurrentWrites" type="xs:boolean">
|
||||
|
@ -1142,19 +1128,19 @@
|
|||
<xs:documentation>Indicates whether concurrent writes to the log file by multiple processes on the same host.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="concurrentWriteAttempts" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of times the write is appended on the file before NLog discards the log message.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="concurrentWriteAttemptDelay" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Delay in milliseconds to wait before attempting to write to the file again.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="autoFlush" type="xs:boolean">
|
||||
<xs:attribute name="maxLogFilenames" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to automatically flush the file buffers after each log message.</xs:documentation>
|
||||
<xs:documentation>Maximum number of log filenames that should be stored as existing.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="networkWrites" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether concurrent writes to the log file by multiple processes on different network hosts.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="openFileCacheSize" type="xs:integer">
|
||||
|
@ -1162,11 +1148,31 @@
|
|||
<xs:documentation>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).</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="openFileCacheTimeout" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>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.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="bufferSize" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Log file buffer size in bytes.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="autoFlush" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to automatically flush the file buffers after each log message.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="concurrentWriteAttempts" type="xs:integer">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Number of times the write is appended on the file before NLog discards the log message.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="keepFileOpen" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Indicates whether to keep log file open instead of opening and closing it on each logging event.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
|
|
@ -216,40 +216,13 @@ namespace Filtration.ViewModels
|
|||
|
||||
public ObservableCollection<ColorItem> AvailableColors => PathOfExileColors.DefaultColors;
|
||||
|
||||
public bool HasTextColor => Block.HasBlockItemOfType<TextColorBlockItem>();
|
||||
|
||||
public Color DisplayTextColor => HasTextColor
|
||||
? BlockItems.OfType<TextColorBlockItem>().First().Color
|
||||
: new Color {A = 255, R = 200, G = 200, B = 200};
|
||||
|
||||
public bool HasBackgroundColor => Block.HasBlockItemOfType<BackgroundColorBlockItem>();
|
||||
|
||||
public Color DisplayBackgroundColor => HasBackgroundColor
|
||||
? BlockItems.OfType<BackgroundColorBlockItem>().First().Color
|
||||
: new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
|
||||
public bool HasBorderColor => Block.HasBlockItemOfType<BorderColorBlockItem>();
|
||||
|
||||
public Color DisplayBorderColor => HasBorderColor
|
||||
? BlockItems.OfType<BorderColorBlockItem>().First().Color
|
||||
: new Color { A = 255, R = 0, G = 0, B = 0 };
|
||||
|
||||
public bool HasFontSize => Block.HasBlockItemOfType<FontSizeBlockItem>();
|
||||
|
||||
public double DisplayFontSize
|
||||
{
|
||||
// Dividing by 1.8 roughly scales in-game font sizes down to WPF sizes
|
||||
get
|
||||
{
|
||||
var fontSize = HasFontSize ? BlockItems.OfType<FontSizeBlockItem>().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<SoundBlockItem>();
|
||||
|
||||
|
||||
public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any();
|
||||
|
||||
private void OnSwitchBlockItemsViewCommand()
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="AutoMapper" version="4.1.1" targetFramework="net451" />
|
||||
<package id="AutoMapper" version="4.2.0" targetFramework="net461" />
|
||||
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
|
||||
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
|
||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" />
|
||||
<package id="Extended.Wpf.Toolkit" version="2.5" targetFramework="net451" />
|
||||
<package id="Extended.Wpf.Toolkit" version="2.6" targetFramework="net461" />
|
||||
<package id="Fluent.Ribbon" version="3.6.1.236" targetFramework="net451" />
|
||||
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net451" />
|
||||
<package id="MahApps.Metro" version="1.2.4.0" targetFramework="net461" />
|
||||
<package id="MvvmLightLibs" version="5.2.0.0" targetFramework="net451" />
|
||||
<package id="NLog" version="4.2.3" targetFramework="net461" />
|
||||
<package id="NLog.Config" version="4.2.2" targetFramework="net451" />
|
||||
<package id="NLog.Schema" version="4.2.1" targetFramework="net451" />
|
||||
<package id="WpfAnimatedGif" version="1.4.13" targetFramework="net451" />
|
||||
<package id="NLog.Config" version="4.2.3" targetFramework="net461" />
|
||||
<package id="NLog.Schema" version="4.2.3" targetFramework="net461" />
|
||||
<package id="WpfAnimatedGif" version="1.4.14" targetFramework="net461" />
|
||||
<package id="WPFToolkit" version="3.5.50211.1" targetFramework="net451" />
|
||||
</packages>
|
Loading…
Reference in New Issue