40 Commits

Author SHA1 Message Date
Ben Wallis
30e76e333c * Bumped version to 1.1.0-beta3
* Fixed Switch to Appearance/Regular Block Items text overlapping block item controls
* Added Enable/Disable toggle button to Appearance block items control
* Added horizontal scrollbar to block items view
* Moved Enable/Disable toggle button to separate user control(previously it was only visible when viewing Regular block items)
* Added DesignTimeItemFilterBlockViewModel
2018-12-02 21:36:01 +00:00
Glen M
f840fb69ad Throttle selections to improve Select All performance. (#104)
Throttle selections to improve Select All performance in ItemFilterScriptViewModel.
2018-12-02 16:30:50 +00:00
Ben Wallis
ae98c2d5de Bumped version to 1.1.0-beta2 2018-11-28 22:29:52 +00:00
Ben Wallis
ba6d50cf45 * Added auto-expand sections on open setting
* Changed all sections to be expanded unless the new setting is disabled
* Tidied up some casting in ItemFilterScriptViewModel by using pattern matching
2018-11-28 22:28:21 +00:00
Ben Wallis
6838cb12a8 Fixed a crash when loading filters with custom sounds 2018-11-28 22:03:27 +00:00
Ben Wallis
fd2023598b #83 - Fixed theme serialization 2018-11-28 21:50:42 +00:00
Ben Wallis
e3b1a5dba7 Updated nuspec release notes 2018-11-27 21:56:20 +00:00
Ben Wallis
25c25c2a1d * Removed incorrect use of async method in MainWindowViewModel constructor
* Moved script/theme loading code to new ScriptLoadingService class
2018-11-27 21:48:36 +00:00
Ben Wallis
e5386132c3 Updated Squirrel from 1.8.0 to 1.9.0 2018-11-27 21:34:58 +00:00
Ben Wallis
784f0227ee Updated NuGet packages 2018-11-27 21:26:04 +00:00
Ben Wallis
fb37faa7bc * Moved item filter script directory handling code to new ItemFilterScriptDirectorySerivce class
* Fixed issue #94 where the user was prompted to select their Path of Exile data directory after every upgrade.
* The default Path of Exile data directory is now automatically chosen on first run if it exists
* Moved CommonOpenFileDialog usage to new DialogService class
* Changed Custom Sounds code in ItemFilterScriptViewModel to use ItemFilterScriptDirectory instead of DefaultPathOfExileDirectory
* Moved Custom Sounds code from constructor to Initialise method to prevent the files being enumerated before the directory is set during startup
2018-11-27 20:40:00 +00:00
azakhi
63236769aa Add clear styles button (#99) 2018-11-26 21:26:04 +00:00
azakhi
05a994f562 Remember all open scripts (#100) 2018-11-26 21:25:10 +00:00
azakhi
124786dd0d Fix block group changes not affecting script (#101) 2018-11-26 21:24:27 +00:00
Ben Wallis
e516ded476 Bumped version to 1.1.0-beta1 2018-09-30 14:06:33 +01:00
Ben Wallis
f238bbf856 Fixed a crash on exit caused by a null SelectedBlockViewModel 2018-09-30 14:02:47 +01:00
Ben Wallis
a0191576f0 Update README.md 2018-09-30 13:57:35 +01:00
Ben Wallis
1d96b69800 Update README.md 2018-09-30 12:51:47 +01:00
Ben Wallis
99abb276af Merge branch 'bugfix/FixBlockOutputPreview' 2018-09-30 12:49:35 +01:00
Ben Wallis
073fe553ea Made block output preview pane text selectable 2018-09-30 12:48:24 +01:00
Ben Wallis
0d81d0ef54 Fixed block output preview 2018-09-30 12:38:26 +01:00
Ben Wallis
f04f9c20ed Update README.md 2018-09-30 11:57:40 +01:00
Ben Wallis
f71ba74425 Update README.md 2018-09-30 11:57:24 +01:00
Ben Wallis
04cbf218f3 Bumped version to 1.0.0 2018-09-30 11:43:22 +01:00
Ben Wallis
6007306346 Added 1.0.0 release notes 2018-09-28 20:44:25 +01:00
Ben Wallis
992bd21570 Fixed UpdateService which was erroneously using the local update manager instead of the GitHub update manager for several parts of the update process 2018-09-28 20:24:09 +01:00
Ben Wallis
7d8b32b2e7 Fixup after merging missed commit from master 2018-09-28 17:58:16 +01:00
Ben Wallis
ac904c31ff * Added default colours for TextColor, BorderColor and BackgroundColor block items (previously the default color was completely transparent)
* Bumped version to 1.0.0-beta3
2018-09-28 17:47:23 +01:00
Ben Wallis
f51fe315ad Updated Filtration.nuspec for 1.0.0-beta2 2018-09-28 17:27:07 +01:00
Ben Wallis
3ce2e12f56 Disabled setting themes for MinimapIcon, PlayEffect and SetFontSize blocks (temporary fix for issue #68) 2018-09-28 17:20:42 +01:00
Ben Wallis
43e5b30080 Merge pull request #88 from GlenCFL/validate-lists
Audit and Validate the Data Files
2018-09-27 12:38:58 +01:00
GlenCFL
bc99339390 Audit the static data files. 2018-09-27 07:21:32 -04:00
Ben Wallis
781faae85d Merge pull request #87 from GlenCFL/mod-completions
Provide autocompletions for item mods.
2018-09-27 07:08:47 +01:00
GlenCFL
c926808878 Remove the now irrelevant static data test. 2018-09-26 23:40:34 -04:00
GlenCFL
24d9f97717 Provide autocompletions for item mods. 2018-09-26 23:35:39 -04:00
Ben Wallis
7e4e6fe42e Refactored StaticDataService to use local resources for ItemBaseTypes.txt and ItemClasses.txt instead of the old files in APPDATA that aren't used anymore.
Bumped develop version to 1.0.0-beta2
2018-09-26 19:12:31 +01:00
Ben Wallis
0209de3817 Update README.md 2018-09-01 10:15:38 +01:00
Ben Wallis
1e26a2ae3e Merge pull request #62 from GlenCFL/fix-reopen
Fix the reading of CustomAlertSounds containing path separators.
2018-09-01 09:57:54 +01:00
GlenCFL
54b72e44b0 Reposition the new custom sound tests. 2018-08-31 21:06:51 -04:00
GlenCFL
24df1d7687 Fix the reading of CustomAlertSounds containing path separators. 2018-08-31 20:01:21 -04:00
106 changed files with 4486 additions and 2342 deletions

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -31,18 +34,27 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -53,9 +65,16 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -31,35 +31,33 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
@@ -86,6 +84,7 @@
<Compile Include="WindsorInstallers\ServicesInstaller.cs" /> <Compile Include="WindsorInstallers\ServicesInstaller.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net451" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="3.4.0" targetFramework="net461" /> <package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" /> <package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
</packages> </packages>

View File

@@ -31,23 +31,23 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@@ -62,6 +62,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="CommonServiceLocator" version="1.3" targetFramework="net461" /> <package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
</packages> </packages>

View File

@@ -22,10 +22,18 @@
<connectionStrings> <connectionStrings>
<add name="FiltrationDbContext" connectionString="data source=&quot;D:\C# Projects\Filtration\Filtration.db&quot;" providerName="System.Data.SQLite.EF6" /> <add name="FiltrationDbContext" connectionString="data source=&quot;D:\C# Projects\Filtration\Filtration.db&quot;" providerName="System.Data.SQLite.EF6" />
</connectionStrings> </connectionStrings>
<system.data> <system.data>
<DbProviderFactories> <DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" /> <remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" /> <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories> <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data></configuration> </system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -39,29 +40,24 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath> <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.102.0\lib\net46\System.Data.SQLite.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.Core.1.0.109.2\lib\net46\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite.EF6, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.102.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.EF6.1.0.109.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite.Linq, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.102.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.Linq.1.0.109.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<Choose> <Choose>
@@ -114,13 +110,14 @@
</Choose> </Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets'))" /> <Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets'))" />
</Target> </Target>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Data.SQLite" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.EF6" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net461" />
<package id="System.Data.SQLite.Linq" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections> </configSections>
<entityFramework> <entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
@@ -11,13 +11,13 @@
</parameters> </parameters>
</defaultConnectionFactory> </defaultConnectionFactory>
<providers> <providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" /> <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers> </providers>
</entityFramework> </entityFramework>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup> </startup>
<connectionStrings> <connectionStrings>
<add name="FiltrationDbContext" connectionString="data source=&quot;D:\C# Projects\Filtration\Filtration.db&quot;" providerName="System.Data.SQLite.EF6" /> <add name="FiltrationDbContext" connectionString="data source=&quot;D:\C# Projects\Filtration\Filtration.db&quot;" providerName="System.Data.SQLite.EF6" />
</connectionStrings> </connectionStrings>
@@ -26,4 +26,13 @@
<remove invariant="System.Data.SQLite.EF6" /> <remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" /> <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories> <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data></configuration> </system.data>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -34,23 +34,22 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private> </Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.102.0\lib\net46\System.Data.SQLite.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.Core.1.0.109.2\lib\net46\System.Data.SQLite.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite.EF6, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.102.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.EF6.1.0.109.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"> <Reference Include="System.Data.SQLite.Linq, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.102.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath> <HintPath>..\packages\System.Data.SQLite.Linq.1.0.109.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" /> <Reference Include="System.Security" />
@@ -78,12 +77,12 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets')" /> <Import Project="..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets'))" /> <Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets'))" />
</Target> </Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="EntityFramework" version="6.1.3" targetFramework="net46" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="System.Data.SQLite" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.EF6" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net461" />
<package id="System.Data.SQLite.Linq" version="1.0.102.0" targetFramework="net461" /> <package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -23,6 +24,8 @@
<TestProjectType>CodedUITest</TestProjectType> <TestProjectType>CodedUITest</TestProjectType>
<IsWindowsStoreCodedUITest>True</IsWindowsStoreCodedUITest> <IsWindowsStoreCodedUITest>True</IsWindowsStoreCodedUITest>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -42,29 +45,31 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=5.5.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.5.5.3\lib\net45\FluentAssertions.dll</HintPath>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="YamlDotNet, Version=3.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\YamlDotNet.3.9.0\lib\net35\YamlDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
@@ -118,6 +123,12 @@
<None Include="Resources\MuldiniFilterScript.txt" /> <None Include="Resources\MuldiniFilterScript.txt" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -4,12 +4,36 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" /> <assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="ControlzEx" publicKeyToken="f08b075e934b7045" culture="neutral" /> <assemblyIdentity name="ControlzEx" publicKeyToken="f08b075e934b7045" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" /> <bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Xceed.Wpf.Toolkit" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
</configuration> </configuration>

View File

@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="FluentAssertions" version="4.19.2" targetFramework="net461" /> <package id="FluentAssertions" version="5.5.3" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="YamlDotNet" version="3.9.0" targetFramework="net461" /> <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,6 +1,26 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup> </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>

View File

@@ -36,37 +36,43 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="3.4.0" targetFramework="net461" /> <package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net461" /> <package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -31,19 +34,28 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -64,12 +76,19 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -7,6 +7,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{ {
public BackgroundColorBlockItem() public BackgroundColorBlockItem()
{ {
Color = new Color { A = 240, R = 0, G = 0, B = 0 };
} }
public BackgroundColorBlockItem(Color color) : base(color) public BackgroundColorBlockItem(Color color) : base(color)

View File

@@ -7,6 +7,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{ {
public BorderColorBlockItem() public BorderColorBlockItem()
{ {
Color = new Color {A = 240, R = 0, G = 0, B = 0};
} }
public BorderColorBlockItem(Color color) : base(color) public BorderColorBlockItem(Color color) : base(color)

View File

@@ -1,5 +1,6 @@
using System.Windows.Media; using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes; using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes namespace Filtration.ObjectModel.BlockItemTypes
{ {
@@ -7,6 +8,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{ {
public TextColorBlockItem() public TextColorBlockItem()
{ {
Color = PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
} }
public TextColorBlockItem(Color color) : base(color) public TextColorBlockItem(Color color) : base(color)

View File

@@ -31,31 +31,34 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.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.4.3.1\lib\net45\Castle.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="CommonServiceLocator, Version=2.0.2.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.2\lib\net45\CommonServiceLocator.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
@@ -164,6 +167,7 @@
<Compile Include="WindsorInstallers\ModelsInstaller.cs" /> <Compile Include="WindsorInstallers\ModelsInstaller.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@@ -9,6 +9,10 @@ namespace Filtration.ObjectModel.ThemeEditor
{ {
private Color _color; private Color _color;
private ColorThemeComponent()
{
}
public ColorThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor) public ColorThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor)
{ {
if (componentName == null || componentColor == null) if (componentName == null || componentColor == null)
@@ -23,7 +27,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public Color Color public Color Color
{ {
get { return _color; } get => _color;
set set
{ {
_color = value; _color = value;

View File

@@ -9,22 +9,21 @@ namespace Filtration.ObjectModel.ThemeEditor
private EffectColor _effectColor; private EffectColor _effectColor;
private bool _temporary; private bool _temporary;
public EffectColorThemeComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary) private EffectColorThemeComponent()
{ {
if (componentName == null)
{
throw new ArgumentException("Null parameters not allowed in EffectColorThemeComponent constructor");
} }
public EffectColorThemeComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary)
{
ComponentType = componentType; ComponentType = componentType;
ComponentName = componentName; ComponentName = componentName ?? throw new ArgumentException("Null parameters not allowed in EffectColorThemeComponent constructor");
EffectColor = componentEffectColor; EffectColor = componentEffectColor;
Temporary = componentTemporary; Temporary = componentTemporary;
} }
public EffectColor EffectColor public EffectColor EffectColor
{ {
get { return _effectColor; } get => _effectColor;
set set
{ {
_effectColor = value; _effectColor = value;
@@ -35,7 +34,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public bool Temporary public bool Temporary
{ {
get { return _temporary; } get => _temporary;
set set
{ {
_temporary = value; _temporary = value;

View File

@@ -10,6 +10,10 @@ namespace Filtration.ObjectModel.ThemeEditor
private IconColor _iconColor; private IconColor _iconColor;
private IconShape _iconShape; private IconShape _iconShape;
private IconThemeComponent()
{
}
public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape) public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape)
{ {
if (componentName == null) if (componentName == null)
@@ -26,7 +30,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public IconSize IconSize public IconSize IconSize
{ {
get { return _iconSize; } get => _iconSize;
set set
{ {
_iconSize = value; _iconSize = value;
@@ -37,7 +41,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public IconColor IconColor public IconColor IconColor
{ {
get { return _iconColor; } get => _iconColor;
set set
{ {
_iconColor = value; _iconColor = value;
@@ -48,7 +52,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public IconShape IconShape public IconShape IconShape
{ {
get { return _iconShape; } get => _iconShape;
set set
{ {
_iconShape = value; _iconShape = value;

View File

@@ -9,6 +9,10 @@ namespace Filtration.ObjectModel.ThemeEditor
{ {
private int _value; private int _value;
private IntegerThemeComponent()
{
}
public IntegerThemeComponent(ThemeComponentType componentType, string componentName, int componentValue) public IntegerThemeComponent(ThemeComponentType componentType, string componentName, int componentValue)
{ {
if (componentName == null) if (componentName == null)
@@ -23,7 +27,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public int Value public int Value
{ {
get { return _value; } get => _value;
set set
{ {
_value = value; _value = value;

View File

@@ -9,6 +9,10 @@ namespace Filtration.ObjectModel.ThemeEditor
private string _value; private string _value;
private int _secondValue; private int _secondValue;
private StrIntThemeComponent()
{
}
public StrIntThemeComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue) public StrIntThemeComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{ {
if (componentName == null || componentValue == null) if (componentName == null || componentValue == null)
@@ -24,7 +28,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public string Value public string Value
{ {
get { return _value; } get => _value;
set set
{ {
_value = value; _value = value;
@@ -35,7 +39,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public int SecondValue public int SecondValue
{ {
get { return _secondValue; } get => _secondValue;
set set
{ {
_secondValue = value; _secondValue = value;

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Xml.Serialization;
using Filtration.ObjectModel.Enums; using Filtration.ObjectModel.Enums;
using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Command;
using Microsoft.Win32; using Microsoft.Win32;
@@ -13,6 +14,10 @@ namespace Filtration.ObjectModel.ThemeEditor
private string _value; private string _value;
public static ObservableCollection<string> _customSoundsAvailable; public static ObservableCollection<string> _customSoundsAvailable;
private StringThemeComponent()
{
}
public StringThemeComponent(ThemeComponentType componentType, string componentName, string componentValue) public StringThemeComponent(ThemeComponentType componentType, string componentName, string componentValue)
{ {
if (componentName == null || componentValue == null) if (componentName == null || componentValue == null)
@@ -61,13 +66,14 @@ namespace Filtration.ObjectModel.ThemeEditor
CustomSoundFileDialogCommand = new RelayCommand(OnCustomSoundFileDialog); CustomSoundFileDialogCommand = new RelayCommand(OnCustomSoundFileDialog);
} }
[XmlIgnore]
public RelayCommand CustomSoundFileDialogCommand { get; set; } public RelayCommand CustomSoundFileDialogCommand { get; set; }
public ObservableCollection<string> CustomSoundsAvailable => _customSoundsAvailable; public ObservableCollection<string> CustomSoundsAvailable => _customSoundsAvailable;
public string Value public string Value
{ {
get { return _value; } get => _value;
set set
{ {
_value = value; _value = value;
@@ -78,12 +84,11 @@ namespace Filtration.ObjectModel.ThemeEditor
private void OnCustomSoundFileDialog() private void OnCustomSoundFileDialog()
{ {
OpenFileDialog fileDialog = new OpenFileDialog(); OpenFileDialog fileDialog = new OpenFileDialog {DefaultExt = ".mp3"};
fileDialog.DefaultExt = ".mp3"; var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\Path of Exile\";
var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString() + @"\My Games\Path of Exile\";
fileDialog.InitialDirectory = poePath; fileDialog.InitialDirectory = poePath;
Nullable<bool> result = fileDialog.ShowDialog(); bool? result = fileDialog.ShowDialog();
if (result == true) if (result == true)
{ {
var fileName = fileDialog.FileName; var fileName = fileDialog.FileName;

View File

@@ -7,13 +7,17 @@ using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor namespace Filtration.ObjectModel.ThemeEditor
{ {
[Serializable] [Serializable]
[XmlInclude(typeof(ColorThemeComponent))]
[XmlInclude(typeof(EffectColorThemeComponent))]
[XmlInclude(typeof(IconThemeComponent))]
[XmlInclude(typeof(IntegerThemeComponent))]
[XmlInclude(typeof(StringThemeComponent))]
[XmlInclude(typeof(StrIntThemeComponent))]
public class Theme public class Theme
{ {
private readonly ThemeComponentCollection _components;
public Theme() public Theme()
{ {
_components = new ThemeComponentCollection { IsMasterCollection = false}; Components = new ThemeComponentCollection { IsMasterCollection = false};
} }
public string Name { get; set; } public string Name { get; set; }
@@ -21,28 +25,28 @@ namespace Filtration.ObjectModel.ThemeEditor
[XmlIgnore] [XmlIgnore]
public string FilePath { get; set; } public string FilePath { get; set; }
public ThemeComponentCollection Components => _components; public ThemeComponentCollection Components { get; set; }
public bool ComponentExists(ThemeComponentType componentType, string componentName) public bool ComponentExists(ThemeComponentType componentType, string componentName)
{ {
var componentCount = var componentCount =
_components.Count(c => c.ComponentName == componentName && c.ComponentType == componentType); Components.Count(c => c.ComponentName == componentName && c.ComponentType == componentType);
return componentCount > 0; return componentCount > 0;
} }
public void AddComponent(ThemeComponentType componentType, string componentName, Color componentColor) public void AddComponent(ThemeComponentType componentType, string componentName, Color componentColor)
{ {
_components.Add(new ColorThemeComponent(componentType, componentName, componentColor)); Components.Add(new ColorThemeComponent(componentType, componentName, componentColor));
} }
public void AddComponent(ThemeComponentType componentType, string componentName, int componentValue) public void AddComponent(ThemeComponentType componentType, string componentName, int componentValue)
{ {
_components.Add(new IntegerThemeComponent(componentType, componentName, componentValue)); Components.Add(new IntegerThemeComponent(componentType, componentName, componentValue));
} }
public void AddComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue) public void AddComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{ {
_components.Add(new StrIntThemeComponent(componentType, componentName, componentValue, componentSecondValue)); Components.Add(new StrIntThemeComponent(componentType, componentName, componentValue, componentSecondValue));
} }
} }
} }

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.0" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="3.4.0" targetFramework="net461" /> <package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
<package id="CommonServiceLocator" version="2.0.2" targetFramework="net461" /> <package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
</packages> </packages>

View File

@@ -46,7 +46,9 @@
<Compile Include="Services\IItemFilterBlockTranslator.cs" /> <Compile Include="Services\IItemFilterBlockTranslator.cs" />
<Compile Include="Services\IItemFilterScriptTranslator.cs" /> <Compile Include="Services\IItemFilterScriptTranslator.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj"> <ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
<Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project> <Project>{4aac3beb-1dc1-483e-9d11-0e9334e80227}</Project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -17,6 +18,8 @@
<IsCodedUITest>False</IsCodedUITest> <IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType> <TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -36,24 +39,30 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=5.5.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.5.5.3\lib\net45\FluentAssertions.dll</HintPath>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.Core.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
</ItemGroup> </ItemGroup>
@@ -107,6 +116,7 @@
<EmbeddedResource Include="Resources\testscript.txt" /> <EmbeddedResource Include="Resources\testscript.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -132,6 +142,12 @@
</Choose> </Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -1308,6 +1308,86 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual(ItemRarity.Magic, (ItemRarity)rarityBlockItem.FilterPredicate.PredicateOperand); Assert.AreEqual(ItemRarity.Magic, (ItemRarity)rarityBlockItem.FilterPredicate.PredicateOperand);
} }
[Test]
public void TranslateStringToItemFilterBlock_CustomSoundDocumentsFile()
{
// Arrange
var inputString = @"Show" + Environment.NewLine +
"CustomAlertSound \"test.mp3\"";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is CustomSoundBlockItem));
var customSoundBlockItem = result.BlockItems.OfType<CustomSoundBlockItem>().First();
Assert.AreEqual("test.mp3", customSoundBlockItem.Value);
}
[Test]
public void TranslateStringToItemFilterBlock_CustomSoundDocumentsRelativeFile()
{
// Arrange
var inputString = @"Show" + Environment.NewLine +
"CustomAlertSound \"Sounds\test.mp3\"";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is CustomSoundBlockItem));
var customSoundBlockItem = result.BlockItems.OfType<CustomSoundBlockItem>().First();
Assert.AreEqual("Sounds\test.mp3", customSoundBlockItem.Value);
}
[Test]
public void TranslateStringToItemFilterBlock_CustomSoundFullBackSlashPath()
{
// Arrange
var inputString = @"Show" + Environment.NewLine +
"CustomAlertSound \"C:\\Sounds\\test.mp3\"";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is CustomSoundBlockItem));
var customSoundBlockItem = result.BlockItems.OfType<CustomSoundBlockItem>().First();
Assert.AreEqual("C:\\Sounds\\test.mp3", customSoundBlockItem.Value);
}
[Test]
public void TranslateStringToItemFilterBlock_CustomSoundFullForwardSlashPath()
{
// Arrange
var inputString = @"Show" + Environment.NewLine +
"CustomAlertSound \"C:/Sounds/test.mp3\"";
//Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is CustomSoundBlockItem));
var customSoundBlockItem = result.BlockItems.OfType<CustomSoundBlockItem>().First();
Assert.AreEqual("C:/Sounds/test.mp3", customSoundBlockItem.Value);
}
[Test]
public void TranslateStringToItemFilterBlock_CustomSoundFullMixedPath()
{
// Arrange
var inputString = @"Show" + Environment.NewLine +
"CustomAlertSound \"C:\\Sounds/test.mp3\"";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is CustomSoundBlockItem));
var customSoundBlockItem = result.BlockItems.OfType<CustomSoundBlockItem>().First();
Assert.AreEqual("C:\\Sounds/test.mp3", customSoundBlockItem.Value);
}
[Test] [Test]
public void TranslateItemFilterBlockToString_NothingPopulated_ReturnsCorrectString() public void TranslateItemFilterBlockToString_NothingPopulated_ReturnsCorrectString()
{ {

View File

@@ -124,7 +124,7 @@ namespace Filtration.Parser.Tests.Services
&& s.ItemFilterScriptSettings == new ItemFilterScriptSettings(new ThemeComponentCollection()) && s.ItemFilterScriptSettings == new ItemFilterScriptSettings(new ThemeComponentCollection())
&& s.Description == "Script description\r\nScript description\r\nScript description\r\nScript description"); && s.Description == "Script description\r\nScript description\r\nScript description\r\nScript description");
result.ShouldBeEquivalentTo(expectedResult); result.Should().BeEquivalentTo(expectedResult);
} }
[Test] [Test]

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="FluentAssertions" version="4.19.2" targetFramework="net461" /> <package id="FluentAssertions" version="5.5.3" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -31,17 +31,19 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -68,6 +70,7 @@
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None> </None>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -32,8 +32,7 @@ namespace Filtration.Parser.Services
// Converts a string into an ItemFilterCommentBlock maintaining newlines and spaces but removing # characters // Converts a string into an ItemFilterCommentBlock maintaining newlines and spaces but removing # characters
public IItemFilterCommentBlock TranslateStringToItemFilterCommentBlock(string inputString, IItemFilterScript parentItemFilterScript, string originalString = "") public IItemFilterCommentBlock TranslateStringToItemFilterCommentBlock(string inputString, IItemFilterScript parentItemFilterScript, string originalString = "")
{ {
var itemFilterCommentBlock = new ItemFilterCommentBlock(parentItemFilterScript); var itemFilterCommentBlock = new ItemFilterCommentBlock(parentItemFilterScript) {OriginalText = originalString};
itemFilterCommentBlock.OriginalText = originalString;
foreach (var line in new LineReader(() => new StringReader(inputString))) foreach (var line in new LineReader(() => new StringReader(inputString)))
{ {
@@ -217,8 +216,7 @@ namespace Filtration.Parser.Services
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new TextColorBlockItem(); var blockItem = new TextColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
block.BlockItems.Add(blockItem); block.BlockItems.Add(blockItem);
themeComponentType = (int)ThemeComponentType.TextColor; themeComponentType = (int)ThemeComponentType.TextColor;
break; break;
@@ -230,8 +228,7 @@ namespace Filtration.Parser.Services
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new BackgroundColorBlockItem(); var blockItem = new BackgroundColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
block.BlockItems.Add(blockItem); block.BlockItems.Add(blockItem);
themeComponentType = (int)ThemeComponentType.BackgroundColor; themeComponentType = (int)ThemeComponentType.BackgroundColor;
break; break;
@@ -243,8 +240,7 @@ namespace Filtration.Parser.Services
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new BorderColorBlockItem(); var blockItem = new BorderColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
block.BlockItems.Add(blockItem); block.BlockItems.Add(blockItem);
themeComponentType = (int)ThemeComponentType.BorderColor; themeComponentType = (int)ThemeComponentType.BorderColor;
break; break;
@@ -276,16 +272,8 @@ namespace Filtration.Parser.Services
if (match.Success) if (match.Success)
{ {
string firstValue = match.Groups[1].Value; string firstValue = match.Groups[1].Value;
int secondValue;
if (match.Groups[2].Success) var secondValue = match.Groups[2].Success ? Convert.ToInt16(match.Groups[2].Value) : 79;
{
secondValue = Convert.ToInt16(match.Groups[2].Value);
}
else
{
secondValue = 79;
}
if (lineOption == "PlayAlertSound") if (lineOption == "PlayAlertSound")
{ {
@@ -351,15 +339,15 @@ namespace Filtration.Parser.Services
{ {
var blockItemValue = new MapIconBlockItem var blockItemValue = new MapIconBlockItem
{ {
Size = (IconSize)Int16.Parse(match.Groups[1].Value), Size = (IconSize)short.Parse(match.Groups[1].Value),
Color = EnumHelper.GetEnumValueFromDescription<IconColor>(match.Groups[2].Value), Color = EnumHelper.GetEnumValueFromDescription<IconColor>(match.Groups[2].Value),
Shape = EnumHelper.GetEnumValueFromDescription<IconShape>(match.Groups[3].Value) Shape = EnumHelper.GetEnumValueFromDescription<IconShape>(match.Groups[3].Value)
}; };
var themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.Icon, match.Groups[5].Value.Trim(),
blockItemValue.Size, blockItemValue.Color, blockItemValue.Shape);
if(match.Groups[4].Value == "#" && !string.IsNullOrWhiteSpace(match.Groups[5].Value)) if(match.Groups[4].Value == "#" && !string.IsNullOrWhiteSpace(match.Groups[5].Value))
{ {
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.Icon, match.Groups[5].Value.Trim(),
blockItemValue.Size, blockItemValue.Color, blockItemValue.Shape);
blockItemValue.ThemeComponent = themeComponent; blockItemValue.ThemeComponent = themeComponent;
} }
block.BlockItems.Add(blockItemValue); block.BlockItems.Add(blockItemValue);
@@ -394,7 +382,7 @@ namespace Filtration.Parser.Services
RemoveExistingBlockItemsOfType<SoundBlockItem>(block); RemoveExistingBlockItemsOfType<SoundBlockItem>(block);
RemoveExistingBlockItemsOfType<PositionalSoundBlockItem>(block); RemoveExistingBlockItemsOfType<PositionalSoundBlockItem>(block);
var match = Regex.Match(trimmedLine, @"\S+\s+""(\S+)"""); var match = Regex.Match(trimmedLine, @"\S+\s+""([^\*\<\>\?|]+)""");
if (match.Success) if (match.Success)
{ {
@@ -416,8 +404,7 @@ namespace Filtration.Parser.Services
if (!string.IsNullOrWhiteSpace(blockComment) && block.BlockItems.Count > 1) if (!string.IsNullOrWhiteSpace(blockComment) && block.BlockItems.Count > 1)
{ {
var blockItemWithTheme = block.BlockItems.Last() as IBlockItemWithTheme; if(!(block.BlockItems.Last() is IBlockItemWithTheme blockItemWithTheme))
if(blockItemWithTheme == null)
{ {
block.BlockItems.Last().Comment = blockComment; block.BlockItems.Last().Comment = blockComment;
} }
@@ -427,11 +414,11 @@ namespace Filtration.Parser.Services
{ {
case ThemeComponentType.AlertSound: case ThemeComponentType.AlertSound:
{ {
ThemeComponent themeComponent = null; ThemeComponent themeComponent;
if(blockItemWithTheme is SoundBlockItem) if(blockItemWithTheme is SoundBlockItem item)
{ {
themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.AlertSound, blockComment.Trim(), themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.AlertSound, blockComment.Trim(),
((SoundBlockItem)blockItemWithTheme).Value, ((SoundBlockItem)blockItemWithTheme).SecondValue); item.Value, item.SecondValue);
} }
else else
{ {
@@ -598,8 +585,7 @@ namespace Filtration.Parser.Services
{ {
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new TextColorBlockItem(); var blockItem = new TextColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment)) if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment))
{ {
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.TextColor, ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.TextColor,
@@ -613,8 +599,7 @@ namespace Filtration.Parser.Services
{ {
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new BackgroundColorBlockItem(); var blockItem = new BackgroundColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment)) if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment))
{ {
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.BackgroundColor, ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.BackgroundColor,
@@ -628,8 +613,7 @@ namespace Filtration.Parser.Services
{ {
var result = Regex.Matches(trimmedLine, @"([\w\s]*)"); var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
var blockItem = new BorderColorBlockItem(); var blockItem = new BorderColorBlockItem {Color = GetColorFromString(result[0].Groups[1].Value)};
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment)) if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment))
{ {
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.BorderColor, ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.BorderColor,

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="3.4.0" targetFramework="net461" /> <package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -31,25 +34,32 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="FluentAssertions, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="FluentAssertions, Version=5.5.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.dll</HintPath> <HintPath>..\packages\FluentAssertions.5.5.3\lib\net45\FluentAssertions.dll</HintPath>
</Reference> </Reference>
<Reference Include="FluentAssertions.Core, Version=4.19.2.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL"> <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null" />
<HintPath>..\packages\FluentAssertions.4.19.2\lib\net45\FluentAssertions.Core.dll</HintPath> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -66,7 +76,7 @@
<Compile Include="Repositories\TestItemFilterScriptRepository.cs" /> <Compile Include="Repositories\TestItemFilterScriptRepository.cs" />
<Compile Include="Services\TestHTTPService.cs" /> <Compile Include="Services\TestHTTPService.cs" />
<Compile Include="Services\TestItemFilterPersistenceService.cs" /> <Compile Include="Services\TestItemFilterPersistenceService.cs" />
<Compile Include="Services\TestStaticDataService.cs" /> <Compile Include="Services\TestItemFilterScriptDirectoryService.cs" />
<Compile Include="Services\TestUpdateService.cs" /> <Compile Include="Services\TestUpdateService.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -111,6 +121,12 @@
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -60,50 +60,7 @@ namespace Filtration.Tests.Repositories
Func<Task<IItemFilterScriptViewModel>> result = async () => await repository.LoadScriptFromFileAsync(testInputPath); Func<Task<IItemFilterScriptViewModel>> result = async () => await repository.LoadScriptFromFileAsync(testInputPath);
// Assert // Assert
result.ShouldThrow<IOException>(); result.Should().Throw<IOException>();
}
[Test]
public void SetItemFilterScriptDirectory_CallsPersistenceServiceSetItemFilterScriptDirectory()
{
// Arrange
var testInputPath = "C:\\Test\\Path";
var mockPersistenceService = new Mock<IItemFilterPersistenceService>();
mockPersistenceService.Setup(p => p.SetItemFilterScriptDirectory(testInputPath)).Verifiable();
var mockItemFilterScriptViewModelFactory = new Mock<IItemFilterScriptViewModelFactory>();
var repository = CreateItemFilterScriptRepository(itemFilterPersistenceService: mockPersistenceService.Object,
itemFilterScriptViewModelFactory: mockItemFilterScriptViewModelFactory.Object);
// Act
repository.SetItemFilterScriptDirectory(testInputPath);
// Assert
mockPersistenceService.Verify();
}
[Test]
public void GetItemFilterScriptDirectory_ReturnsItemFilterScriptDirectoryFromPersistenceService()
{
// Arrange
var testInputPath = "C:\\Test\\Path";
var mockPersistenceService = new Mock<IItemFilterPersistenceService>();
mockPersistenceService.SetupGet(p => p.ItemFilterScriptDirectory).Returns(testInputPath).Verifiable();
var mockItemFilterScriptViewModelFactory = new Mock<IItemFilterScriptViewModelFactory>();
var repository = CreateItemFilterScriptRepository(itemFilterPersistenceService: mockPersistenceService.Object,
itemFilterScriptViewModelFactory: mockItemFilterScriptViewModelFactory.Object);
// Act
string result = repository.GetItemFilterScriptDirectory();
// Assert
mockPersistenceService.Verify();
Assert.AreEqual(result, testInputPath);
} }
[Test] [Test]

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Filtration.Common.Services;
using Filtration.Services;
using Microsoft.WindowsAPICodePack.Dialogs;
using Moq;
using NUnit.Framework;
namespace Filtration.Tests.Services
{
[TestFixture]
public class TestItemFilterScriptDirectoryService
{
[Test]
public void PromptForFilterScriptDirectoryIfRequired_ItemFilterScriptDirectoryNotNull_DoesNotSetItemFilterScriptDirectory()
{
//Arrange
var mockItemFilterPersistenceService = new Mock<IItemFilterPersistenceService>();
mockItemFilterPersistenceService.Setup(i => i.ItemFilterScriptDirectory)
.Returns("testdir");
var service = CreateItemFilterScriptDirectoryService(itemFilterPersistenceService: mockItemFilterPersistenceService.Object);
//Act
service.PromptForFilterScriptDirectoryIfRequired();
//Assert
mockItemFilterPersistenceService.Verify(i => i.SetItemFilterScriptDirectory(It.IsAny<string>()), Times.Never);
}
[Test]
public void PromptForFilterScriptDirectoryIfRequired_NotSet_DefaultDirectoryExists_SetsDirectoryToDefaultDirectory()
{
//Arrange
var mockItemFilterPersistenceService = new Mock<IItemFilterPersistenceService>();
var testInputDefaultDirectory = "testdefaultdirectory";
mockItemFilterPersistenceService.Setup(i => i.DefaultPathOfExileDirectory())
.Returns(testInputDefaultDirectory);
var mockFileSystemService = new Mock<IFileSystemService>();
mockFileSystemService.Setup(f => f.DirectoryExists(testInputDefaultDirectory))
.Returns(true);
var service = CreateItemFilterScriptDirectoryService(fileSystemService: mockFileSystemService.Object,
itemFilterPersistenceService: mockItemFilterPersistenceService.Object);
//Act
service.PromptForFilterScriptDirectoryIfRequired();
//Assert
mockItemFilterPersistenceService.Verify(i => i.SetItemFilterScriptDirectory(testInputDefaultDirectory));
}
[Test, Timeout(1000)]
public void PromptForFilterScriptDirectoryIfRequired_NotSet_DefaultDirectoryDoesNotExist_SetsDirectoryToUserSelected()
{
//Arrange
var testInputUserSelectedDirectory = "blah";
var mockItemFilterPersistenceService = new Mock<IItemFilterPersistenceService>();
var mockDialogService = new Mock<IDialogService>();
mockDialogService.Setup(d => d.ShowFolderPickerDialog(It.IsAny<string>(), out testInputUserSelectedDirectory))
.Returns(CommonFileDialogResult.Ok);
mockItemFilterPersistenceService.Setup(i => i.SetItemFilterScriptDirectory(testInputUserSelectedDirectory))
.Callback(() => mockItemFilterPersistenceService.Setup(f => f.ItemFilterScriptDirectory)
.Returns(testInputUserSelectedDirectory));
var service = CreateItemFilterScriptDirectoryService(dialogService: mockDialogService.Object,
itemFilterPersistenceService: mockItemFilterPersistenceService.Object);
//Act
service.PromptForFilterScriptDirectoryIfRequired();
//Assert
mockItemFilterPersistenceService.Verify(i => i.SetItemFilterScriptDirectory(testInputUserSelectedDirectory));
}
private ItemFilterScriptDirectoryService CreateItemFilterScriptDirectoryService(IDialogService dialogService = null,
IFileSystemService fileSystemService = null,
IItemFilterPersistenceService itemFilterPersistenceService = null,
IMessageBoxService messageBoxService = null)
{
return new ItemFilterScriptDirectoryService(dialogService ?? new Mock<IDialogService>().Object,
fileSystemService ?? new Mock<IFileSystemService>().Object,
itemFilterPersistenceService ?? new Mock<IItemFilterPersistenceService>().Object,
messageBoxService ?? new Mock<IMessageBoxService>().Object);
}
}
}

View File

@@ -1,44 +0,0 @@
using Filtration.Common.Services;
using Filtration.Services;
using Moq;
using NUnit.Framework;
namespace Filtration.Tests.Services
{
[TestFixture]
public class TestStaticDataService
{
[Test]
public void Constructor_CallsFileSystemService()
{
// Arrange
var mockFileSystemService = new Mock<IFileSystemService>();
mockFileSystemService.Setup(f => f.ReadFileAsString(It.IsAny<string>())).Returns("TestResult").Verifiable();
var service = new StaticDataService(mockFileSystemService.Object);
// Act
// Assert
mockFileSystemService.Verify();
}
[Ignore("Integration Test")]
[Test]
public void Constructor_ReadsFromFileCorrectly()
{
// Arrange
var fileSystemService = new FileSystemService();
var service = new StaticDataService(fileSystemService);
// Act
// Assert
}
}
}

View File

@@ -4,12 +4,40 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" /> <assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="ControlzEx" publicKeyToken="f08b075e934b7045" culture="neutral" /> <assemblyIdentity name="ControlzEx" publicKeyToken="f08b075e934b7045" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" /> <bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Xceed.Wpf.Toolkit" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>

View File

@@ -1,7 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="FluentAssertions" version="4.19.2" targetFramework="net461" /> <package id="FluentAssertions" version="5.5.3" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,6 +13,8 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -31,19 +34,28 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Moq, Version=4.5.30.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL"> <Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.5.30\lib\net45\Moq.dll</HintPath> <HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference> </Reference>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath> <HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
@@ -71,12 +83,19 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Castle.Core" version="3.3.3" targetFramework="net461" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Moq" version="4.5.30" targetFramework="net461" /> <package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.6.1" targetFramework="net461" /> <package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -31,43 +31,48 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AutoMapper, Version=6.0.2.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL"> <Reference Include="AutoMapper, Version=8.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.6.0.2\lib\net45\AutoMapper.dll</HintPath> <HintPath>..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Practices.ServiceLocation"> <Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.9\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
@@ -76,29 +81,23 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.DataGrid, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.DataGrid, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.Toolkit, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -156,6 +155,7 @@
</Page> </Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="AutoMapper" version="6.0.2" targetFramework="net461" /> <package id="AutoMapper" version="8.0.0" targetFramework="net461" />
<package id="Castle.Core" version="3.3.3" targetFramework="net451" /> <package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="3.4.0" targetFramework="net461" /> <package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" /> <package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="Extended.Wpf.Toolkit" version="2.9" targetFramework="net461" /> <package id="Extended.Wpf.Toolkit" version="3.4.0" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
<package id="NLog" version="4.4.9" targetFramework="net461" /> <package id="NLog" version="4.5.11" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages> </packages>

View File

@@ -55,20 +55,27 @@
<setting name="WindowHeight" serializeAs="String"> <setting name="WindowHeight" serializeAs="String">
<value>800</value> <value>800</value>
</setting> </setting>
<setting name="LastActiveDocument" serializeAs="String"> <setting name="LastOpenScripts" serializeAs="String">
<value /> <value />
</setting> </setting>
<setting name="BlocksExpandedOnOpen" serializeAs="String">
<value>True</value>
</setting>
</Filtration.Properties.Settings> </Filtration.Properties.Settings>
</userSettings> </userSettings>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" /> <assemblyIdentity name="Xceed.Wpf.AvalonDock" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.9.0.0" newVersion="2.9.0.0" /> <bindingRedirect oldVersion="0.0.0.0-3.4.0.0" newVersion="3.4.0.0" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="ControlzEx" publicKeyToken="f08b075e934b7045" culture="neutral" /> <assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" /> <bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>

View File

@@ -11,7 +11,7 @@
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />--> <!--<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/windows8/Generic.xaml" />--> <!--<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/windows8/Generic.xaml" />-->
<!--<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/windows8/silver.xaml" />--> <!--<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/windows8/silver.xaml" />-->
<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2013/Generic.xaml" /> <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />
<ResourceDictionary Source="Views/Styles/Colours.xaml" /> <ResourceDictionary Source="Views/Styles/Colours.xaml" />
<ResourceDictionary Source="Views/Styles/CheckBox.xaml" /> <ResourceDictionary Source="Views/Styles/CheckBox.xaml" />
<ResourceDictionary Source="Views/Styles/ListBoxItem.xaml" /> <ResourceDictionary Source="Views/Styles/ListBoxItem.xaml" />

View File

@@ -43,7 +43,7 @@ namespace Filtration
cfg.CreateMap<StringThemeComponent, StringThemeComponentViewModel>().ReverseMap(); cfg.CreateMap<StringThemeComponent, StringThemeComponentViewModel>().ReverseMap();
cfg.CreateMap<IconThemeComponent, IconThemeComponentViewModel>().ReverseMap(); cfg.CreateMap<IconThemeComponent, IconThemeComponentViewModel>().ReverseMap();
cfg.CreateMap<EffectColorThemeComponent, EffectColorThemeComponentViewModel>().ReverseMap(); cfg.CreateMap<EffectColorThemeComponent, EffectColorThemeComponentViewModel>().ReverseMap();
cfg.CreateMap<IThemeEditorViewModel, Theme>(); cfg.CreateMap<ThemeEditorViewModel, Theme>();
}); });
Mapper.AssertConfigurationIsValid(); Mapper.AssertConfigurationIsValid();

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Filtration.Enums
{
internal enum UpdateSource
{
GitHub,
Local
}
}

View File

@@ -52,18 +52,20 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="AutoMapper, Version=6.0.2.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL"> <Reference Include="AutoMapper, Version=8.0.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<HintPath>..\packages\AutoMapper.6.0.2\lib\net45\AutoMapper.dll</HintPath> <HintPath>..\packages\AutoMapper.8.0.0\lib\net461\AutoMapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.4.1.1\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="ControlzEx, Version=2.2.0.4, Culture=neutral, PublicKeyToken=f08b075e934b7045, processorArchitecture=MSIL"> <Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.2.2.0.4\lib\net45\ControlzEx.dll</HintPath> <HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
</Reference> </Reference>
<Reference Include="DeltaCompressionDotNet, Version=1.1.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL"> <Reference Include="DeltaCompressionDotNet, Version=1.1.0.0, Culture=neutral, PublicKeyToken=1d14d6e5194e7f4a, processorArchitecture=MSIL">
<HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll</HintPath> <HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.dll</HintPath>
@@ -74,25 +76,23 @@
<Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL"> <Reference Include="DeltaCompressionDotNet.PatchApi, Version=1.1.0.0, Culture=neutral, PublicKeyToken=3e8888ee913ed789, processorArchitecture=MSIL">
<HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll</HintPath> <HintPath>..\packages\DeltaCompressionDotNet.1.1.0\lib\net20\DeltaCompressionDotNet.PatchApi.dll</HintPath>
</Reference> </Reference>
<Reference Include="Fluent, Version=4.0.3.394, Culture=neutral, PublicKeyToken=3e436e32a8c5546f, processorArchitecture=MSIL"> <Reference Include="DynamicData, Version=6.7.0.2529, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Fluent.Ribbon.4.0.3.394\lib\net45\Fluent.dll</HintPath> <HintPath>..\packages\DynamicData.6.7.0.2529\lib\net46\DynamicData.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL"> <Reference Include="Fluent, Version=6.1.0.326, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath> <HintPath>..\packages\Fluent.Ribbon.6.1.0.326\lib\net45\Fluent.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL"> <Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath> <HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
<Private>True</Private> </Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference> </Reference>
<Reference Include="MahApps.Metro, Version=1.2.4.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL"> <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> <HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\MahApps.Metro.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
@@ -114,10 +114,10 @@
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll</HintPath> <HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.Rocks.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.4.9\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.5.11\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="NuGet.Squirrel, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\squirrel.windows.1.8.0\lib\Net45\NuGet.Squirrel.dll</HintPath> <HintPath>..\packages\squirrel.windows.1.9.0\lib\Net45\NuGet.Squirrel.dll</HintPath>
</Reference> </Reference>
<Reference Include="SharpCompress, Version=0.17.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL"> <Reference Include="SharpCompress, Version=0.17.1.0, Culture=neutral, PublicKeyToken=afb0a02973931d96, processorArchitecture=MSIL">
<HintPath>..\packages\SharpCompress.0.17.1\lib\net45\SharpCompress.dll</HintPath> <HintPath>..\packages\SharpCompress.0.17.1\lib\net45\SharpCompress.dll</HintPath>
@@ -125,12 +125,26 @@
<Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath> <HintPath>..\packages\Splat.1.6.2\lib\Net45\Splat.dll</HintPath>
</Reference> </Reference>
<Reference Include="Squirrel, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Squirrel, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\squirrel.windows.1.8.0\lib\Net45\Squirrel.dll</HintPath> <HintPath>..\packages\squirrel.windows.1.9.0\lib\Net45\Squirrel.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Reactive, Version=4.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reactive.4.0.0\lib\net46\System.Reactive.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows" />
<Reference Include="System.Windows.Controls.Input.Toolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Controls.Input.Toolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\System.Windows.Controls.Input.Toolkit.dll</HintPath> <HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\System.Windows.Controls.Input.Toolkit.dll</HintPath>
@@ -141,7 +155,7 @@
</Reference> </Reference>
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\ControlzEx.2.2.0.4\lib\net45\System.Windows.Interactivity.dll</HintPath> <HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -152,37 +166,34 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="WpfAnimatedGif, Version=1.4.14.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="WpfAnimatedGif, Version=1.4.17.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WpfAnimatedGif.1.4.14\lib\net\WpfAnimatedGif.dll</HintPath> <HintPath>..\packages\WpfAnimatedGif.1.4.17\lib\net\WpfAnimatedGif.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="WPFToolkit, Version=3.5.40128.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\WPFToolkit.dll</HintPath> <HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\WPFToolkit.dll</HintPath>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.Aero, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Aero.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.Metro, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.Metro.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2010, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.AvalonDock.Themes.VS2010.dll</HintPath>
<Private>True</Private>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2013, Version=2.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.AvalonDock.Themes.VS2013, Version=2.0.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>libs\Xceed.Wpf.AvalonDock.Themes.VS2013.dll</HintPath> <HintPath>libs\Xceed.Wpf.AvalonDock.Themes.VS2013.dll</HintPath>
</Reference> </Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=2.9.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL"> <Reference Include="Xceed.Wpf.DataGrid, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.2.9\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath> <HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.DataGrid.dll</HintPath>
<Private>True</Private> </Reference>
<Reference Include="Xceed.Wpf.Toolkit, Version=3.4.0.0, Culture=neutral, PublicKeyToken=3e4669d2f30244f4, processorArchitecture=MSIL">
<HintPath>..\packages\Extended.Wpf.Toolkit.3.4.0\lib\net40\Xceed.Wpf.Toolkit.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -203,13 +214,17 @@
<Compile Include="Converters\HashSignRemovalConverter.cs" /> <Compile Include="Converters\HashSignRemovalConverter.cs" />
<Compile Include="Converters\ItemRarityConverter.cs" /> <Compile Include="Converters\ItemRarityConverter.cs" />
<Compile Include="Converters\TreeViewMarginConverter.cs" /> <Compile Include="Converters\TreeViewMarginConverter.cs" />
<Compile Include="Enums\UpdateSource.cs" />
<Compile Include="Models\UpdateData.cs" /> <Compile Include="Models\UpdateData.cs" />
<Compile Include="Properties\Annotations.cs" /> <Compile Include="Properties\Annotations.cs" />
<Compile Include="Repositories\ItemFilterScriptRepository.cs" /> <Compile Include="Repositories\ItemFilterScriptRepository.cs" />
<Compile Include="Services\Bootstrapper.cs" /> <Compile Include="Services\Bootstrapper.cs" />
<Compile Include="Services\ClipboardService.cs" /> <Compile Include="Services\ClipboardService.cs" />
<Compile Include="Services\DialogService.cs" />
<Compile Include="Services\HTTPService.cs" /> <Compile Include="Services\HTTPService.cs" />
<Compile Include="Services\ItemFilterPersistenceService.cs" /> <Compile Include="Services\ItemFilterPersistenceService.cs" />
<Compile Include="Services\ItemFilterScriptDirectoryService.cs" />
<Compile Include="Services\ScriptLoadingService.cs" />
<Compile Include="Services\SettingsService.cs" /> <Compile Include="Services\SettingsService.cs" />
<Compile Include="Services\StaticDataService.cs" /> <Compile Include="Services\StaticDataService.cs" />
<Compile Include="Services\UpdateService.cs" /> <Compile Include="Services\UpdateService.cs" />
@@ -223,12 +238,16 @@
<Compile Include="UserControls\EditableListBoxControl.xaml.cs"> <Compile Include="UserControls\EditableListBoxControl.xaml.cs">
<DependentUpon>EditableListBoxControl.xaml</DependentUpon> <DependentUpon>EditableListBoxControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="UserControls\EnableDisableToggleButton.xaml.cs">
<DependentUpon>EnableDisableToggleButton.xaml</DependentUpon>
</Compile>
<Compile Include="UserControls\ItemPreviewControl.xaml.cs"> <Compile Include="UserControls\ItemPreviewControl.xaml.cs">
<DependentUpon>ItemPreviewControl.xaml</DependentUpon> <DependentUpon>ItemPreviewControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="UserControls\ThemeComponentSelectionControl.xaml.cs"> <Compile Include="UserControls\ThemeComponentSelectionControl.xaml.cs">
<DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon> <DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="ViewModels\DesignTime\DesignTimeItemFilterBlockViewModel.cs" />
<Compile Include="ViewModels\DesignTime\DesignTimeSettingsPageViewModel.cs" /> <Compile Include="ViewModels\DesignTime\DesignTimeSettingsPageViewModel.cs" />
<Compile Include="Views\AttachedProperties\SelectedItemsAttachedProperty.cs" /> <Compile Include="Views\AttachedProperties\SelectedItemsAttachedProperty.cs" />
<Compile Include="Utility\RoutedCommandHandler.cs" /> <Compile Include="Utility\RoutedCommandHandler.cs" />
@@ -267,6 +286,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="UserControls\EnableDisableToggleButton.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UserControls\ThemeComponentSelectionControl.xaml"> <Page Include="UserControls\ThemeComponentSelectionControl.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -438,6 +461,7 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<EmbeddedResource Include="Resources\ItemMods.txt" />
<Resource Include="Resources\loading_spinner.gif" /> <Resource Include="Resources\loading_spinner.gif" />
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
@@ -586,8 +610,8 @@
<Content Include="Resources\AlertSounds\SH22Vaal.mp3"> <Content Include="Resources\AlertSounds\SH22Vaal.mp3">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Resources\ItemBaseTypes.txt" /> <EmbeddedResource Include="Resources\ItemBaseTypes.txt" />
<Content Include="Resources\ItemClasses.txt" /> <EmbeddedResource Include="Resources\ItemClasses.txt" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Filtration.Common\Filtration.Common.csproj"> <ProjectReference Include="..\Filtration.Common\Filtration.Common.csproj">

View File

@@ -9,7 +9,18 @@
<description>A Path of Exile loot filter script editor</description> <description>A Path of Exile loot filter script editor</description>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <requireLicenseAcceptance>false</requireLicenseAcceptance>
<copyright>Copyright 2018</copyright> <copyright>Copyright 2018</copyright>
<releaseNotes>The release notes for 1.0.0 have not been written yet!</releaseNotes> <releaseNotes>* All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95)
* Filter sections are once again now expanded by default when scripts are opened, unless the new "Auto-expand all sections when opening scripts" setting is disabled
* A new Clear Styles button has been added which removes all styles from the selected block (#96)
* The Enable/Disable Block toggle button is now visible on both the Regular Block Items and Appearance Block Items views
* When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear
* Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed
* Fixed the Switch to Appearance/Regular Block Items text overlapping block items
* Fixed theme saving (blank theme files were being saved) (#83)
* Fixed checkboxes in Block Group Browser (#97)
* Fixed the Select Path of Exile data directory dialog appearing after every upgrade (#94)
* Fixed an issue where custom sounds were only populated from the default Path of Exile data directory rather than the configured directory
* Clean installs no longer prompt to select the Path of Exile data directory if the default directory exists</releaseNotes>
<dependencies /> <dependencies />
</metadata> </metadata>
<files> <files>

File diff suppressed because it is too large Load Diff

View File

@@ -10,8 +10,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.0")] [assembly: AssemblyVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.0.0-beta1")] [assembly: AssemblyInformationalVersion("1.1.0-beta3")]
[assembly: InternalsVisibleTo("Filtration.Tests")] [assembly: InternalsVisibleTo("Filtration.Tests")]
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")] [assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]

View File

@@ -224,6 +224,164 @@ namespace Filtration.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to A Mother&apos;s Parting Gift
///Abandoned Wealth
///Aberrant Fossil
///Abyssal Axe
///Abyssal Cry
///Abyssal Sceptre
///Academy Map
///Acid Lakes Map
///Added Chaos Damage Support
///Added Cold Damage Support
///Added Fire Damage Support
///Added Lightning Damage Support
///Additional Accuracy Support
///Aetheric Fossil
///Agate Amulet
///Albino Rhoa Feather
///Alchemy Shard
///Alder Spiked Shield
///Alira&apos;s Amulet
///Alleyways Map
///Allflame
///Alloyed Spiked Shield
///Alteration Shard
///Amber Amulet
///Ambush Boots
///Ambush Leaguestone
///Ambush Mitts
///Ambusher
///Amethyst Flask
///Amethyst [rest of string was truncated]&quot;;.
/// </summary>
internal static string ItemBaseTypes {
get {
return ResourceManager.GetString("ItemBaseTypes", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Abyss Jewel
///Active Skill Gems
///Amulets
///Axe
///Belts
///Body Armours
///Boots
///Bows
///Claws
///Currency
///Daggers
///Delve Socketable Currency
///Divination Card
///Fishing Rods
///Flasks
///Gems
///Gloves
///Helmets
///Hybrid Flasks
///Incursion Item
///Jewel
///Labyrinth Item
///Labyrinth Map Item
///Labyrinth Trinket
///Large Relics
///Leaguestone
///Life Flasks
///Mace
///Mana Flasks
///Map Fragments
///Maps
///Misc Map Items
///One Hand Axes
///One Hand Maces
///One Hand Swords
///Pantheon Soul
///Piece
///Quest Items
///Quivers
///Rings
///Sceptres
///Shields
///Stackable Currency
///Staves
///Support Skill Gems
///Sword
///T [rest of string was truncated]&quot;;.
/// </summary>
internal static string ItemClasses {
get {
return ResourceManager.GetString("ItemClasses", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Abbot&apos;s
///Abhorrent
///Acrobat&apos;s
///Adept&apos;s
///Agile
///Alchemist&apos;s
///Alluring
///Alpine
///Ample
///Anarchic
///Anarchist&apos;s
///Annealed
///Antagonist&apos;s
///Apprentice&apos;s
///Aqua
///Archmage&apos;s
///Arcing
///Arctic
///Armadillo&apos;s
///Arming
///Armoured
///Athlete&apos;s
///Avalanching
///Avenger&apos;s
///Azure
///Bandit&apos;s
///Barbed
///Battlemage&apos;s
///Beating
///Beautiful
///Beetle&apos;s
///Beryl
///Betrayer&apos;s
///Bipedal
///Biting
///Bitter
///Blasting
///Blazing
///Blistering
///Bloodthirsty
///Blue
///Blunt
///Blurred
///Boggart&apos;s
///Bolting
///Brawler&apos;s
///Breathtaking
///Brinerot
///Brutal
///Bubbling
///Burning
///Burnished
///Butterfly&apos;s
///Buttressed
///Buzzing
///Calming
///Capric [rest of string was truncated]&quot;;.
/// </summary>
internal static string ItemMods {
get {
return ResourceManager.GetString("ItemMods", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>

View File

@@ -202,4 +202,13 @@
<data name="SH22Vaal" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="SH22Vaal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Vaal.mp3;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\SH22Vaal.mp3;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="ItemBaseTypes" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ItemBaseTypes.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="ItemClasses" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ItemClasses.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="ItemMods" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ItemMods.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root> </root>

View File

@@ -12,7 +12,7 @@ namespace Filtration.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -221,12 +221,24 @@ namespace Filtration.Properties {
[global::System.Configuration.UserScopedSettingAttribute()] [global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")] [global::System.Configuration.DefaultSettingValueAttribute("")]
public string LastActiveDocument { public string LastOpenScripts {
get { get {
return ((string)(this["LastActiveDocument"])); return ((string)(this["LastOpenScripts"]));
} }
set { set {
this["LastActiveDocument"] = value; this["LastOpenScripts"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool BlocksExpandedOnOpen {
get {
return ((bool)(this["BlocksExpandedOnOpen"]));
}
set {
this["BlocksExpandedOnOpen"] = value;
} }
} }
} }

View File

@@ -53,8 +53,11 @@
<Setting Name="WindowHeight" Type="System.Int32" Scope="User"> <Setting Name="WindowHeight" Type="System.Int32" Scope="User">
<Value Profile="(Default)">800</Value> <Value Profile="(Default)">800</Value>
</Setting> </Setting>
<Setting Name="LastActiveDocument" Type="System.String" Scope="User"> <Setting Name="LastOpenScripts" Type="System.String" Scope="User">
<Value Profile="(Default)" /> <Value Profile="(Default)" />
</Setting> </Setting>
<Setting Name="BlocksExpandedOnOpen" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@@ -1,5 +1,4 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using Filtration.ObjectModel;
using Filtration.ObjectModel.Factories; using Filtration.ObjectModel.Factories;
using Filtration.Services; using Filtration.Services;
using Filtration.ViewModels; using Filtration.ViewModels;
@@ -11,8 +10,6 @@ namespace Filtration.Repositories
{ {
Task<IItemFilterScriptViewModel> LoadScriptFromFileAsync(string path); Task<IItemFilterScriptViewModel> LoadScriptFromFileAsync(string path);
IItemFilterScriptViewModel NewScript(); IItemFilterScriptViewModel NewScript();
string GetItemFilterScriptDirectory();
void SetItemFilterScriptDirectory(string path);
} }
internal class ItemFilterScriptRepository : IItemFilterScriptRepository internal class ItemFilterScriptRepository : IItemFilterScriptRepository
@@ -48,15 +45,6 @@ namespace Filtration.Repositories
return newViewModel; return newViewModel;
} }
public void SetItemFilterScriptDirectory(string path)
{
_itemFilterPersistenceService.SetItemFilterScriptDirectory(path);
}
public string GetItemFilterScriptDirectory()
{
return _itemFilterPersistenceService.ItemFilterScriptDirectory;
}
} }
} }
;

View File

@@ -11,6 +11,7 @@ Added Cold Damage Support
Added Fire Damage Support Added Fire Damage Support
Added Lightning Damage Support Added Lightning Damage Support
Additional Accuracy Support Additional Accuracy Support
Advanced Traps Support
Aetheric Fossil Aetheric Fossil
Agate Amulet Agate Amulet
Albino Rhoa Feather Albino Rhoa Feather
@@ -64,6 +65,7 @@ Arcane Surge Support
Arcanist Gloves Arcanist Gloves
Arcanist Slippers Arcanist Slippers
Archon Kite Shield Archon Kite Shield
Archon Kite Shield Piece
Arctic Armour Arctic Armour
Arctic Breath Arctic Breath
Arena Map Arena Map
@@ -87,6 +89,7 @@ Atziri's Arsenal
Audacity Audacity
Auric Mace Auric Mace
Aventail Helmet Aventail Helmet
Avian Slippers
Avian Twins Talisman Avian Twins Talisman
Awl Awl
Baleful Gem Baleful Gem
@@ -154,6 +157,7 @@ Bloodlust Support
Bloodstained Fossil Bloodstained Fossil
Blue Pearl Amulet Blue Pearl Amulet
Blunt Arrow Quiver Blunt Arrow Quiver
Blunt Arrow Quiver Piece
Boarding Axe Boarding Axe
Bodyswap Bodyswap
Bog Map Bog Map
@@ -207,7 +211,28 @@ Caldera Map
Calendar of Fortune Calendar of Fortune
Call to the First Ones Call to the First Ones
Callous Mask Callous Mask
Callous Mask Piece
Canyon Map Canyon Map
Captured Soul
Captured Soul of Arachnoxia
Captured Soul of Armala, the Widow
Captured Soul of Drek, Apex Hunter
Captured Soul of Erebix, Light's Bane
Captured Soul of Gorulis, Will-Thief
Captured Soul of Jorus, Sky's Edge
Captured Soul of Lycius, Midnight's Howl
Captured Soul of Mephod, the Earth Scorcher
Captured Soul of Nassar, Lion of the Seas
Captured Soul of Puruna, the Challenger
Captured Soul of Sebbert, Crescent's Point
Captured Soul of Shadow of the Vaal
Captured Soul of Shock and Horror
Captured Soul of Stalker of the Endless Dunes
Captured Soul of Suncaller Asha
Captured Soul of Terror of the Infinite Drifts
Captured Soul of The Forgotten Soldier
Captured Soul of Thraxia
Captured Soul of Varhesh, Shimmering Aberration
Carcass Map Carcass Map
Cardinal Round Shield Cardinal Round Shield
Carnal Armour Carnal Armour
@@ -246,11 +271,11 @@ Chainmail Vest
Champion Kite Shield Champion Kite Shield
Chance to Bleed Support Chance to Bleed Support
Chance to Flee Support Chance to Flee Support
Chance to Ignite Support
Channel Map Channel Map
Chaos Orb Chaos Orb
Chaos Shard Chaos Shard
Chaotic Disposition Chaotic Disposition
Charan's Sword
Charged Dash Charged Dash
Charged Traps Support Charged Traps Support
Chateau Map Chateau Map
@@ -271,6 +296,7 @@ Cleave
Cleaver Cleaver
Close Helmet Close Helmet
Cloth Belt Cloth Belt
Cloth Belt Piece
Cluster Traps Support Cluster Traps Support
Clutching Talisman Clutching Talisman
Cobalt Jewel Cobalt Jewel
@@ -287,6 +313,7 @@ Colossal Tower Shield
Colosseum Map Colosseum Map
Colosseum Plate Colosseum Plate
Colossus Mallet Colossus Mallet
Combustion Support
Commander's Brigandine Commander's Brigandine
Composite Bow Composite Bow
Compound Bow Compound Bow
@@ -457,6 +484,7 @@ Eelskin Gloves
Eelskin Tunic Eelskin Tunic
Efficacy Support Efficacy Support
Elder Sword Elder Sword
Elder's Orb
Elegant Foil Elegant Foil
Elegant Ringmail Elegant Ringmail
Elegant Round Shield Elegant Round Shield
@@ -487,10 +515,30 @@ Enlighten Support
Esh's Breachstone Esh's Breachstone
Essence Drain Essence Drain
Essence Leaguestone Essence Leaguestone
Essence of Anger
Essence of Anguish
Essence of Contempt
Essence of Delirium Essence of Delirium
Essence of Doubt
Essence of Dread
Essence of Envy
Essence of Fear
Essence of Greed
Essence of Hatred
Essence of Horror Essence of Horror
Essence of Hysteria Essence of Hysteria
Essence of Insanity Essence of Insanity
Essence of Loathing
Essence of Misery
Essence of Rage
Essence of Scorn
Essence of Sorrow
Essence of Spite
Essence of Suffering
Essence of Torment
Essence of Woe
Essence of Wrath
Essence of Zeal
Estoc Estoc
Estuary Map Estuary Map
Etched Greatsword Etched Greatsword
@@ -673,6 +721,7 @@ Hallowed Life Flask
Hallowed Mana Flask Hallowed Mana Flask
Hammered Buckler Hammered Buckler
Harbinger Bow Harbinger Bow
Harbinger Map
Harbinger's Orb Harbinger's Orb
Harbinger's Shard Harbinger's Shard
Harlequin Mask Harlequin Mask
@@ -740,6 +789,7 @@ Imperial Claw
Imperial Maul Imperial Maul
Imperial Skean Imperial Skean
Imperial Staff Imperial Staff
Imperial Staff Piece
Imprinted Bestiary Orb Imprinted Bestiary Orb
Incinerate Incinerate
Increased Area of Effect Support Increased Area of Effect Support
@@ -831,15 +881,16 @@ Legion Boots
Legion Gloves Legion Gloves
Legion Hammer Legion Hammer
Legion Sword Legion Sword
Legion Sword Piece
Less Duration Support Less Duration Support
Lesser Multiple Projectiles Support Lesser Multiple Projectiles Support
Lesser Poison Support Lesser Poison Support
Leyline Map Leyline Map
Life Gain on Hit Support Life Gain on Hit Support
Life Leech Support Life Leech Support
Light and Truth
Light Brigandine Light Brigandine
Light Quiver Light Quiver
Light and Truth
Lighthouse Map Lighthouse Map
Lightning Arrow Lightning Arrow
Lightning Penetration Support Lightning Penetration Support
@@ -901,6 +952,17 @@ Medium Life Flask
Medium Mana Flask Medium Mana Flask
Melee Physical Damage Support Melee Physical Damage Support
Melee Splash Support Melee Splash Support
Memory Fragment
Memory Fragment I
Memory Fragment II
Memory Fragment III
Memory Fragment IV
Memory Fragment V
Memory Fragment VI
Memory Fragment VII
Memory Fragment VIII
Memory Fragment IX
Memory Fragment X
Merciless Armament Merciless Armament
Mesa Map Mesa Map
Mesh Boots Mesh Boots
@@ -913,14 +975,14 @@ Military Staff
Mind Cage Mind Cage
Minefield Support Minefield Support
Mineral Pools Map Mineral Pools Map
Minion and Totem Elemental Resistance Support
Minion Damage Support Minion Damage Support
Minion Life Support Minion Life Support
Minion Speed Support Minion Speed Support
Minion and Totem Elemental Resistance Support
Mirage Archer Support Mirage Archer Support
Mirror Arrow Mirror Arrow
Mirror of Kalandra
Mirror Shard Mirror Shard
Mirror of Kalandra
Mirrored Spiked Shield Mirrored Spiked Shield
Mitts Mitts
Molten Shell Molten Shell
@@ -1098,9 +1160,9 @@ Quartz Wand
Quicksilver Flask Quicksilver Flask
Quilted Jacket Quilted Jacket
Racecourse Map Racecourse Map
Rain Tempter
Rain of Arrows Rain of Arrows
Rain of Chaos Rain of Chaos
Rain Tempter
Raise Spectre Raise Spectre
Raise Zombie Raise Zombie
Rallying Cry Rallying Cry
@@ -1117,6 +1179,7 @@ Reave
Reaver Axe Reaver Axe
Reaver Helmet Reaver Helmet
Reaver Sword Reaver Sword
Rebirth
Reckoning Reckoning
Recurve Bow Recurve Bow
Reduced Mana Support Reduced Mana Support
@@ -1572,6 +1635,7 @@ The Scavenger
The Scholar The Scholar
The Sephirot The Sephirot
The Shaper's Key The Shaper's Key
The Shaper's Realm
The Sigil The Sigil
The Siren The Siren
The Soul The Soul
@@ -1655,9 +1719,8 @@ Toxic Rain
Toxic Sewer Map Toxic Sewer Map
Tranquillity Tranquillity
Transmutation Shard Transmutation Shard
Trap and Mine Damage Support
Trap Cooldown Support
Trap Support Trap Support
Trap and Mine Damage Support
Trapper Boots Trapper Boots
Trapper Mitts Trapper Mitts
Trarthan Powder Trarthan Powder
@@ -1752,16 +1815,16 @@ Vault Map
Velvet Gloves Velvet Gloves
Velvet Slippers Velvet Slippers
Vengeance Vengeance
Vial Of Power
Vial of Awakening Vial of Awakening
Vial of Consequence Vial of Consequence
Vial of Dominance Vial of Dominance
Vial of Fate Vial of Fate
Vial Of Power
Vial of Sacrifice Vial of Sacrifice
Vial of Summoning Vial of Summoning
Vial of Transcendence
Vial of the Ghost Vial of the Ghost
Vial of the Ritual Vial of the Ritual
Vial of Transcendence
Vicious Projectiles Support Vicious Projectiles Support
Vigilant Strike Vigilant Strike
Vile Staff Vile Staff

View File

@@ -1,7 +1,7 @@
Abyss Jewel Abyss Jewel
Active Skill Gems Active Skill Gems
Amulets Amulets
Axe Axes
Belts Belts
Body Armours Body Armours
Boots Boots
@@ -25,7 +25,7 @@ Labyrinth Trinket
Large Relics Large Relics
Leaguestone Leaguestone
Life Flasks Life Flasks
Mace Maces
Mana Flasks Mana Flasks
Map Fragments Map Fragments
Maps Maps
@@ -43,7 +43,7 @@ Shields
Stackable Currency Stackable Currency
Staves Staves
Support Skill Gems Support Skill Gems
Sword Swords
Thrusting One Hand Swords Thrusting One Hand Swords
Two Hand Axes Two Hand Axes
Two Hand Maces Two Hand Maces

View File

@@ -0,0 +1,786 @@
Abbot's
Abhorrent
Acrobat's
Adept's
Agile
Alchemist's
Alluring
Alpine
Ample
Anarchic
Anarchist's
Annealed
Antagonist's
Apprentice's
Aqua
Archmage's
Arcing
Arctic
Armadillo's
Arming
Armoured
Athlete's
Avalanching
Avenger's
Azure
Bandit's
Barbed
Battlemage's
Beating
Beautiful
Beetle's
Beryl
Betrayer's
Bipedal
Biting
Bitter
Blasting
Blazing
Blistering
Bloodthirsty
Blue
Blunt
Blurred
Boggart's
Bolting
Brawler's
Breathtaking
Brinerot
Brutal
Bubbling
Burning
Burnished
Butterfly's
Buttressed
Buzzing
Calming
Capricious
Captivating
Carapaced
Carved
Caster's
Catalysed
Catalyzing
Caustic
Cauterising
Cautious
Ceremonial
Cerulean
Chaining
Chalybeous
Champion's
Chanter's
Chaotic
Charged
Charging
Cheetah's
Chemist's
Chilled
Chilling
Citaqualotl's
Cleaving
Clouded
Cobalt
Combatant's
Conflagrating
Conqueror's
Corrupted
Coursing
Crab's
Crackling
Cremating
Crocodile's
Cruel
Cryomancer's
Cryomantic
Crystalline
Dancer's
Darkened
Dauntless
Dazzling
Deadly
Deafening
Deceiver's
Deflecting
Degenerative
Demonic
Devastating
Dictator's
Discharging
Dissipating
Djinn's
Dragon's
Dragonfly's
Duelist's
Eldritch
Electrocuting
Electromantic
Elephant's
Emanant
Emperor's
Empowered
Empowering
Encased
Energetic
Energising
Enlightened
Entombing
Enveloped
Ephemeral
Esh's
Ethereal
Evanescent
Evasive
Exarch's
Exemplary
Experimenter's
Exuberant
Fawn's
Fearless
Feasting
Fecund
Fencer's
Fencing
Feral
Fevered
Fierce
Filigree
Flame Spinner's
Flaming
Flanking
Flaring
Flawless
Flea's
Fleet
Fletcher's
Fortified
Freezing
Frigid
Frost Weaver's
Frosted
Frozen
Fuelling
Gazelle's
Gentian
Ghost's
Girded
Glaciated
Gladiator's
Gleaming
Glimmering
Glinting
Glittering
Glowing
Glyphic
Gremlin's
Grounded
Guatelitzi's
Hailing
Hale
Halting
Harming
Harmonic
Haunting
Healthy
Heated
Heavy
Hellion's
Hero's
Hexproof
Hexwarded
Hissing
Honed
Humming
Hummingbird's
Ibex's
Icy
Illusion's
Illusory
Impenetrable
Impervious
Impregnable
Incandescent
Incanter's
Incinerating
Incombustible
Incorporeal
Inculcated
Indomitable
Infernal
Infixed
Infused
Infusing
Ingrained
Inspirational
Inspired
Inspiring
Instilled
Interpermeated
Interpolated
Ionising
Jagged
Jinxing
Journeyman's
Judging
Lacquered
Lamprey's
Lava Caller's
Layered
Leadership
Legend's
Lethal
Lich's
Lively
Lobstered
Lunar
Mage's
Magician's
Magmatic
Magpie's
Malicious
Malignant
Mammoth's
Master's
Matatl's
Mazarine
Mercenary's
Merciless
Mirage's
Mirrored
Molten
Monk's
Mosquito's
Moth's
Multifarious
Mutewind
Muttering
Naga's
Nautilus's
Necromancer's
Nightmare's
Nihilist's
Occultist's
Opalescent
Otherworldly
Overlord's
Overpowering
Oyster's
Panicked
Paragon's
Parched
Parrying
Perandus'
Perpetual
Phantasm's
Phased
Piercing
Pirate's
Pixie's
Plated
Polar
Polished
Prime
Prior's
Professor's
Protective
Pulsing
Puncturing
Punishing
Pyroclastic
Pyromantic
Quintessential
Radiating
Ram's
Rapturous
Razor-sharp
Reanimator's
Reaver's
Recovering
Redblade
Reinforced
Remora's
Resistant
Resolute
Resonant
Resonating
Resplendent
Rhino's
Ribbed
Ripping
Robust
Rotund
Runic
Runner's
Rupturing
Sabotage
Sanguine
Sapphire
Sapping
Saturated
Savage
Scholar's
Scintillating
Scorching
Scrapper's
Screaming
Searing
Seething
Seraphim's
Serene
Serrated
Shade's
Shadowy
Shaman's
Sharpened
Sharpshooter's
Shielding
Shimmering
Shining
Shocking
Shrieking
Sinister
Sizzling
Skeletal
Slicing
Slithering
Smiting
Smoking
Smouldering
Snapping
Snowy
Solar
Soldier's
Sorcerer's
Sparking
Spectre's
Spiny
Spirited
Splitting
Sprinter's
Squire's
Stallion's
Stalwart
Stout
Striking
Strong-Willed
Studded
Subterranean
Summoner's
Sundering
Surgeon's
Surging
Tacati's
Tainted
Technical
Tempered
Tempest King's
Thaumaturgist's
The Shaper's
Thickened
Thirsty
Thorny
Thunder Lord's
Thundering
Thwarting
Titan's
Topotante's
Trapping
Tul's
Turncoat's
Twinned
Tyrannical
Unassailable
Undead
Unfaltering
Unleashed
Unreal
Unstoppable
Unwavering
Unworldly
Urchin's
Vaal
Vampire's
Vaporous
Vicious
Victor's
Vigorous
Vile
Virile
Vivacious
Vivid
Volcanic
Volleying
Wailing
Warding
Warlock's
Warrior's
Wasp's
Weaponmaster's
Weeping
Whispering
Wicked
Winterbringer's
Wizard's
Wraith's
Wright's
Xopec's
Xoph's
Youthful
Zaffre
Zana's
of Absorption
of Abuse
of Acclaim
of Acclimatisation
of Accuracy
of Adamantite Skin
of Adaption
of Adrenaline
of Amassment
of Anger
of Animation
of Annihilation
of Archaeology
of Archery
of Arcing
of Ashes
of Athletics
of Authority
of Balance
of Bameth
of Banishing
of Banishment
of Berserking
of Blasting
of Bleeding
of Blinding
of Bliss
of Bloodlines
of Burning
of Calamity
of Calm
of Celebration
of Champions
of Chilling
of Cinders
of Citaqualotl
of Coals
of Collecting
of Collision
of Combat
of Combusting
of Commanders
of Confidence
of Conflagrating
of Congealment
of Consumption
of Corundum Skin
of Crafting
of Craiceann
of Craving
of Cunning
of Curing
of Dampening
of Darting
of Dazing
of Deadliness
of Delaying
of Demolishing
of Desecration
of Destruction
of Dexterity
of Disaster
of Discharge
of Dishonour
of Distraction
of Dousing
of Drought
of Ease
of Efficiency
of Elation
of Electricity
of Elemental Weakness
of Embers
of Enchanting
of Endurance
of Enfeeblement
of Entropy
of Ephij
of Euphoria
of Eviction
of Excavation
of Excitement
of Exile
of Expertise
of Exposure
of Expulsion
of Extinguishing
of Exuberance
of Fame
of Farrul
of Fending
of Fenumus
of Ferocity
of Finesse
of Flames
of Flight
of Floe
of Focus
of Fog
of Fortitude
of Fracturing
of Freezing
of Frenzy
of Fury
of Gathering
of Giants
of Glaciation
of Gluttony
of Grandmastery
of Grounding
of Guarding
of Guatelitzi
of Haast
of Haemophilia
of Harm
of Havoc
of Haze
of Heat
of Hemomancy
of Hindering
of Hoarding
of Hordes
of Ice
of Immolation
of Impact
of Impotence
of Incision
of Infamy
of Instinct
of Insulating
of Insulation
of Intelligence
of Intercepting
of Ire
of Iron Skin
of Joy
of Legerdemain
of Light
of Lightning
of Lioneye
of Longevity
of Malevolence
of Malice
of Maneuvering
of Marshalling
of Mastery
of Matatl
of Menace
of Mending
of Miring
of Momentum
of Mysticism
of Needling
of Nimbleness
of Nirvana
of Nourishment
of Numbing
of Onslaught
of Opportunity
of Orchestration
of Order
of Osmosis
of Overflowing
of Penetrating
of Phasing
of Piercing
of Plunder
of Poisoning
of Potency
of Power
of Praxis
of Precision
of Preparation
of Prestidigitation
of Propulsion
of Puhuarte
of Radiance
of Rage
of Raiding
of Rallying
of Readiness
of Recovery
of Refilling
of Reflexes
of Regrowth
of Rejuvenation
of Rending
of Renown
of Resilience
of Resistance
of Restoration
of Retaliation
of Righteousness
of Rime
of Ruin
of Runes
of Rupturing
of Rust
of Saqawal
of Savouring
of Shaping
of Shelter
of Shining
of Shocking
of Sin
of Sipping
of Skill
of Skirmishing
of Slamming
of Sleet
of Smothering
of Snow
of Soaring
of Sortilege
of Sparks
of Spellcraft
of Spirit
of Staggering
of Stasis
of Static
of Staunching
of Steadiness
of Steel Skin
of Stifling
of Stinging
of Stone Skin
of Strength
of Stunning
of Success
of Tacati
of Talent
of Taunting
of Temporal Chains
of Thick Skin
of Tolerance
of Toughness
of Training
of Triumph
of Tzteosh
of Unholy Might
of Unmaking
of Unwavering
of Vampirism
of Variegation
of Venom
of Vibrance
of Victory
of Vivaciousness
of Voltage
of Vulnerability
of Walling
of Warding
of Warming
of Weaponcraft
of Weight
of Wounding
of Zeal
of the Apocalypse
of the Apt
of the Assassin
of the Augur
of the Bear
of the Beast
of the Blur
of the Boxer
of the Brawler
of the Brute
of the Cloud
of the Clouds
of the Combatant
of the Comet
of the Crystal
of the Deadeye
of the Dragon
of the Drake
of the Elder
of the Elements
of the Falcon
of the Fox
of the Furnace
of the Galaxy
of the Gale
of the Genius
of the Gladiator
of the Gods
of the Godslayer
of the Goliath
of the Gorilla
of the Guardian
of the Hearth
of the Heavens
of the Hydra
of the Ice
of the Inferno
of the Infinite
of the Inquisitor
of the Inuit
of the Jaguar
of the Kaleidoscope
of the Kiln
of the Leopard
of the Leviathan
of the Lightning
of the Lion
of the Lizard
of the Lost
of the Lynx
of the Maelstrom
of the Magma
of the Marksman
of the Meteor
of the Mongoose
of the Multiverse
of the Newt
of the Panther
of the Penguin
of the Phantom
of the Philosopher
of the Phoenix
of the Polar Bear
of the Polymath
of the Prism
of the Prodigy
of the Pugilist
of the Pupil
of the Raider
of the Rainbow
of the Ranger
of the Sage
of the Salamander
of the Savant
of the Seal
of the Sky
of the Slayer
of the Sniper
of the Span
of the Squall
of the Starfish
of the Storm
of the Student
of the Tempest
of the Thunderhead
of the Titan
of the Troll
of the Underground
of the Universe
of the Virtuoso
of the Volcano
of the Wall
of the Walrus
of the Whelpling
of the Wind
of the Worthy
of the Wrestler
of the Yeti
of the Zephyr

View File

@@ -1,6 +1,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using Filtration.Properties;
using Filtration.Views; using Filtration.Views;
using NLog; using NLog;
@@ -15,15 +16,21 @@ namespace Filtration.Services
{ {
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly IItemFilterScriptDirectoryService _itemFilterScriptDirectoryService;
private readonly IMainWindow _mainWindow; private readonly IMainWindow _mainWindow;
private readonly IScriptLoadingService _scriptLoadingService;
private readonly ISettingsService _settingsService; private readonly ISettingsService _settingsService;
private readonly IUpdateService _updateService; private readonly IUpdateService _updateService;
public Bootstrapper(IMainWindow mainWindow, public Bootstrapper(IItemFilterScriptDirectoryService itemFilterScriptDirectoryService,
IMainWindow mainWindow,
IScriptLoadingService scriptLoadingService,
ISettingsService settingsService, ISettingsService settingsService,
IUpdateService updateService) IUpdateService updateService)
{ {
_itemFilterScriptDirectoryService = itemFilterScriptDirectoryService;
_mainWindow = mainWindow; _mainWindow = mainWindow;
_scriptLoadingService = scriptLoadingService;
_settingsService = settingsService; _settingsService = settingsService;
_updateService = updateService; _updateService = updateService;
} }
@@ -37,9 +44,17 @@ namespace Filtration.Services
// with each update // with each update
_settingsService.RestoreSettings(); _settingsService.RestoreSettings();
_itemFilterScriptDirectoryService.PromptForFilterScriptDirectoryIfRequired();
_mainWindow.Show(); _mainWindow.Show();
await _updateService.CheckForUpdates(); // If there were scripts open the last time the application was closed, reopen them
if (!string.IsNullOrWhiteSpace(Settings.Default.LastOpenScripts))
{
await _scriptLoadingService.LoadScriptsAsync(Settings.Default.LastOpenScripts.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries));
}
await _updateService.CheckForUpdatesAsync();
} }
private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e) private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)

View File

@@ -0,0 +1,25 @@
using Microsoft.WindowsAPICodePack.Dialogs;
namespace Filtration.Services
{
internal interface IDialogService
{
CommonFileDialogResult ShowFolderPickerDialog(string dialogTitle, out string folderName);
}
internal sealed class DialogService : IDialogService
{
public CommonFileDialogResult ShowFolderPickerDialog(string dialogTitle, out string folderName)
{
using (var dialog = new CommonOpenFileDialog(dialogTitle))
{
dialog.IsFolderPicker = true;
var result = dialog.ShowDialog();
folderName = result == CommonFileDialogResult.Ok ? dialog.FileName : string.Empty;
return result;
}
}
}
}

View File

@@ -25,16 +25,6 @@ namespace Filtration.Services
{ {
_fileSystemService = fileSystemService; _fileSystemService = fileSystemService;
_itemFilterScriptTranslator = itemFilterScriptTranslator; _itemFilterScriptTranslator = itemFilterScriptTranslator;
if (string.IsNullOrEmpty(Settings.Default.DefaultFilterDirectory))
{
ItemFilterScriptDirectory = DefaultPathOfExileDirectory();
Settings.Default.DefaultFilterDirectory = ItemFilterScriptDirectory;
}
else
{
ItemFilterScriptDirectory = Settings.Default.DefaultFilterDirectory;
}
} }
public string ItemFilterScriptDirectory { get; private set; } public string ItemFilterScriptDirectory { get; private set; }

View File

@@ -0,0 +1,78 @@
using System.IO;
using System.Windows;
using Filtration.Common.Services;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace Filtration.Services
{
internal interface IItemFilterScriptDirectoryService
{
string ItemFilterScriptDirectory { get; }
void PromptForFilterScriptDirectoryIfRequired();
void SetItemFilterScriptDirectory();
}
internal sealed class ItemFilterScriptDirectoryService : IItemFilterScriptDirectoryService
{
private readonly IDialogService _dialogService;
private readonly IFileSystemService _fileSystemService;
private readonly IItemFilterPersistenceService _itemFilterPersistenceService;
private readonly IMessageBoxService _messageBoxService;
public ItemFilterScriptDirectoryService(IDialogService dialogService,
IFileSystemService fileSystemService,
IItemFilterPersistenceService itemFilterPersistenceService,
IMessageBoxService messageBoxService)
{
_dialogService = dialogService;
_fileSystemService = fileSystemService;
_itemFilterPersistenceService = itemFilterPersistenceService;
_messageBoxService = messageBoxService;
}
public string ItemFilterScriptDirectory => _itemFilterPersistenceService.ItemFilterScriptDirectory;
public void PromptForFilterScriptDirectoryIfRequired()
{
// If the directory is already set, do nothing
if (!string.IsNullOrEmpty(_itemFilterPersistenceService.ItemFilterScriptDirectory))
{
return;
}
// If the directory is not set but the default directory exists, set the directory to the default directory
if (_fileSystemService.DirectoryExists(_itemFilterPersistenceService.DefaultPathOfExileDirectory()))
{
_itemFilterPersistenceService.SetItemFilterScriptDirectory(_itemFilterPersistenceService.DefaultPathOfExileDirectory());
return;
}
// Otherwise, prompt the user to select the directory
_messageBoxService.Show("Data directory required", @"The Path of Exile user data directory was not found in the default location (Documents\My Games\Path of Exile), please select it manually.", MessageBoxButton.OK, MessageBoxImage.Information);
while (string.IsNullOrEmpty(_itemFilterPersistenceService.ItemFilterScriptDirectory))
{
SetItemFilterScriptDirectory();
}
}
public void SetItemFilterScriptDirectory()
{
var result = _dialogService.ShowFolderPickerDialog(@"Select Path of Exile user data directory", out var filepath);
if (result != CommonFileDialogResult.Ok)
{
return;
}
try
{
_itemFilterPersistenceService.SetItemFilterScriptDirectory(filepath);
}
catch (DirectoryNotFoundException)
{
_messageBoxService.Show("Error", "The entered Default Filter Directory is invalid or does not exist.",
MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}
}
}

View File

@@ -0,0 +1,98 @@
using System;
using System.IO;
using System.Threading.Tasks;
using System.Windows;
using Filtration.Common.Services;
using Filtration.Repositories;
using Filtration.ThemeEditor.Providers;
using Filtration.ThemeEditor.ViewModels;
using Filtration.ViewModels;
using GalaSoft.MvvmLight.Messaging;
using NLog;
namespace Filtration.Services
{
internal interface IScriptLoadingService
{
Task LoadScriptAsync(string scriptFilename);
Task LoadScriptsAsync(string[] files);
Task LoadThemeAsync(string themeFilename);
}
internal sealed class ScriptLoadingService : IScriptLoadingService
{
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly IAvalonDockWorkspaceViewModel _avalonDockWorkspaceViewModel;
private readonly IMessageBoxService _messageBoxService;
private readonly IThemeProvider _themeProvider;
private readonly IItemFilterScriptRepository _itemFilterScriptRepository;
public ScriptLoadingService(IAvalonDockWorkspaceViewModel avalonDockWorkspaceViewModel,
IItemFilterScriptRepository itemFilterScriptRepository,
IMessageBoxService messageBoxService,
IThemeProvider themeProvider)
{
_avalonDockWorkspaceViewModel = avalonDockWorkspaceViewModel;
_messageBoxService = messageBoxService;
_themeProvider = themeProvider;
_itemFilterScriptRepository = itemFilterScriptRepository;
}
public async Task LoadScriptsAsync(string[] files)
{
foreach (var file in files)
{
if (File.Exists(file))
{
await LoadScriptAsync(file);
}
}
}
public async Task LoadScriptAsync(string scriptFilename)
{
IItemFilterScriptViewModel loadedViewModel;
Messenger.Default.Send(new NotificationMessage("ShowLoadingBanner"));
try
{
loadedViewModel = await _itemFilterScriptRepository.LoadScriptFromFileAsync(scriptFilename);
}
catch (Exception e)
{
Logger.Error(e);
_messageBoxService.Show("Script Load Error", "Error loading filter script - " + e.Message,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
}
finally
{
Messenger.Default.Send(new NotificationMessage("HideLoadingBanner"));
}
_avalonDockWorkspaceViewModel.AddDocument(loadedViewModel);
}
public async Task LoadThemeAsync(string themeFilename)
{
IThemeEditorViewModel loadedViewModel;
try
{
loadedViewModel = await _themeProvider.LoadThemeFromFile(themeFilename);
}
catch (Exception e)
{
Logger.Error(e);
_messageBoxService.Show("Theme Load Error", "Error loading filter theme - " + e.Message,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
}
_avalonDockWorkspaceViewModel.AddDocument(loadedViewModel);
}
}
}

View File

@@ -1,9 +1,8 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using Filtration.Common.Services;
using Filtration.Common.Utilities; using Filtration.Common.Utilities;
using Filtration.Properties;
namespace Filtration.Services namespace Filtration.Services
{ {
@@ -11,15 +10,13 @@ namespace Filtration.Services
{ {
IEnumerable<string> ItemBaseTypes { get; } IEnumerable<string> ItemBaseTypes { get; }
IEnumerable<string> ItemClasses { get; } IEnumerable<string> ItemClasses { get; }
IEnumerable<string> ItemMods { get; }
} }
internal class StaticDataService : IStaticDataService internal class StaticDataService : IStaticDataService
{ {
private readonly IFileSystemService _fileSystemService; public StaticDataService()
public StaticDataService(IFileSystemService fileSystemService)
{ {
_fileSystemService = fileSystemService;
PopulateStaticData(); PopulateStaticData();
} }
@@ -27,34 +24,13 @@ namespace Filtration.Services
public IEnumerable<string> ItemClasses { get; private set; } public IEnumerable<string> ItemClasses { get; private set; }
public IEnumerable<string> ItemMods { get; private set; }
private void PopulateStaticData() private void PopulateStaticData()
{ {
var itemBaseTypesPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Filtration\ItemBaseTypes.txt"; ItemBaseTypes = new LineReader(() => new StringReader(Resources.ItemBaseTypes)).ToList();
var itemClassesPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Filtration\ItemClasses.txt"; ItemClasses = new LineReader(() => new StringReader(Resources.ItemClasses)).ToList();
ItemMods = new LineReader(() => new StringReader(Resources.ItemMods)).ToList();
string itemBaseTypes;
try
{
itemBaseTypes = _fileSystemService.ReadFileAsString(itemBaseTypesPath);
}
catch (Exception)
{
itemBaseTypes = string.Empty;
}
ItemBaseTypes = new LineReader(() => new StringReader(itemBaseTypes)).ToList();
string itemClasses;
try
{
itemClasses = _fileSystemService.ReadFileAsString(itemClassesPath);
}
catch (Exception)
{
itemClasses = string.Empty;
}
ItemClasses = new LineReader(() => new StringReader(itemClasses)).ToList();
} }
} }
} }

View File

@@ -2,6 +2,7 @@
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using Filtration.Enums;
using Filtration.Properties; using Filtration.Properties;
using NLog; using NLog;
using Squirrel; using Squirrel;
@@ -52,7 +53,7 @@ namespace Filtration.Services
string LatestReleaseVersion { get; } string LatestReleaseVersion { get; }
Task CheckForUpdates(); Task CheckForUpdatesAsync();
Task DownloadUpdatesAsync(); Task DownloadUpdatesAsync();
@@ -63,13 +64,16 @@ namespace Filtration.Services
internal class UpdateService : IUpdateService internal class UpdateService : IUpdateService
{ {
private readonly ISettingsService _settingsService;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private const string _localUpdatePath = @"C:\Repos\Filtration\Releases"; private const string _localUpdatePath = @"C:\Repos\Filtration\Releases";
private readonly ISettingsService _settingsService;
private readonly UpdateSource _updateSource = UpdateSource.GitHub;
private ReleaseEntry _latestRelease; private ReleaseEntry _latestRelease;
private UpdateInfo _updates; private UpdateInfo _updates;
private bool _downloadPrereleaseUpdates;
private UpdateStatus _updateStatus; private UpdateStatus _updateStatus;
public UpdateService(ISettingsService settingsService) public UpdateService(ISettingsService settingsService)
@@ -96,35 +100,42 @@ namespace Filtration.Services
public string LatestReleaseVersion { get; private set; } public string LatestReleaseVersion { get; private set; }
public async Task CheckForUpdates() public async Task CheckForUpdatesAsync()
{ {
if (UpdateStatus != UpdateStatus.NoUpdateAvailable) if (UpdateStatus != UpdateStatus.NoUpdateAvailable)
{ {
throw new InvalidOperationException(); throw new InvalidOperationException();
} }
Logger.Debug("Checking for update..."); Logger.Debug("Checking for update...");
UpdateStatus = UpdateStatus.CheckingForUpdate; UpdateStatus = UpdateStatus.CheckingForUpdate;
try try
{ {
bool downloadPrereleaseUpdates; _downloadPrereleaseUpdates = Settings.Default.DownloadPrereleaseUpdates;
downloadPrereleaseUpdates = Settings.Default.DownloadPrereleaseUpdates;
#if DEBUG #if DEBUG
downloadPrereleaseUpdates = true; _downloadPrereleaseUpdates = true;
#endif #endif
using (var mgr = await UpdateManager.GitHubUpdateManager("https://github.com/ben-wallis/Filtration", prerelease: downloadPrereleaseUpdates))
async Task CheckForUpdatesAsync(IUpdateManager updateManager)
{ {
_updates = await mgr.CheckForUpdate(progress: progress => UpdateProgressChanged?.Invoke(this, new UpdateProgressChangedEventArgs(progress))); _updates = await updateManager.CheckForUpdate(progress: progress => UpdateProgressChanged?.Invoke(this, new UpdateProgressChangedEventArgs(progress)));
} }
// Local file update source for testing if (_updateSource == UpdateSource.GitHub)
//using (var mgr = new UpdateManager(_localUpdatePath)) {
//{ using (var updateManager = await UpdateManager.GitHubUpdateManager("https://github.com/ben-wallis/Filtration", prerelease: _downloadPrereleaseUpdates))
{
// _updates = await mgr.CheckForUpdate(progress: progress => UpdateProgressChanged?.Invoke(this, new UpdateProgressChangedEventArgs(progress))); await CheckForUpdatesAsync(updateManager);
//} }
}
else
{
using (var updateManager = new UpdateManager(_localUpdatePath))
{
await CheckForUpdatesAsync(updateManager);
}
}
} }
catch (Exception e) catch (Exception e)
{ {
@@ -133,25 +144,12 @@ namespace Filtration.Services
return; return;
} }
if (_updates.ReleasesToApply.Any()) if (_updates.ReleasesToApply.Any())
{ {
_latestRelease = _updates.ReleasesToApply.OrderBy(x => x.Version).Last(); _latestRelease = _updates.ReleasesToApply.OrderBy(x => x.Version).Last();
LatestReleaseVersion = _latestRelease.Version.ToString(); LatestReleaseVersion = _latestRelease.Version.ToString();
Logger.Debug($"Update found ({LatestReleaseVersion}), fetching release notes..."); Logger.Debug($"Update found ({LatestReleaseVersion})");
try
{
var releaseNotes = _latestRelease.GetReleaseNotes(_localUpdatePath);
LatestReleaseNotes = ProcessReleaseNotes(releaseNotes);
}
catch (Exception e)
{
Logger.Error(e);
UpdateStatus = UpdateStatus.Error;
return;
}
UpdateStatus = UpdateStatus.UpdateAvailable; UpdateStatus = UpdateStatus.UpdateAvailable;
} }
@@ -162,7 +160,7 @@ namespace Filtration.Services
} }
} }
private string ProcessReleaseNotes(string rawReleaseNotes) private static string ProcessReleaseNotes(string rawReleaseNotes)
{ {
var regex = new Regex(@"<!\[CDATA\[(.*)]]>", RegexOptions.Singleline); var regex = new Regex(@"<!\[CDATA\[(.*)]]>", RegexOptions.Singleline);
var matches = regex.Match(rawReleaseNotes); var matches = regex.Match(rawReleaseNotes);
@@ -184,11 +182,31 @@ namespace Filtration.Services
UpdateStatus = UpdateStatus.Downloading; UpdateStatus = UpdateStatus.Downloading;
async Task DownloadUpdatesAsync(IUpdateManager updateManager)
{
Logger.Debug("Downloading update...");
await updateManager.DownloadReleases(_updates.ReleasesToApply, OnProgressChanged);
Logger.Debug("Fetching release notes...");
var releaseNotes = _updates.FetchReleaseNotes();
LatestReleaseNotes = ProcessReleaseNotes(releaseNotes[_latestRelease]);
}
try try
{
if (_updateSource == UpdateSource.GitHub)
{
using (var updateManager = await UpdateManager.GitHubUpdateManager("https://github.com/ben-wallis/Filtration", prerelease: _downloadPrereleaseUpdates))
{
await DownloadUpdatesAsync(updateManager);
}
}
else
{ {
using (var updateManager = new UpdateManager(_localUpdatePath)) using (var updateManager = new UpdateManager(_localUpdatePath))
{ {
await updateManager.DownloadReleases(_updates.ReleasesToApply, OnProgressChanged); await DownloadUpdatesAsync(updateManager);
}
} }
} }
catch (Exception e) catch (Exception e)
@@ -215,13 +233,24 @@ namespace Filtration.Services
// wipes out user settings due to the application directory changing with each update // wipes out user settings due to the application directory changing with each update
_settingsService.BackupSettings(); _settingsService.BackupSettings();
Logger.Debug("Applying update...");
try try
{
if (_updateSource == UpdateSource.GitHub)
{
using (var mgr = await UpdateManager.GitHubUpdateManager("https://github.com/ben-wallis/Filtration", prerelease: _downloadPrereleaseUpdates))
{
await mgr.ApplyReleases(_updates, OnProgressChanged);
}
}
else
{ {
using (var updateManager = new UpdateManager(_localUpdatePath)) using (var updateManager = new UpdateManager(_localUpdatePath))
{ {
await updateManager.ApplyReleases(_updates, OnProgressChanged); await updateManager.ApplyReleases(_updates, OnProgressChanged);
} }
} }
}
catch (Exception e) catch (Exception e)
{ {
Logger.Error(e); Logger.Error(e);
@@ -229,6 +258,7 @@ namespace Filtration.Services
return; return;
} }
Logger.Debug("Update complete");
UpdateStatus = UpdateStatus.UpdateComplete; UpdateStatus = UpdateStatus.UpdateComplete;
} }

View File

@@ -78,7 +78,7 @@
<!-- Explicit Mods Template --> <!-- Explicit Mods Template -->
<DataTemplate DataType="{x:Type blockItemTypes:HasExplicitModBlockItem}"> <DataTemplate DataType="{x:Type blockItemTypes:HasExplicitModBlockItem}">
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" /> <userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutocompleteItemMods}" />
</DataTemplate> </DataTemplate>
<!-- Socket Groups Template --> <!-- Socket Groups Template -->
@@ -97,14 +97,15 @@
DisplayMemberPath="Description" DisplayMemberPath="Description"
SelectedValue="{Binding Color}" SelectedValue="{Binding Color}"
SelectedValuePath="Value" /> SelectedValuePath="Value" />
<userControls:ThemeComponentSelectionControl ThemeComponent="{Binding ThemeComponent}" Margin="0,2,0,0"> <!-- Disabled until there is a solution to GitHub Issue #68 (certain block items do not support trailing comments) -->
<!--<userControls:ThemeComponentSelectionControl ThemeComponent="{Binding ThemeComponent}" Margin="0,2,0,0">
<userControls:ThemeComponentSelectionControl.AvailableThemeComponents> <userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
<MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}"> <MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}">
<Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/> <Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/>
<Binding Path="." /> <Binding Path="." />
</MultiBinding> </MultiBinding>
</userControls:ThemeComponentSelectionControl.AvailableThemeComponents> </userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
</userControls:ThemeComponentSelectionControl> </userControls:ThemeComponentSelectionControl>-->
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
@@ -133,14 +134,15 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<xctk:ShortUpDown Grid.Column="0" Value="{Binding Value}" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" Margin="0,0,10,0" /> <xctk:ShortUpDown Grid.Column="0" Value="{Binding Value}" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}" Margin="0,0,10,0" />
<userControls:ThemeComponentSelectionControl Grid.Column="1" ThemeComponent="{Binding ThemeComponent}"> <!-- Disabled until there is a solution to GitHub Issue #68 (certain block items do not support trailing comments) -->
<!--<userControls:ThemeComponentSelectionControl Grid.Column="1" ThemeComponent="{Binding ThemeComponent}">
<userControls:ThemeComponentSelectionControl.AvailableThemeComponents> <userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
<MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}"> <MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}">
<Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/> <Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/>
<Binding Path="." /> <Binding Path="." />
</MultiBinding> </MultiBinding>
</userControls:ThemeComponentSelectionControl.AvailableThemeComponents> </userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
</userControls:ThemeComponentSelectionControl> </userControls:ThemeComponentSelectionControl>-->
</Grid> </Grid>
</DataTemplate> </DataTemplate>
@@ -197,14 +199,15 @@
DisplayMemberPath="Description" DisplayMemberPath="Description"
SelectedValue="{Binding Shape}" SelectedValue="{Binding Shape}"
SelectedValuePath="Value" /> SelectedValuePath="Value" />
<userControls:ThemeComponentSelectionControl ThemeComponent="{Binding ThemeComponent}" Margin="0,2,0,0"> <!-- Disabled until there is a solution to GitHub Issue #68 (certain block items do not support trailing comments) -->
<!--<userControls:ThemeComponentSelectionControl ThemeComponent="{Binding ThemeComponent}" Margin="0,2,0,0">
<userControls:ThemeComponentSelectionControl.AvailableThemeComponents> <userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
<MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}"> <MultiBinding Converter="{StaticResource AvailableThemeComponentsConverter}">
<Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/> <Binding Path="DataContext.Script.ThemeComponents" RelativeSource="{RelativeSource AncestorType={x:Type views:ItemFilterScriptView}}"/>
<Binding Path="." /> <Binding Path="." />
</MultiBinding> </MultiBinding>
</userControls:ThemeComponentSelectionControl.AvailableThemeComponents> </userControls:ThemeComponentSelectionControl.AvailableThemeComponents>
</userControls:ThemeComponentSelectionControl> </userControls:ThemeComponentSelectionControl>-->
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>

View File

@@ -0,0 +1,30 @@
<UserControl x:Class="Filtration.UserControls.EnableDisableToggleButton"
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"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<ToggleButton Style="{StaticResource ChromelessToggleButton}"
IsChecked="{Binding BlockEnabled}"
Margin="0,0,5,0"
ToolTip="Enable/Disable Block"
Cursor="Hand"
Width="25"
Height="25">
<Image RenderOptions.BitmapScalingMode="HighQuality">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding BlockEnabled}" Value="true">
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_enabled_icon.png"/>
</DataTrigger>
<DataTrigger Binding="{Binding BlockEnabled}" Value="false">
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_disabled_icon.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Filtration.UserControls
{
/// <summary>
/// Interaction logic for EnableDisableToggleButton.xaml
/// </summary>
public partial class EnableDisableToggleButton : UserControl
{
public EnableDisableToggleButton()
{
InitializeComponent();
}
}
}

View File

@@ -75,7 +75,6 @@ namespace Filtration.ViewModels
if (value.IsScript) if (value.IsScript)
{ {
_activeScriptViewModel = (IItemFilterScriptViewModel) value; _activeScriptViewModel = (IItemFilterScriptViewModel) value;
Settings.Default.LastActiveDocument = _activeScriptViewModel.Script.FilePath;
} }
else if (value.IsTheme) else if (value.IsTheme)
{ {

View File

@@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel;
using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Commands;
using Filtration.ObjectModel.Enums;
using GalaSoft.MvvmLight.CommandWpf;
using Xceed.Wpf.Toolkit;
namespace Filtration.ViewModels.DesignTime
{
internal class FakeCommandManager : ICommandManagerInternal {
public void ExecuteCommand(ICommand command)
{
throw new NotImplementedException();
}
public void Undo(int undoLevels = 1)
{
throw new NotImplementedException();
}
public void Redo(int redoLevels = 1)
{
throw new NotImplementedException();
}
public void SetScript(IItemFilterScriptInternal layout)
{
}
}
internal class DesignTimeItemFilterBlockViewModel : IItemFilterBlockViewModel
{
private ItemFilterBlock itemFilterBlock;
public DesignTimeItemFilterBlockViewModel()
{
itemFilterBlock = new ItemFilterBlock(new ItemFilterScript(new FakeCommandManager()))
{
Action = BlockAction.Show,
Enabled = true
};
itemFilterBlock.BlockItems.Add(new RarityBlockItem(FilterPredicateOperator.Equal, ItemRarity.Rare));
itemFilterBlock.BlockItems.Add(new DropLevelBlockItem(FilterPredicateOperator.GreaterThan, 23));
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
itemFilterBlock.BlockItems.Add(new BaseTypeBlockItem());
}
public void Initialise(IItemFilterBlockBase itemFilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel)
{
//throw new NotImplementedException();
}
public IItemFilterBlockBase BaseBlock { get; }
public bool IsDirty { get; set; }
public bool IsVisible { get; set; }
public event EventHandler BlockBecameDirty;
public bool IsExpanded
{
get => true;
set { }
}
public IItemFilterBlock Block => itemFilterBlock;
public bool BlockEnabled
{
get => true;
set { }
}
public string BlockDescription { get; set; }
public RelayCommand CopyBlockStyleCommand { get; }
public RelayCommand PasteBlockStyleCommand { get; }
public RelayCommand ToggleBlockActionCommand { get; }
public RelayCommand ReplaceColorsCommand { get; }
public RelayCommand<Type> AddFilterBlockItemCommand { get; }
public RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; }
public RelayCommand PlaySoundCommand { get; }
public RelayCommand PlayPositionalSoundCommand { get; }
public RelayCommand SwitchBlockItemsViewCommand { get; }
public RelayCommand CustomSoundFileDialogCommand { get; }
public RelayCommand PlayCustomSoundCommand { get; }
public RelayCommand AddBlockGroupCommand { get; }
public RelayCommand DeleteBlockGroupCommand { get; }
public ObservableCollection<ItemFilterBlockGroup> BlockGroups { get; }
public ObservableCollection<string> BlockGroupSuggestions { get; }
public string BlockGroupSearch { get; set; }
public ObservableCollection<IItemFilterBlockItem> BlockItems => Block.BlockItems;
public IEnumerable<IItemFilterBlockItem> SummaryBlockItems
{
get { return Block.BlockItems.Where(b => !(b is IAudioVisualBlockItem)); }
}
public IEnumerable<IItemFilterBlockItem> RegularBlockItems
{
get { return Block.BlockItems.Where(b => !(b is IAudioVisualBlockItem)); }
}
public IEnumerable<IItemFilterBlockItem> AudioVisualBlockItems { get; }
public bool AdvancedBlockGroup { get; }
public bool AudioVisualBlockItemsGridVisible { get; set; }
public bool DisplaySettingsPopupOpen { get; set; }
public IEnumerable<string> AutoCompleteItemClasses { get; }
public IEnumerable<string> AutoCompleteItemBaseTypes { get; }
public IEnumerable<string> AutocompleteItemMods { get; }
public List<Type> BlockItemTypesAvailable => new List<Type>
{
typeof (ItemLevelBlockItem),
typeof (DropLevelBlockItem),
typeof (QualityBlockItem),
typeof (RarityBlockItem),
typeof (SocketsBlockItem),
typeof (LinkedSocketsBlockItem),
typeof (WidthBlockItem),
typeof (HeightBlockItem),
typeof (SocketGroupBlockItem),
typeof (ClassBlockItem),
typeof (BaseTypeBlockItem),
typeof (IdentifiedBlockItem),
typeof (CorruptedBlockItem),
typeof (ElderItemBlockItem),
typeof (ShaperItemBlockItem),
typeof (MapTierBlockItem),
typeof (ShapedMapBlockItem),
typeof (ElderMapBlockItem),
typeof (GemLevelBlockItem),
typeof (StackSizeBlockItem),
typeof (HasExplicitModBlockItem)
};
public List<Type> AudioVisualBlockItemTypesAvailable { get; }
public ObservableCollection<ColorItem> AvailableColors { get; }
public Color DisplayTextColor => Colors.Red;
public Color DisplayBackgroundColor => Colors.White;
public Color DisplayBorderColor => Colors.GreenYellow;
public double DisplayFontSize => 20;
public int DisplayIconSize { get; }
public int DisplayIconColor { get; }
public int DisplayIconShape { get; }
public Color DisplayEffectColor { get; }
public bool HasSound { get; }
public bool HasPositionalSound { get; }
public bool HasCustomSound { get; }
public bool HasAudioVisualBlockItems { get; }
public void RefreshBlockPreview()
{
throw new NotImplementedException();
}
}
}

View File

@@ -12,6 +12,8 @@ namespace Filtration.ViewModels.DesignTime
set { } set { }
} }
public bool BlocksExpandedOnOpen { get; set; }
public bool ExtraLineBetweenBlocks public bool ExtraLineBetweenBlocks
{ {
get => true; get => true;

View File

@@ -28,7 +28,6 @@ namespace Filtration.ViewModels
ParentGroup = parent; ParentGroup = parent;
Advanced = itemFilterBlockGroup.Advanced; Advanced = itemFilterBlockGroup.Advanced;
SourceBlockGroup = itemFilterBlockGroup; SourceBlockGroup = itemFilterBlockGroup;
SourceBlockGroup.ClearStatusChangeSubscribers();
SourceBlockGroup.BlockGroupStatusChanged += OnSourceBlockGroupStatusChanged; SourceBlockGroup.BlockGroupStatusChanged += OnSourceBlockGroupStatusChanged;
IsShowChecked = itemFilterBlockGroup.IsShowChecked; IsShowChecked = itemFilterBlockGroup.IsShowChecked;
IsEnableChecked = itemFilterBlockGroup.IsEnableChecked; IsEnableChecked = itemFilterBlockGroup.IsEnableChecked;
@@ -256,5 +255,18 @@ namespace Filtration.ViewModels
IsEnableChecked = SourceBlockGroup.IsEnableChecked; IsEnableChecked = SourceBlockGroup.IsEnableChecked;
} }
} }
public void ClearStatusChangeSubscriptions()
{
if (SourceBlockGroup != null)
{
SourceBlockGroup.BlockGroupStatusChanged -= OnSourceBlockGroupStatusChanged;
}
foreach (var child in ChildGroups)
{
child.ClearStatusChangeSubscriptions();
}
}
} }
} }

View File

@@ -15,6 +15,7 @@ using GalaSoft.MvvmLight.CommandWpf;
using GalaSoft.MvvmLight.Messaging; using GalaSoft.MvvmLight.Messaging;
using Microsoft.Win32; using Microsoft.Win32;
using Xceed.Wpf.Toolkit; using Xceed.Wpf.Toolkit;
using static System.Int32;
namespace Filtration.ViewModels namespace Filtration.ViewModels
{ {
@@ -24,6 +25,47 @@ namespace Filtration.ViewModels
IItemFilterBlock Block { get; } IItemFilterBlock Block { get; }
bool BlockEnabled { get; set; } bool BlockEnabled { get; set; }
string BlockDescription { get; set; } string BlockDescription { get; set; }
RelayCommand CopyBlockStyleCommand { get; }
RelayCommand PasteBlockStyleCommand { get; }
RelayCommand ToggleBlockActionCommand { get; }
RelayCommand ReplaceColorsCommand { get; }
RelayCommand<Type> AddFilterBlockItemCommand { get; }
RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; }
RelayCommand PlaySoundCommand { get; }
RelayCommand PlayPositionalSoundCommand { get; }
RelayCommand SwitchBlockItemsViewCommand { get; }
RelayCommand CustomSoundFileDialogCommand { get; }
RelayCommand PlayCustomSoundCommand { get; }
RelayCommand AddBlockGroupCommand { get; }
RelayCommand DeleteBlockGroupCommand { get; }
ObservableCollection<ItemFilterBlockGroup> BlockGroups { get; }
ObservableCollection<string> BlockGroupSuggestions { get; }
string BlockGroupSearch { get; set; }
ObservableCollection<IItemFilterBlockItem> BlockItems { get; }
IEnumerable<IItemFilterBlockItem> SummaryBlockItems { get; }
IEnumerable<IItemFilterBlockItem> RegularBlockItems { get; }
IEnumerable<IItemFilterBlockItem> AudioVisualBlockItems { get; }
bool AdvancedBlockGroup { get; }
bool AudioVisualBlockItemsGridVisible { get; set; }
bool DisplaySettingsPopupOpen { get; set; }
IEnumerable<string> AutoCompleteItemClasses { get; }
IEnumerable<string> AutoCompleteItemBaseTypes { get; }
IEnumerable<string> AutocompleteItemMods { get; }
List<Type> BlockItemTypesAvailable { get; }
List<Type> AudioVisualBlockItemTypesAvailable { get; }
ObservableCollection<ColorItem> AvailableColors { get; }
Color DisplayTextColor { get; }
Color DisplayBackgroundColor { get; }
Color DisplayBorderColor { get; }
double DisplayFontSize { get; }
int DisplayIconSize { get; }
int DisplayIconColor { get; }
int DisplayIconShape { get; }
Color DisplayEffectColor { get; }
bool HasSound { get; }
bool HasPositionalSound { get; }
bool HasCustomSound { get; }
bool HasAudioVisualBlockItems { get; }
void RefreshBlockPreview(); void RefreshBlockPreview();
} }
@@ -59,8 +101,7 @@ namespace Filtration.ViewModels
public override void Initialise(IItemFilterBlockBase itemFilterBlockBase, IItemFilterScriptViewModel parentScriptViewModel) public override void Initialise(IItemFilterBlockBase itemFilterBlockBase, IItemFilterScriptViewModel parentScriptViewModel)
{ {
var itemFilterBlock = itemFilterBlockBase as IItemFilterBlock; if (!(itemFilterBlockBase is IItemFilterBlock itemFilterBlock) || parentScriptViewModel == null)
if (itemFilterBlock == null || parentScriptViewModel == null)
{ {
throw new ArgumentNullException(nameof(itemFilterBlock)); throw new ArgumentNullException(nameof(itemFilterBlock));
} }
@@ -136,7 +177,7 @@ namespace Filtration.ViewModels
public bool AudioVisualBlockItemsGridVisible public bool AudioVisualBlockItemsGridVisible
{ {
get { return _audioVisualBlockItemsGridVisible; } get => _audioVisualBlockItemsGridVisible;
set set
{ {
_audioVisualBlockItemsGridVisible = value; _audioVisualBlockItemsGridVisible = value;
@@ -150,7 +191,7 @@ namespace Filtration.ViewModels
public bool DisplaySettingsPopupOpen public bool DisplaySettingsPopupOpen
{ {
get { return _displaySettingsPopupOpen; } get => _displaySettingsPopupOpen;
set set
{ {
_displaySettingsPopupOpen = value; _displaySettingsPopupOpen = value;
@@ -162,6 +203,8 @@ namespace Filtration.ViewModels
public IEnumerable<string> AutoCompleteItemBaseTypes => _staticDataService.ItemBaseTypes; public IEnumerable<string> AutoCompleteItemBaseTypes => _staticDataService.ItemBaseTypes;
public IEnumerable<string> AutocompleteItemMods => _staticDataService.ItemMods;
public List<Type> BlockItemTypesAvailable => new List<Type> public List<Type> BlockItemTypesAvailable => new List<Type>
{ {
typeof (ItemLevelBlockItem), typeof (ItemLevelBlockItem),
@@ -203,7 +246,7 @@ namespace Filtration.ViewModels
public bool BlockEnabled public bool BlockEnabled
{ {
get { return Block.Enabled; } get => Block.Enabled;
set set
{ {
if (Block.Enabled != value) if (Block.Enabled != value)
@@ -217,10 +260,7 @@ namespace Filtration.ViewModels
public string BlockDescription public string BlockDescription
{ {
get get => Block.Description;
{
return Block.Description;
}
set set
{ {
if (Block.Description != value) if (Block.Description != value)
@@ -267,8 +307,7 @@ namespace Filtration.ViewModels
newBlockItem.PropertyChanged += OnBlockItemChanged; newBlockItem.PropertyChanged += OnBlockItemChanged;
var customSoundBlockItem = newBlockItem as CustomSoundBlockItem; if(newBlockItem is CustomSoundBlockItem customSoundBlockItem && _parentScriptViewModel.CustomSoundsAvailable.Count > 0)
if(customSoundBlockItem != null && _parentScriptViewModel.CustomSoundsAvailable.Count > 0)
{ {
customSoundBlockItem.Value = _parentScriptViewModel.CustomSoundsAvailable[0]; customSoundBlockItem.Value = _parentScriptViewModel.CustomSoundsAvailable[0];
} }
@@ -362,17 +401,15 @@ namespace Filtration.ViewModels
private string ComputeFilePartFromNumber(string identifier) private string ComputeFilePartFromNumber(string identifier)
{ {
if (Int32.TryParse(identifier, out int x)) if (TryParse(identifier, out int x))
{ {
if (x <= 9) if (x <= 9)
{ {
return "AlertSound_0" + x + ".mp3"; return "AlertSound_0" + x + ".mp3";
} }
else
{
return "AlertSound_" + x + ".mp3"; return "AlertSound_" + x + ".mp3";
} }
}
return ""; return "";
} }
@@ -429,12 +466,10 @@ namespace Filtration.ViewModels
{ {
return; return;
} }
else
{
_mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative)); _mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative));
_mediaPlayer.Play(); _mediaPlayer.Play();
} }
}
private void OnPlayPositionalSoundCommand() private void OnPlayPositionalSoundCommand()
{ {
@@ -446,12 +481,10 @@ namespace Filtration.ViewModels
{ {
return; return;
} }
else
{
_mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative)); _mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative));
_mediaPlayer.Play(); _mediaPlayer.Play();
} }
}
private void OnBlockEnabledStatusChanged(object sender, EventArgs e) private void OnBlockEnabledStatusChanged(object sender, EventArgs e)
{ {
@@ -460,13 +493,12 @@ namespace Filtration.ViewModels
private void OnBlockItemChanged(object sender, EventArgs e) private void OnBlockItemChanged(object sender, EventArgs e)
{ {
var itemFilterBlockItem = sender as IItemFilterBlockItem; if (sender is IItemFilterBlockItem itemFilterBlockItem && itemFilterBlockItem.IsDirty)
if ( itemFilterBlockItem != null && itemFilterBlockItem.IsDirty)
{ {
IsDirty = true; IsDirty = true;
} }
var customSoundBlockItem = sender as CustomSoundBlockItem;
if (customSoundBlockItem != null) if (sender is CustomSoundBlockItem customSoundBlockItem)
{ {
if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && _parentScriptViewModel.CustomSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0) if (!string.IsNullOrWhiteSpace(customSoundBlockItem.Value) && _parentScriptViewModel.CustomSoundsAvailable.IndexOf(customSoundBlockItem.Value) < 0)
{ {
@@ -505,12 +537,11 @@ namespace Filtration.ViewModels
private void OnCustomSoundFileDialog() private void OnCustomSoundFileDialog()
{ {
OpenFileDialog fileDialog = new OpenFileDialog(); OpenFileDialog fileDialog = new OpenFileDialog {DefaultExt = ".mp3"};
fileDialog.DefaultExt = ".mp3"; var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\Path of Exile\";
var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString() + @"\My Games\Path of Exile\";
fileDialog.InitialDirectory = poePath; fileDialog.InitialDirectory = poePath;
Nullable<bool> result = fileDialog.ShowDialog(); bool? result = fileDialog.ShowDialog();
if (result == true) if (result == true)
{ {
var fileName = fileDialog.FileName; var fileName = fileDialog.FileName;
@@ -531,7 +562,7 @@ namespace Filtration.ViewModels
private void OnPlayCustomSoundCommand() private void OnPlayCustomSoundCommand()
{ {
var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString() + @"\My Games\Path of Exile\"; var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\Path of Exile\";
var identifier = BlockItems.OfType<CustomSoundBlockItem>().First().Value; var identifier = BlockItems.OfType<CustomSoundBlockItem>().First().Value;
if(!Path.IsPathRooted(identifier)) if(!Path.IsPathRooted(identifier))
@@ -567,9 +598,11 @@ namespace Filtration.ViewModels
var newGroup = new ItemFilterBlockGroup(BlockGroupSearch, null, AdvancedBlockGroup, false); var newGroup = new ItemFilterBlockGroup(BlockGroupSearch, null, AdvancedBlockGroup, false);
if (baseBlock.BlockGroup == null) if (baseBlock.BlockGroup == null)
{ {
baseBlock.BlockGroup = new ItemFilterBlockGroup("", null, false, true); baseBlock.BlockGroup = new ItemFilterBlockGroup("", null, false, true)
baseBlock.BlockGroup.IsShowChecked = baseBlock.Action == BlockAction.Show; {
baseBlock.BlockGroup.IsEnableChecked = BlockEnabled; IsShowChecked = baseBlock.Action == BlockAction.Show,
IsEnableChecked = BlockEnabled
};
} }
newGroup.AddOrJoinBlockGroup(baseBlock.BlockGroup); newGroup.AddOrJoinBlockGroup(baseBlock.BlockGroup);
blockToAdd.AddOrJoinBlockGroup(newGroup); blockToAdd.AddOrJoinBlockGroup(newGroup);
@@ -609,8 +642,7 @@ namespace Filtration.ViewModels
private void UpdateBlockGroups() private void UpdateBlockGroups()
{ {
var baseBlock = Block as ItemFilterBlock; if (!(Block is ItemFilterBlock baseBlock))
if (baseBlock == null)
return; return;
var currentGroup = baseBlock.BlockGroup; var currentGroup = baseBlock.BlockGroup;

View File

@@ -7,7 +7,7 @@ namespace Filtration.ViewModels
{ {
internal interface IItemFilterBlockViewModelBase internal interface IItemFilterBlockViewModelBase
{ {
void Initialise(IItemFilterBlockBase itemfilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel); void Initialise(IItemFilterBlockBase itemFilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel);
IItemFilterBlockBase BaseBlock { get; } IItemFilterBlockBase BaseBlock { get; }
bool IsDirty { get; set; } bool IsDirty { get; set; }
bool IsVisible { get; set; } bool IsVisible { get; set; }
@@ -25,9 +25,9 @@ namespace Filtration.ViewModels
} }
public virtual void Initialise(IItemFilterBlockBase itemfilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel) public virtual void Initialise(IItemFilterBlockBase itemFilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel)
{ {
BaseBlock = itemfilterBlock; BaseBlock = itemFilterBlock;
_parentScriptViewModel = itemFilterScriptViewModel; _parentScriptViewModel = itemFilterScriptViewModel;
CopyBlockCommand = new RelayCommand(OnCopyBlockCommand); CopyBlockCommand = new RelayCommand(OnCopyBlockCommand);

View File

@@ -11,6 +11,7 @@ namespace Filtration.ViewModels
string Comment { get; } string Comment { get; }
bool IsExpanded { get; set; } bool IsExpanded { get; set; }
bool HasVisibleChild { get; } bool HasVisibleChild { get; }
int ChildCount { get; set; }
} }
internal class ItemFilterCommentBlockViewModel : ItemFilterBlockViewModelBase, IItemFilterCommentBlockViewModel internal class ItemFilterCommentBlockViewModel : ItemFilterBlockViewModelBase, IItemFilterCommentBlockViewModel
@@ -28,13 +29,13 @@ namespace Filtration.ViewModels
ToggleSectionCommand = new RelayCommand(OnToggleSectionCommand); ToggleSectionCommand = new RelayCommand(OnToggleSectionCommand);
} }
public override void Initialise(IItemFilterBlockBase itemfilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel) public override void Initialise(IItemFilterBlockBase itemFilterBlock, IItemFilterScriptViewModel itemFilterScriptViewModel)
{ {
_parentScriptViewModel = itemFilterScriptViewModel; _parentScriptViewModel = itemFilterScriptViewModel;
ItemFilterCommentBlock = itemfilterBlock as IItemFilterCommentBlock; ItemFilterCommentBlock = itemFilterBlock as IItemFilterCommentBlock;
BaseBlock = ItemFilterCommentBlock; BaseBlock = ItemFilterCommentBlock;
base.Initialise(itemfilterBlock, itemFilterScriptViewModel); base.Initialise(itemFilterBlock, itemFilterScriptViewModel);
} }
public RelayCommand ToggleSectionCommand { get; } public RelayCommand ToggleSectionCommand { get; }
@@ -43,10 +44,7 @@ namespace Filtration.ViewModels
public string Comment public string Comment
{ {
get get => ItemFilterCommentBlock.Comment;
{
return ItemFilterCommentBlock.Comment;
}
set set
{ {
if (ItemFilterCommentBlock.Comment != value) if (ItemFilterCommentBlock.Comment != value)

View File

@@ -6,17 +6,17 @@ using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Reactive.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Data; using System.Windows.Data;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using DynamicData.Binding;
using Filtration.Common.Services; using Filtration.Common.Services;
using Filtration.Common.ViewModels; using Filtration.Common.ViewModels;
using Filtration.Interface; using Filtration.Interface;
using Filtration.ObjectModel; using Filtration.ObjectModel;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.BlockItemTypes; using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Commands; using Filtration.ObjectModel.Commands;
using Filtration.ObjectModel.Commands.ItemFilterScript; using Filtration.ObjectModel.Commands.ItemFilterScript;
@@ -76,6 +76,7 @@ namespace Filtration.ViewModels
RelayCommand CollapseAllSectionsCommand { get; } RelayCommand CollapseAllSectionsCommand { get; }
RelayCommand<bool> ToggleShowAdvancedCommand { get; } RelayCommand<bool> ToggleShowAdvancedCommand { get; }
RelayCommand ClearFilterCommand { get; } RelayCommand ClearFilterCommand { get; }
RelayCommand ClearStylesCommand { get; }
void AddCommentBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase); void AddCommentBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase); void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
@@ -106,17 +107,14 @@ namespace Filtration.ViewModels
private readonly IItemFilterPersistenceService _persistenceService; private readonly IItemFilterPersistenceService _persistenceService;
private readonly IMessageBoxService _messageBoxService; private readonly IMessageBoxService _messageBoxService;
private readonly IClipboardService _clipboardService; private readonly IClipboardService _clipboardService;
private readonly IBlockGroupHierarchyBuilder _blockGroupHierarchyBuilder;
private bool _isDirty; private bool _isDirty;
private readonly ObservableCollection<IItemFilterBlockViewModelBase> _selectedBlockViewModels;
private IItemFilterCommentBlockViewModel _sectionBrowserSelectedBlockViewModel; private IItemFilterCommentBlockViewModel _sectionBrowserSelectedBlockViewModel;
private readonly ObservableCollection<IItemFilterBlockViewModelBase> _itemFilterBlockViewModels;
private Predicate<IItemFilterBlockViewModel> _blockFilterPredicate; private Predicate<IItemFilterBlockViewModel> _blockFilterPredicate;
private ICommandManager _scriptCommandManager; private ICommandManager _scriptCommandManager;
private List<IDisposable> _subscriptions;
private ObservableCollection<string> _customSoundsAvailable; private ObservableCollection<string> _customSoundsAvailable;
private ListCollectionView _viewItemFilterBlockViewModels;
private readonly List<IItemFilterBlockViewModelBase> _lastAddedBlocks; private readonly List<IItemFilterBlockViewModelBase> _lastAddedBlocks;
public ItemFilterScriptViewModel(IItemFilterBlockBaseViewModelFactory itemFilterBlockBaseViewModelFactory, public ItemFilterScriptViewModel(IItemFilterBlockBaseViewModelFactory itemFilterBlockBaseViewModelFactory,
@@ -125,8 +123,7 @@ namespace Filtration.ViewModels
IAvalonDockWorkspaceViewModel avalonDockWorkspaceViewModel, IAvalonDockWorkspaceViewModel avalonDockWorkspaceViewModel,
IItemFilterPersistenceService persistenceService, IItemFilterPersistenceService persistenceService,
IMessageBoxService messageBoxService, IMessageBoxService messageBoxService,
IClipboardService clipboardService, IClipboardService clipboardService)
IBlockGroupHierarchyBuilder blockGroupHierarchyBuilder)
{ {
_itemFilterBlockBaseViewModelFactory = itemFilterBlockBaseViewModelFactory; _itemFilterBlockBaseViewModelFactory = itemFilterBlockBaseViewModelFactory;
_blockTranslator = blockTranslator; _blockTranslator = blockTranslator;
@@ -136,14 +133,20 @@ namespace Filtration.ViewModels
_persistenceService = persistenceService; _persistenceService = persistenceService;
_messageBoxService = messageBoxService; _messageBoxService = messageBoxService;
_clipboardService = clipboardService; _clipboardService = clipboardService;
_blockGroupHierarchyBuilder = blockGroupHierarchyBuilder; _subscriptions = new List<IDisposable>();
_itemFilterBlockViewModels = new ObservableCollection<IItemFilterBlockViewModelBase>(); ItemFilterBlockViewModels = new ObservableCollection<IItemFilterBlockViewModelBase>();
_selectedBlockViewModels = new ObservableCollection<IItemFilterBlockViewModelBase>(); SelectedBlockViewModels = new ObservableCollection<IItemFilterBlockViewModelBase>();
_selectedBlockViewModels.CollectionChanged += (s, e) =>
{ _subscriptions.Add(
SelectedBlockViewModels.ToObservableChangeSet()
.Throttle(TimeSpan.FromMilliseconds(30))
.Subscribe(x => {
RaisePropertyChanged(nameof(SelectedBlockViewModels)); RaisePropertyChanged(nameof(SelectedBlockViewModels));
RaisePropertyChanged(nameof(LastSelectedBlockViewModel)); RaisePropertyChanged(nameof(LastSelectedBlockViewModel));
}; Messenger.Default.Send(new NotificationMessage("LastSelectedBlockChanged"));
})
);
_lastAddedBlocks = new List<IItemFilterBlockViewModelBase>(); _lastAddedBlocks = new List<IItemFilterBlockViewModelBase>();
_showAdvanced = Settings.Default.ShowAdvanced; _showAdvanced = Settings.Default.ShowAdvanced;
@@ -154,8 +157,9 @@ namespace Filtration.ViewModels
ToggleShowAdvancedCommand = new RelayCommand<bool>(OnToggleShowAdvancedCommand); ToggleShowAdvancedCommand = new RelayCommand<bool>(OnToggleShowAdvancedCommand);
ClearFilterCommand = new RelayCommand(OnClearFilterCommand, () => BlockFilterPredicate != null); ClearFilterCommand = new RelayCommand(OnClearFilterCommand, () => BlockFilterPredicate != null);
ClearStylesCommand = new RelayCommand(OnClearStylesCommand, () => SelectedBlockViewModels.OfType<IItemFilterBlockViewModel>().Any());
CloseCommand = new RelayCommand(async () => await OnCloseCommand()); CloseCommand = new RelayCommand(async () => await OnCloseCommand());
DeleteBlockCommand = new RelayCommand(OnDeleteBlockCommand, () => CanModifySelectedBlocks()); DeleteBlockCommand = new RelayCommand(OnDeleteBlockCommand, CanModifySelectedBlocks);
MoveBlockToTopCommand = new RelayCommand(OnMoveBlockToTopCommand, () => SelectedBlockViewModels.Count > 0 && CanModifySelectedBlocks()); MoveBlockToTopCommand = new RelayCommand(OnMoveBlockToTopCommand, () => SelectedBlockViewModels.Count > 0 && CanModifySelectedBlocks());
MoveBlockToBottomCommand = new RelayCommand(OnMoveBlockToBottomCommand, () => SelectedBlockViewModels.Count > 0 && CanModifySelectedBlocks()); MoveBlockToBottomCommand = new RelayCommand(OnMoveBlockToBottomCommand, () => SelectedBlockViewModels.Count > 0 && CanModifySelectedBlocks());
MoveBlockUpCommand = new RelayCommand(OnMoveBlockUpCommand, () => SelectedBlockViewModels.Count == 1 && ViewItemFilterBlockViewModels.IndexOf(LastSelectedBlockViewModel) > 0); MoveBlockUpCommand = new RelayCommand(OnMoveBlockUpCommand, () => SelectedBlockViewModels.Count == 1 && ViewItemFilterBlockViewModels.IndexOf(LastSelectedBlockViewModel) > 0);
@@ -182,23 +186,6 @@ namespace Filtration.ViewModels
icon.UriSource = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/script_icon.png"); icon.UriSource = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/script_icon.png");
icon.EndInit(); icon.EndInit();
IconSource = icon; IconSource = icon;
_customSoundsAvailable = new ObservableCollection<string>();
var poeFolderFiles = Directory.GetFiles(persistenceService.DefaultPathOfExileDirectory() + "\\").Where(
s => s.EndsWith(".mp3")
|| s.EndsWith(".wav")
|| s.EndsWith(".wma")
|| s.EndsWith(".3gp")
|| s.EndsWith(".aag")
|| s.EndsWith(".m4a")
|| s.EndsWith(".ogg")
).OrderBy(f => f);
foreach(var file in poeFolderFiles)
{
_customSoundsAvailable.Add(file.Replace(persistenceService.DefaultPathOfExileDirectory() + "\\", ""));
}
} }
public void Initialise(IItemFilterScript itemFilterScript, bool newScript) public void Initialise(IItemFilterScript itemFilterScript, bool newScript)
@@ -207,6 +194,8 @@ namespace Filtration.ViewModels
Script = itemFilterScript; Script = itemFilterScript;
_scriptCommandManager = Script.CommandManager; _scriptCommandManager = Script.CommandManager;
InitialiseCustomSounds();
AddItemFilterBlockViewModels(Script.ItemFilterBlocks, -1); AddItemFilterBlockViewModels(Script.ItemFilterBlocks, -1);
UpdateChildCount(); UpdateChildCount();
@@ -224,7 +213,6 @@ namespace Filtration.ViewModels
} }
Script.ItemFilterBlocks.CollectionChanged += ItemFilterBlocksOnCollectionChanged; Script.ItemFilterBlocks.CollectionChanged += ItemFilterBlocksOnCollectionChanged;
_customSoundsAvailable.CollectionChanged += CustomSoundsAvailableOnCollectionChanged;
_filenameIsFake = newScript; _filenameIsFake = newScript;
@@ -236,8 +224,32 @@ namespace Filtration.ViewModels
Title = Filename; Title = Filename;
ContentId = "ScriptContentId"; ContentId = "ScriptContentId";
if (!Settings.Default.BlocksExpandedOnOpen)
{
CollapseAllSections(); CollapseAllSections();
} }
}
private void InitialiseCustomSounds()
{
_customSoundsAvailable = new ObservableCollection<string>();
_customSoundsAvailable.CollectionChanged += CustomSoundsAvailableOnCollectionChanged;
var poeFolderFiles = Directory.GetFiles(_persistenceService.ItemFilterScriptDirectory + "\\").Where(
s => s.EndsWith(".mp3")
|| s.EndsWith(".wav")
|| s.EndsWith(".wma")
|| s.EndsWith(".3gp")
|| s.EndsWith(".aag")
|| s.EndsWith(".m4a")
|| s.EndsWith(".ogg")
).OrderBy(f => f);
foreach (var file in poeFolderFiles)
{
_customSoundsAvailable.Add(file.Replace(_persistenceService.ItemFilterScriptDirectory + "\\", ""));
}
}
private void ItemFilterBlocksOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs) private void ItemFilterBlocksOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
{ {
@@ -250,7 +262,7 @@ namespace Filtration.ViewModels
} }
case NotifyCollectionChangedAction.Remove: case NotifyCollectionChangedAction.Remove:
{ {
RemoveItemFilterBlockviewModels(notifyCollectionChangedEventArgs.OldItems.Cast<IItemFilterBlockBase>()); RemoveItemFilterBlockViewModels(notifyCollectionChangedEventArgs.OldItems.Cast<IItemFilterBlockBase>());
break; break;
} }
default: default:
@@ -288,8 +300,7 @@ namespace Filtration.ViewModels
_lastAddedBlocks.Add(vm); _lastAddedBlocks.Add(vm);
var itemBlock = itemFilterBlock as IItemFilterBlock; if (itemFilterBlock is IItemFilterBlock itemBlock)
if (itemBlock != null)
{ {
foreach (var customSoundBlockItem in itemBlock.BlockItems.OfType<CustomSoundBlockItem>()) foreach (var customSoundBlockItem in itemBlock.BlockItems.OfType<CustomSoundBlockItem>())
{ {
@@ -302,7 +313,7 @@ namespace Filtration.ViewModels
} }
} }
private void RemoveItemFilterBlockviewModels(IEnumerable<IItemFilterBlockBase> itemFilterBlocks) private void RemoveItemFilterBlockViewModels(IEnumerable<IItemFilterBlockBase> itemFilterBlocks)
{ {
foreach (var itemFilterBlock in itemFilterBlocks) foreach (var itemFilterBlock in itemFilterBlocks)
{ {
@@ -318,7 +329,7 @@ namespace Filtration.ViewModels
private void UpdateFilteredBlockList() private void UpdateFilteredBlockList()
{ {
ICollectionView filteredBlocks = CollectionViewSource.GetDefaultView(_itemFilterBlockViewModels); ICollectionView filteredBlocks = CollectionViewSource.GetDefaultView(ItemFilterBlockViewModels);
filteredBlocks.Filter = BlockFilter; filteredBlocks.Filter = BlockFilter;
ItemFilterCommentBlockViewModel previousSection = new ItemFilterCommentBlockViewModel(); ItemFilterCommentBlockViewModel previousSection = new ItemFilterCommentBlockViewModel();
@@ -328,16 +339,16 @@ namespace Filtration.ViewModels
{ {
previousSection.VisibleChildCount++; previousSection.VisibleChildCount++;
} }
else if (block is ItemFilterCommentBlockViewModel) else if (block is ItemFilterCommentBlockViewModel model)
{ {
previousSection = block as ItemFilterCommentBlockViewModel; previousSection = model;
previousSection.VisibleChildCount = 0; previousSection.VisibleChildCount = 0;
} }
} }
_viewItemFilterBlockViewModels = (ListCollectionView)CollectionViewSource.GetDefaultView( ViewItemFilterBlockViewModels = (ListCollectionView)CollectionViewSource.GetDefaultView(
filteredBlocks.Cast<IItemFilterBlockViewModelBase>().ToList()); filteredBlocks.Cast<IItemFilterBlockViewModelBase>().ToList());
_viewItemFilterBlockViewModels.Filter = BlockVisibilityFilter; ViewItemFilterBlockViewModels.Filter = BlockVisibilityFilter;
Messenger.Default.Send(new NotificationMessage("SectionsChanged")); Messenger.Default.Send(new NotificationMessage("SectionsChanged"));
SelectedBlockViewModels.Clear(); SelectedBlockViewModels.Clear();
@@ -354,24 +365,24 @@ namespace Filtration.ViewModels
previousSection.ChildCount++; previousSection.ChildCount++;
block.IsVisible = previousSection.IsExpanded; block.IsVisible = previousSection.IsExpanded;
} }
else if (block is ItemFilterCommentBlockViewModel) else if (block is ItemFilterCommentBlockViewModel model)
{ {
previousSection = block as ItemFilterCommentBlockViewModel; previousSection = model;
previousSection.ChildCount = 0; previousSection.ChildCount = 0;
} }
} }
} }
private List<IItemFilterBlockViewModelBase> getChildren(IItemFilterCommentBlockViewModel targetBlockViewModel) private List<IItemFilterBlockViewModelBase> GetChildren(IItemFilterCommentBlockViewModel targetBlockViewModel)
{ {
return ItemFilterBlockViewModels.ToList().GetRange(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel) + 1, return ItemFilterBlockViewModels.ToList().GetRange(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel) + 1,
(targetBlockViewModel as ItemFilterCommentBlockViewModel).ChildCount); targetBlockViewModel.ChildCount);
} }
private List<int> getChildrenIndexes(IItemFilterCommentBlockViewModel targetBlockViewModel) private List<int> GetChildrenIndexes(IItemFilterCommentBlockViewModel targetBlockViewModel)
{ {
return Enumerable.Range(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel) + 1, return Enumerable.Range(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel) + 1,
(targetBlockViewModel as ItemFilterCommentBlockViewModel).ChildCount).ToList(); targetBlockViewModel.ChildCount).ToList();
} }
private void ValidateSelectedBlocks() private void ValidateSelectedBlocks()
@@ -387,6 +398,7 @@ namespace Filtration.ViewModels
public RelayCommand<bool> ToggleShowAdvancedCommand { get; } public RelayCommand<bool> ToggleShowAdvancedCommand { get; }
public RelayCommand ClearFilterCommand { get; } public RelayCommand ClearFilterCommand { get; }
public RelayCommand ClearStylesCommand { get; }
public RelayCommand CloseCommand { get; } public RelayCommand CloseCommand { get; }
public RelayCommand DeleteBlockCommand { get; } public RelayCommand DeleteBlockCommand { get; }
public RelayCommand MoveBlockToTopCommand { get; } public RelayCommand MoveBlockToTopCommand { get; }
@@ -425,25 +437,16 @@ namespace Filtration.ViewModels
public ObservableCollection<string> CustomSoundsAvailable public ObservableCollection<string> CustomSoundsAvailable
{ {
get => _customSoundsAvailable; get => _customSoundsAvailable;
set private set
{ {
_customSoundsAvailable = value; _customSoundsAvailable = value;
RaisePropertyChanged(); RaisePropertyChanged();
} }
} }
public ListCollectionView ViewItemFilterBlockViewModels public ListCollectionView ViewItemFilterBlockViewModels { get; private set; }
{
get => _viewItemFilterBlockViewModels;
}
public ObservableCollection<IItemFilterBlockViewModelBase> ItemFilterBlockViewModels public ObservableCollection<IItemFilterBlockViewModelBase> ItemFilterBlockViewModels { get; }
{
get
{
return _itemFilterBlockViewModels;
}
}
private bool BlockFilter(object item) private bool BlockFilter(object item)
{ {
@@ -548,7 +551,7 @@ namespace Filtration.ViewModels
public bool HasSelectedCommentBlock() public bool HasSelectedCommentBlock()
{ {
return SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>().Count() > 0; return SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>().Any();
} }
public bool CanModifySelectedBlocks() public bool CanModifySelectedBlocks()
@@ -579,18 +582,9 @@ namespace Filtration.ViewModels
return itemFilterCommentBlock.ChildCount == itemFilterCommentBlock.VisibleChildCount; return itemFilterCommentBlock.ChildCount == itemFilterCommentBlock.VisibleChildCount;
} }
public ObservableCollection<IItemFilterBlockViewModelBase> SelectedBlockViewModels public ObservableCollection<IItemFilterBlockViewModelBase> SelectedBlockViewModels { get; }
{
get => _selectedBlockViewModels;
}
public IItemFilterBlockViewModelBase LastSelectedBlockViewModel public IItemFilterBlockViewModelBase LastSelectedBlockViewModel => SelectedBlockViewModels.Count > 0 ? SelectedBlockViewModels.Last() : null;
{
get
{
return SelectedBlockViewModels.Count > 0 ? SelectedBlockViewModels.Last() : null;
}
}
public IItemFilterCommentBlockViewModel CommentBlockBrowserBrowserSelectedBlockViewModel public IItemFilterCommentBlockViewModel CommentBlockBrowserBrowserSelectedBlockViewModel
{ {
@@ -830,6 +824,13 @@ namespace Filtration.ViewModels
private void CloseScript() private void CloseScript()
{ {
foreach (var disposable in Enumerable.Reverse(_subscriptions))
{
disposable.Dispose();
}
_subscriptions.Clear();
var openMasterThemForScript = var openMasterThemForScript =
_avalonDockWorkspaceViewModel.OpenMasterThemeForScript(this); _avalonDockWorkspaceViewModel.OpenMasterThemeForScript(this);
if (openMasterThemForScript != null) if (openMasterThemForScript != null)
@@ -852,15 +853,32 @@ namespace Filtration.ViewModels
BlockFilterPredicate = null; BlockFilterPredicate = null;
} }
private void OnClearStylesCommand()
{
ValidateSelectedBlocks();
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterBlockViewModel>())
{
var blockItems = block.Block.BlockItems;
for (var i = 0; i < blockItems.Count; i++)
{
if (blockItems[i] is IAudioVisualBlockItem)
{
blockItems.RemoveAt(i--);
}
}
block.RefreshBlockPreview();
}
}
private void OnCopyBlockCommand() private void OnCopyBlockCommand()
{ {
var blocksToCopy = new List<IItemFilterBlockViewModelBase>(); var blocksToCopy = new List<IItemFilterBlockViewModelBase>();
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterBlockViewModelBase>()) foreach (var block in SelectedBlockViewModels.OfType<IItemFilterBlockViewModelBase>())
{ {
blocksToCopy.Add(block); blocksToCopy.Add(block);
if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded) if (block is IItemFilterCommentBlockViewModel model && !model.IsExpanded)
{ {
blocksToCopy.AddRange(getChildren(block as IItemFilterCommentBlockViewModel)); blocksToCopy.AddRange(GetChildren(model));
} }
} }
@@ -877,14 +895,14 @@ namespace Filtration.ViewModels
else else
{ {
var blocksToCopy = new List<IItemFilterBlockViewModelBase> { targetBlockViewModelBase }; var blocksToCopy = new List<IItemFilterBlockViewModelBase> { targetBlockViewModelBase };
blocksToCopy.AddRange(getChildren(targetBlockViewModelBase as IItemFilterCommentBlockViewModel)); blocksToCopy.AddRange(GetChildren((IItemFilterCommentBlockViewModel)targetBlockViewModelBase));
CopyBlocks(blocksToCopy); CopyBlocks(blocksToCopy);
} }
} }
public void CopyBlocks(IEnumerable<IItemFilterBlockViewModelBase> targetBlockViewModels) public void CopyBlocks(IEnumerable<IItemFilterBlockViewModelBase> targetBlockViewModels)
{ {
if (targetBlockViewModels.Count() < 1) if (!targetBlockViewModels.Any())
{ {
return; return;
} }
@@ -907,8 +925,7 @@ namespace Filtration.ViewModels
private void OnCopyBlockStyleCommand() private void OnCopyBlockStyleCommand()
{ {
var selectedBlockViewModel = LastSelectedBlockViewModel as IItemFilterBlockViewModel; if (LastSelectedBlockViewModel is IItemFilterBlockViewModel selectedBlockViewModel)
if (selectedBlockViewModel != null)
{ {
CopyBlockStyle(selectedBlockViewModel); CopyBlockStyle(selectedBlockViewModel);
} }
@@ -939,8 +956,7 @@ namespace Filtration.ViewModels
private void OnPasteBlockStyleCommand() private void OnPasteBlockStyleCommand()
{ {
var selectedBlockViewModel = LastSelectedBlockViewModel as IItemFilterBlockViewModel; if (LastSelectedBlockViewModel is IItemFilterBlockViewModel selectedBlockViewModel)
if (selectedBlockViewModel != null)
{ {
PasteBlockStyle(selectedBlockViewModel); PasteBlockStyle(selectedBlockViewModel);
} }
@@ -969,7 +985,7 @@ namespace Filtration.ViewModels
if (commentBlock != null && !commentBlock.IsExpanded) if (commentBlock != null && !commentBlock.IsExpanded)
{ {
targetBlockViewModelBase = ItemFilterBlockViewModels[ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase) + targetBlockViewModelBase = ItemFilterBlockViewModels[ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase) +
(commentBlock as ItemFilterCommentBlockViewModel).ChildCount]; commentBlock.ChildCount];
} }
try try
@@ -1027,12 +1043,12 @@ namespace Filtration.ViewModels
var indexToMove = ItemFilterBlockViewModels.IndexOf( var indexToMove = ItemFilterBlockViewModels.IndexOf(
ViewItemFilterBlockViewModels.GetItemAt(blockIndex - 1) as IItemFilterBlockViewModelBase); ViewItemFilterBlockViewModels.GetItemAt(blockIndex - 1) as IItemFilterBlockViewModelBase);
if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel && if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel model &&
!(targetBlockViewModelBase as IItemFilterCommentBlockViewModel).IsExpanded) !model.IsExpanded)
{ {
ExecuteCommandAndSelectAdded(new MoveBlocksToIndexCommand(Script, ExecuteCommandAndSelectAdded(new MoveBlocksToIndexCommand(Script,
Enumerable.Range(ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase), Enumerable.Range(ItemFilterBlockViewModels.IndexOf(model),
(targetBlockViewModelBase as ItemFilterCommentBlockViewModel).ChildCount + 1).ToList(), indexToMove)); model.ChildCount + 1).ToList(), indexToMove));
if (_lastAddedBlocks.Count > 0) if (_lastAddedBlocks.Count > 0)
{ {
ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel); ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel);
@@ -1069,13 +1085,13 @@ namespace Filtration.ViewModels
indexToMove += (belowBlock as ItemFilterCommentBlockViewModel).ChildCount; indexToMove += (belowBlock as ItemFilterCommentBlockViewModel).ChildCount;
} }
if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel && if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel model &&
!(targetBlockViewModelBase as IItemFilterCommentBlockViewModel).IsExpanded) !model.IsExpanded)
{ {
indexToMove -= (targetBlockViewModelBase as ItemFilterCommentBlockViewModel).ChildCount; indexToMove -= model.ChildCount;
ExecuteCommandAndSelectAdded(new MoveBlocksToIndexCommand(Script, ExecuteCommandAndSelectAdded(new MoveBlocksToIndexCommand(Script,
Enumerable.Range(ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase), Enumerable.Range(ItemFilterBlockViewModels.IndexOf(model),
(targetBlockViewModelBase as ItemFilterCommentBlockViewModel).ChildCount + 1).ToList(), indexToMove)); model.ChildCount + 1).ToList(), indexToMove));
if (_lastAddedBlocks.Count > 0) if (_lastAddedBlocks.Count > 0)
{ {
ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel); ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel);
@@ -1100,11 +1116,10 @@ namespace Filtration.ViewModels
public void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase) public void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase)
{ {
if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel && !(targetBlockViewModelBase as IItemFilterCommentBlockViewModel).IsExpanded) if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel model && !model.IsExpanded)
{ {
ToggleSection(targetBlockViewModelBase as IItemFilterCommentBlockViewModel); ToggleSection(model);
targetBlockViewModelBase = ItemFilterBlockViewModels[ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase) + targetBlockViewModelBase = ItemFilterBlockViewModels[ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase) + model.ChildCount];
(targetBlockViewModelBase as ItemFilterCommentBlockViewModel).ChildCount];
} }
ExecuteCommandAndSelectAdded(new AddBlockCommand(Script, targetBlockViewModelBase?.BaseBlock)); ExecuteCommandAndSelectAdded(new AddBlockCommand(Script, targetBlockViewModelBase?.BaseBlock));
@@ -1136,7 +1151,7 @@ namespace Filtration.ViewModels
blocksToDelete.Add(block); blocksToDelete.Add(block);
if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded) if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded)
{ {
blocksToDelete.AddRange(getChildren(block as IItemFilterCommentBlockViewModel)); blocksToDelete.AddRange(GetChildren(block as IItemFilterCommentBlockViewModel));
} }
} }
@@ -1204,7 +1219,7 @@ namespace Filtration.ViewModels
sourceIndexes.Add(ItemFilterBlockViewModels.IndexOf(block)); sourceIndexes.Add(ItemFilterBlockViewModels.IndexOf(block));
if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded) if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded)
{ {
sourceIndexes.AddRange(getChildrenIndexes(block as IItemFilterCommentBlockViewModel)); sourceIndexes.AddRange(GetChildrenIndexes(block as IItemFilterCommentBlockViewModel));
} }
} }
@@ -1227,11 +1242,11 @@ namespace Filtration.ViewModels
public void MoveBlockToTop(IItemFilterBlockViewModelBase targetBlockViewModelBase) public void MoveBlockToTop(IItemFilterBlockViewModelBase targetBlockViewModelBase)
{ {
if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel && !(targetBlockViewModelBase as IItemFilterCommentBlockViewModel).IsExpanded) if (targetBlockViewModelBase is IItemFilterCommentBlockViewModel model && !model.IsExpanded)
{ {
ExecuteCommandAndSelectAdded(new MoveBlocksToTopCommand(Script, ExecuteCommandAndSelectAdded(new MoveBlocksToTopCommand(Script,
Enumerable.Range(ItemFilterBlockViewModels.IndexOf(targetBlockViewModelBase), Enumerable.Range(ItemFilterBlockViewModels.IndexOf(model),
(targetBlockViewModelBase as ItemFilterCommentBlockViewModel).ChildCount + 1).ToList())); model.ChildCount + 1).ToList()));
if (_lastAddedBlocks.Count > 0) if (_lastAddedBlocks.Count > 0)
{ {
ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel); ToggleSection(_lastAddedBlocks[0] as IItemFilterCommentBlockViewModel);
@@ -1251,18 +1266,18 @@ namespace Filtration.ViewModels
foreach (var block in targetCommentBlockViewModels) foreach (var block in targetCommentBlockViewModels)
{ {
sourceIndexes.Add(ItemFilterBlockViewModels.IndexOf(block)); sourceIndexes.Add(ItemFilterBlockViewModels.IndexOf(block));
if (block is IItemFilterCommentBlockViewModel && !(block as IItemFilterCommentBlockViewModel).IsExpanded) if (block is IItemFilterCommentBlockViewModel model && !model.IsExpanded)
{ {
sourceIndexes.AddRange(getChildrenIndexes(block as IItemFilterCommentBlockViewModel)); sourceIndexes.AddRange(GetChildrenIndexes(model));
} }
} }
ExecuteCommandAndSelectAdded(new MoveBlocksToTopCommand(Script, sourceIndexes)); ExecuteCommandAndSelectAdded(new MoveBlocksToTopCommand(Script, sourceIndexes));
for (var i = 0; i < sourceIndexes.Count; i++) for (var i = 0; i < sourceIndexes.Count; i++)
{ {
if (ItemFilterBlockViewModels[i] as IItemFilterCommentBlockViewModel != null) if (ItemFilterBlockViewModels[i] is IItemFilterCommentBlockViewModel model)
{ {
ToggleSection(ItemFilterBlockViewModels[i] as IItemFilterCommentBlockViewModel); ToggleSection(model);
} }
} }
@@ -1294,11 +1309,11 @@ namespace Filtration.ViewModels
{ {
foreach (var block in SelectedBlockViewModels) foreach (var block in SelectedBlockViewModels)
{ {
if (block is IItemFilterCommentBlockViewModel) if (block is IItemFilterCommentBlockViewModel model)
{ {
if (!(block as IItemFilterCommentBlockViewModel).IsExpanded) if (!model.IsExpanded)
{ {
foreach (var child in getChildren(block as IItemFilterCommentBlockViewModel)) foreach (var child in GetChildren(model))
{ {
((IItemFilterBlockViewModel)child).BlockEnabled = false; ((IItemFilterBlockViewModel)child).BlockEnabled = false;
} }
@@ -1315,11 +1330,11 @@ namespace Filtration.ViewModels
{ {
foreach (var block in SelectedBlockViewModels) foreach (var block in SelectedBlockViewModels)
{ {
if (block is IItemFilterCommentBlockViewModel) if (block is IItemFilterCommentBlockViewModel model)
{ {
if (!(block as IItemFilterCommentBlockViewModel).IsExpanded) if (!model.IsExpanded)
{ {
foreach (var child in getChildren(block as IItemFilterCommentBlockViewModel)) foreach (var child in GetChildren(model))
{ {
((IItemFilterBlockViewModel)child).BlockEnabled = true; ((IItemFilterBlockViewModel)child).BlockEnabled = true;
} }
@@ -1336,7 +1351,7 @@ namespace Filtration.ViewModels
{ {
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>()) foreach (var block in SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>())
{ {
foreach (var child in getChildren(block as IItemFilterCommentBlockViewModel)) foreach (var child in GetChildren(block))
{ {
((IItemFilterBlockViewModel)child).BlockEnabled = false; ((IItemFilterBlockViewModel)child).BlockEnabled = false;
} }
@@ -1347,7 +1362,7 @@ namespace Filtration.ViewModels
{ {
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>()) foreach (var block in SelectedBlockViewModels.OfType<IItemFilterCommentBlockViewModel>())
{ {
foreach (var child in getChildren(block as IItemFilterCommentBlockViewModel)) foreach (var child in GetChildren(block))
{ {
((IItemFilterBlockViewModel)child).BlockEnabled = true; ((IItemFilterBlockViewModel)child).BlockEnabled = true;
} }
@@ -1380,7 +1395,7 @@ namespace Filtration.ViewModels
{ {
var newState = !targetCommentBlockViewModelBase.IsExpanded; var newState = !targetCommentBlockViewModelBase.IsExpanded;
targetCommentBlockViewModelBase.IsExpanded = newState; targetCommentBlockViewModelBase.IsExpanded = newState;
foreach (var child in getChildren(targetCommentBlockViewModelBase)) foreach (var child in GetChildren(targetCommentBlockViewModelBase))
{ {
child.IsVisible = newState; child.IsVisible = newState;
} }
@@ -1395,15 +1410,11 @@ namespace Filtration.ViewModels
private void CollapseAllSections() private void CollapseAllSections()
{ {
for (int i = 0; i < ItemFilterBlockViewModels.Count; i++) foreach (var model in ItemFilterBlockViewModels.OfType<IItemFilterCommentBlockViewModel>())
{ {
var block = ItemFilterBlockViewModels[i] as IItemFilterCommentBlockViewModel; if (model.IsExpanded)
if (block != null)
{ {
if(block.IsExpanded) ToggleSection(model, true);
{
ToggleSection(block, true);
}
} }
} }
@@ -1414,12 +1425,11 @@ namespace Filtration.ViewModels
private void ExpandAllSections() private void ExpandAllSections()
{ {
for (int i = 0; i < ItemFilterBlockViewModels.Count; i++) foreach (var model in ItemFilterBlockViewModels.OfType<IItemFilterCommentBlockViewModel>())
{ {
var block = ItemFilterBlockViewModels[i] as IItemFilterCommentBlockViewModel; if (!model.IsExpanded)
if (block != null && !block.IsExpanded)
{ {
ToggleSection(block, true); ToggleSection(model, true);
} }
} }

View File

@@ -6,7 +6,6 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Forms;
using System.Windows.Media; using System.Windows.Media;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using Filtration.Common.Services; using Filtration.Common.Services;
@@ -45,10 +44,12 @@ namespace Filtration.ViewModels
{ {
private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private readonly IItemFilterScriptDirectoryService _itemFilterScriptDirectoryService;
private readonly IItemFilterScriptRepository _itemFilterScriptRepository; private readonly IItemFilterScriptRepository _itemFilterScriptRepository;
private readonly IItemFilterScriptTranslator _itemFilterScriptTranslator; private readonly IItemFilterScriptTranslator _itemFilterScriptTranslator;
private readonly IReplaceColorsViewModel _replaceColorsViewModel; private readonly IReplaceColorsViewModel _replaceColorsViewModel;
private readonly IAvalonDockWorkspaceViewModel _avalonDockWorkspaceViewModel; private readonly IAvalonDockWorkspaceViewModel _avalonDockWorkspaceViewModel;
private readonly IScriptLoadingService _scriptLoadingService;
private readonly IThemeProvider _themeProvider; private readonly IThemeProvider _themeProvider;
private readonly IThemeService _themeService; private readonly IThemeService _themeService;
private readonly IMessageBoxService _messageBoxService; private readonly IMessageBoxService _messageBoxService;
@@ -58,10 +59,12 @@ namespace Filtration.ViewModels
private int _windowWidth; private int _windowWidth;
private int _windowHeight; private int _windowHeight;
public MainWindowViewModel(IItemFilterScriptRepository itemFilterScriptRepository, public MainWindowViewModel(IItemFilterScriptDirectoryService itemFilterScriptDirectoryService,
IItemFilterScriptRepository itemFilterScriptRepository,
IItemFilterScriptTranslator itemFilterScriptTranslator, IItemFilterScriptTranslator itemFilterScriptTranslator,
IReplaceColorsViewModel replaceColorsViewModel, IReplaceColorsViewModel replaceColorsViewModel,
IAvalonDockWorkspaceViewModel avalonDockWorkspaceViewModel, IAvalonDockWorkspaceViewModel avalonDockWorkspaceViewModel,
IScriptLoadingService scriptLoadingService,
ISettingsPageViewModel settingsPageViewModel, ISettingsPageViewModel settingsPageViewModel,
IThemeProvider themeProvider, IThemeProvider themeProvider,
IThemeService themeService, IThemeService themeService,
@@ -69,10 +72,12 @@ namespace Filtration.ViewModels
IClipboardService clipboardService, IClipboardService clipboardService,
IUpdateViewModel updateViewModel) IUpdateViewModel updateViewModel)
{ {
_itemFilterScriptDirectoryService = itemFilterScriptDirectoryService;
_itemFilterScriptRepository = itemFilterScriptRepository; _itemFilterScriptRepository = itemFilterScriptRepository;
_itemFilterScriptTranslator = itemFilterScriptTranslator; _itemFilterScriptTranslator = itemFilterScriptTranslator;
_replaceColorsViewModel = replaceColorsViewModel; _replaceColorsViewModel = replaceColorsViewModel;
_avalonDockWorkspaceViewModel = avalonDockWorkspaceViewModel; _avalonDockWorkspaceViewModel = avalonDockWorkspaceViewModel;
_scriptLoadingService = scriptLoadingService;
SettingsPageViewModel = settingsPageViewModel; SettingsPageViewModel = settingsPageViewModel;
_themeProvider = themeProvider; _themeProvider = themeProvider;
_themeService = themeService; _themeService = themeService;
@@ -142,11 +147,7 @@ namespace Filtration.ViewModels
ToggleShowAdvancedCommand = new RelayCommand<bool>(OnToggleShowAdvancedCommand, s => ActiveDocumentIsScript); ToggleShowAdvancedCommand = new RelayCommand<bool>(OnToggleShowAdvancedCommand, s => ActiveDocumentIsScript);
ClearFiltersCommand = new RelayCommand(OnClearFiltersCommand, () => ActiveDocumentIsScript); ClearFiltersCommand = new RelayCommand(OnClearFiltersCommand, () => ActiveDocumentIsScript);
ClearStylesCommand = new RelayCommand(OnClearStylesCommand, () => ActiveDocumentIsScript);
if (string.IsNullOrEmpty(_itemFilterScriptRepository.GetItemFilterScriptDirectory()))
{
SetItemFilterScriptDirectory();
}
var icon = new BitmapImage(); var icon = new BitmapImage();
icon.BeginInit(); icon.BeginInit();
@@ -206,10 +207,6 @@ namespace Filtration.ViewModels
} }
}); });
if (!string.IsNullOrWhiteSpace(Settings.Default.LastActiveDocument) && File.Exists(Settings.Default.LastActiveDocument))
{
LoadScriptAsync(Settings.Default.LastActiveDocument);
}
} }
public RelayCommand OpenScriptCommand { get; } public RelayCommand OpenScriptCommand { get; }
@@ -266,6 +263,7 @@ namespace Filtration.ViewModels
public RelayCommand<bool> ToggleShowAdvancedCommand { get; } public RelayCommand<bool> ToggleShowAdvancedCommand { get; }
public RelayCommand ClearFiltersCommand { get; } public RelayCommand ClearFiltersCommand { get; }
public RelayCommand ClearStylesCommand { get; }
public ImageSource Icon { get; private set; } public ImageSource Icon { get; private set; }
@@ -370,12 +368,12 @@ namespace Filtration.ViewModels
{ {
case ".FILTER": case ".FILTER":
{ {
await LoadScriptAsync(filename); await _scriptLoadingService.LoadScriptAsync(filename);
break; break;
} }
case ".FILTERTHEME": case ".FILTERTHEME":
{ {
await LoadThemeAsync(filename); await _scriptLoadingService.LoadThemeAsync(filename);
break; break;
} }
} }
@@ -432,32 +430,7 @@ namespace Filtration.ViewModels
return; return;
} }
await LoadScriptAsync(filePath); // TODO: fix crash await _scriptLoadingService.LoadScriptAsync(filePath);
}
private async Task LoadScriptAsync(string scriptFilename)
{
IItemFilterScriptViewModel loadedViewModel;
Messenger.Default.Send(new NotificationMessage("ShowLoadingBanner"));
try
{
loadedViewModel = await _itemFilterScriptRepository.LoadScriptFromFileAsync(scriptFilename);
}
catch (Exception e)
{
Logger.Error(e);
_messageBoxService.Show("Script Load Error", "Error loading filter script - " + e.Message,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
}
finally
{
Messenger.Default.Send(new NotificationMessage("HideLoadingBanner"));
}
_avalonDockWorkspaceViewModel.AddDocument(loadedViewModel);
} }
private async Task OnOpenThemeCommandAsync() private async Task OnOpenThemeCommandAsync()
@@ -468,27 +441,7 @@ namespace Filtration.ViewModels
return; return;
} }
await LoadThemeAsync(filePath); await _scriptLoadingService.LoadThemeAsync(filePath);
}
private async Task LoadThemeAsync(string themeFilename)
{
IThemeEditorViewModel loadedViewModel;
try
{
loadedViewModel = await _themeProvider.LoadThemeFromFile(themeFilename);
}
catch (Exception e)
{
Logger.Error(e);
_messageBoxService.Show("Theme Load Error", "Error loading filter theme - " + e.Message,
MessageBoxButton.OK,
MessageBoxImage.Error);
return;
}
_avalonDockWorkspaceViewModel.AddDocument(loadedViewModel);
} }
private async Task OnApplyThemeToScriptCommandAsync() private async Task OnApplyThemeToScriptCommandAsync()
@@ -534,7 +487,7 @@ namespace Filtration.ViewModels
var openFileDialog = new OpenFileDialog var openFileDialog = new OpenFileDialog
{ {
Filter = "Filter Files (*.filter)|*.filter|All Files (*.*)|*.*", Filter = "Filter Files (*.filter)|*.filter|All Files (*.*)|*.*",
InitialDirectory = _itemFilterScriptRepository.GetItemFilterScriptDirectory() InitialDirectory = _itemFilterScriptDirectoryService.ItemFilterScriptDirectory
}; };
return openFileDialog.ShowDialog() != true ? string.Empty : openFileDialog.FileName; return openFileDialog.ShowDialog() != true ? string.Empty : openFileDialog.FileName;
@@ -545,27 +498,12 @@ namespace Filtration.ViewModels
var openFileDialog = new OpenFileDialog var openFileDialog = new OpenFileDialog
{ {
Filter = "Filter Theme Files (*.filtertheme)|*.filtertheme|All Files (*.*)|*.*", Filter = "Filter Theme Files (*.filtertheme)|*.filtertheme|All Files (*.*)|*.*",
InitialDirectory = _itemFilterScriptRepository.GetItemFilterScriptDirectory() InitialDirectory = _itemFilterScriptDirectoryService.ItemFilterScriptDirectory
}; };
return openFileDialog.ShowDialog() != true ? string.Empty : openFileDialog.FileName; return openFileDialog.ShowDialog() != true ? string.Empty : openFileDialog.FileName;
} }
private void SetItemFilterScriptDirectory()
{
var dlg = new FolderBrowserDialog
{
Description = @"Select your Path of Exile data directory, usually in Documents\My Games",
ShowNewFolderButton = false
};
var result = dlg.ShowDialog();
if (result == DialogResult.OK)
{
_itemFilterScriptRepository.SetItemFilterScriptDirectory(dlg.SelectedPath);
}
}
private async Task OnSaveDocumentCommandAsync() private async Task OnSaveDocumentCommandAsync()
{ {
await ((IEditableDocument)_avalonDockWorkspaceViewModel.ActiveDocument).SaveAsync(); await ((IEditableDocument)_avalonDockWorkspaceViewModel.ActiveDocument).SaveAsync();
@@ -637,7 +575,6 @@ namespace Filtration.ViewModels
private void OnCloseDocumentCommand() private void OnCloseDocumentCommand()
{ {
Settings.Default.LastActiveDocument = "";
_avalonDockWorkspaceViewModel.ActiveDocument.Close(); _avalonDockWorkspaceViewModel.ActiveDocument.Close();
} }
@@ -736,6 +673,11 @@ namespace Filtration.ViewModels
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.ClearFilterCommand.Execute(null); _avalonDockWorkspaceViewModel.ActiveScriptViewModel.ClearFilterCommand.Execute(null);
} }
private void OnClearStylesCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.ClearStylesCommand.Execute(null);
}
private void OnAddTextColorThemeComponentCommand() private void OnAddTextColorThemeComponentCommand()
{ {
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.AddThemeComponentCommand.Execute(ThemeComponentType.TextColor); _avalonDockWorkspaceViewModel.ActiveThemeViewModel.AddThemeComponentCommand.Execute(ThemeComponentType.TextColor);
@@ -784,16 +726,17 @@ namespace Filtration.ViewModels
public async Task<bool> CloseAllDocumentsAsync() public async Task<bool> CloseAllDocumentsAsync()
{ {
Settings.Default.LastOpenScripts = string.Join("|", _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IItemFilterScriptViewModel>().Select(sc => sc.Script.FilePath));
var openDocuments = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().ToList(); var openDocuments = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().ToList();
foreach (var document in openDocuments) foreach (var document in openDocuments)
{ {
var docCount = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().Count(); if (!_avalonDockWorkspaceViewModel.OpenDocuments.Contains(document))
await document.Close();
if (_avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().Count() == docCount)
{ {
return false; continue;
} }
await document.Close();
} }
return true; return true;

View File

@@ -1,11 +1,7 @@
using System.IO; using Filtration.Properties;
using System.Windows;
using Filtration.Common.Services;
using Filtration.Properties;
using Filtration.Services; using Filtration.Services;
using GalaSoft.MvvmLight; using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.CommandWpf; using GalaSoft.MvvmLight.CommandWpf;
using Microsoft.WindowsAPICodePack.Dialogs;
namespace Filtration.ViewModels namespace Filtration.ViewModels
{ {
@@ -14,19 +10,18 @@ namespace Filtration.ViewModels
RelayCommand SetItemFilterScriptDirectoryCommand { get; } RelayCommand SetItemFilterScriptDirectoryCommand { get; }
string DefaultFilterDirectory { get; } string DefaultFilterDirectory { get; }
bool ExtraLineBetweenBlocks { get; set; } bool BlocksExpandedOnOpen { get; set; }
bool DownloadPrereleaseUpdates { get; set; } bool DownloadPrereleaseUpdates { get; set; }
bool ExtraLineBetweenBlocks { get; set; }
} }
internal class SettingsPageViewModel : ViewModelBase, ISettingsPageViewModel internal class SettingsPageViewModel : ViewModelBase, ISettingsPageViewModel
{ {
private readonly IItemFilterPersistenceService _itemFilterPersistenceService; private readonly IItemFilterScriptDirectoryService _itemFilterScriptDirectoryService;
private readonly IMessageBoxService _messageBoxService;
public SettingsPageViewModel(IItemFilterPersistenceService itemFilterPersistenceService, IMessageBoxService messageBoxService) public SettingsPageViewModel(IItemFilterScriptDirectoryService itemFilterScriptDirectoryService)
{ {
_itemFilterPersistenceService = itemFilterPersistenceService; _itemFilterScriptDirectoryService = itemFilterScriptDirectoryService;
_messageBoxService = messageBoxService;
SetItemFilterScriptDirectoryCommand = new RelayCommand(OnSetItemFilterScriptDirectoryCommand); SetItemFilterScriptDirectoryCommand = new RelayCommand(OnSetItemFilterScriptDirectoryCommand);
} }
@@ -34,10 +29,10 @@ namespace Filtration.ViewModels
public string DefaultFilterDirectory => Settings.Default.DefaultFilterDirectory; public string DefaultFilterDirectory => Settings.Default.DefaultFilterDirectory;
public bool ExtraLineBetweenBlocks public bool BlocksExpandedOnOpen
{ {
get => Settings.Default.ExtraLineBetweenBlocks; get => Settings.Default.BlocksExpandedOnOpen;
set => Settings.Default.ExtraLineBetweenBlocks = value; set => Settings.Default.BlocksExpandedOnOpen = value;
} }
public bool DownloadPrereleaseUpdates public bool DownloadPrereleaseUpdates
@@ -46,26 +41,16 @@ namespace Filtration.ViewModels
set => Settings.Default.DownloadPrereleaseUpdates = value; set => Settings.Default.DownloadPrereleaseUpdates = value;
} }
public bool ExtraLineBetweenBlocks
{
get => Settings.Default.ExtraLineBetweenBlocks;
set => Settings.Default.ExtraLineBetweenBlocks = value;
}
private void OnSetItemFilterScriptDirectoryCommand() private void OnSetItemFilterScriptDirectoryCommand()
{ {
using (var dialog = new CommonOpenFileDialog()) _itemFilterScriptDirectoryService.SetItemFilterScriptDirectory();
{
dialog.IsFolderPicker = true;
var result = dialog.ShowDialog();
if (result == CommonFileDialogResult.Ok)
{
try
{
_itemFilterPersistenceService.SetItemFilterScriptDirectory(dialog.FileName);
RaisePropertyChanged(nameof(DefaultFilterDirectory)); RaisePropertyChanged(nameof(DefaultFilterDirectory));
} }
catch (DirectoryNotFoundException)
{
_messageBoxService.Show("Error", "The entered Default Filter Directory is invalid or does not exist.",
MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}
}
}
} }
} }

View File

@@ -107,6 +107,14 @@ namespace Filtration.ViewModels.ToolPanes
private ObservableCollection<ItemFilterBlockGroupViewModel> RebuildBlockGroupViewModels(bool showAdvanced) private ObservableCollection<ItemFilterBlockGroupViewModel> RebuildBlockGroupViewModels(bool showAdvanced)
{ {
if (BlockGroupViewModels != null)
{
foreach (var viewModel in BlockGroupViewModels)
{
viewModel.ClearStatusChangeSubscriptions();
}
}
// This assumes that there will only ever be a single root node. // This assumes that there will only ever be a single root node.
return new ObservableCollection<ItemFilterBlockGroupViewModel> return new ObservableCollection<ItemFilterBlockGroupViewModel>
( (

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Linq;
using System.Windows.Media.Imaging; using System.Windows.Media.Imaging;
using Filtration.Parser.Interface.Services; using Filtration.Parser.Interface.Services;
using GalaSoft.MvvmLight.Messaging; using GalaSoft.MvvmLight.Messaging;
@@ -28,19 +29,10 @@ namespace Filtration.ViewModels.ToolPanes
Messenger.Default.Register<NotificationMessage>(this, message => Messenger.Default.Register<NotificationMessage>(this, message =>
{ {
switch (message.Notification) if (message.Notification == "LastSelectedBlockChanged")
{
case "LastSelectedBlockChanged":
{
OnLastSelectedBlockChanged(this, EventArgs.Empty); OnLastSelectedBlockChanged(this, EventArgs.Empty);
break; else if (message.Notification == "ActiveDocumentChanged")
}
case "ActiveDocumentChanged":
{
OnLastSelectedBlockChanged(this, EventArgs.Empty); OnLastSelectedBlockChanged(this, EventArgs.Empty);
break;
}
}
}); });
} }
@@ -49,7 +41,7 @@ namespace Filtration.ViewModels.ToolPanes
public string PreviewText public string PreviewText
{ {
get { return _previewText; } get => _previewText;
private set private set
{ {
_previewText = value; _previewText = value;
@@ -64,15 +56,17 @@ namespace Filtration.ViewModels.ToolPanes
private void OnLastSelectedBlockChanged(object sender, EventArgs e) private void OnLastSelectedBlockChanged(object sender, EventArgs e)
{ {
if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.LastSelectedBlockViewModel == null) if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.SelectedBlockViewModels == null ||
AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.Count == 0 ||
AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.FirstOrDefault() == null)
{ {
PreviewText = string.Empty; PreviewText = string.Empty;
return; return;
} }
PreviewText = PreviewText = AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels
_itemFilterBlockTranslator.TranslateItemFilterBlockBaseToString( .Select(s => _itemFilterBlockTranslator.TranslateItemFilterBlockBaseToString(s.BaseBlock))
AvalonDockWorkspaceViewModel.ActiveScriptViewModel.LastSelectedBlockViewModel.BaseBlock); .Aggregate((prev, curr) => prev + Environment.NewLine + Environment.NewLine + curr);
} }
} }
} }

View File

@@ -144,7 +144,6 @@ namespace Filtration.ViewModels
{ {
Visible = true; Visible = true;
NextStepButtonText = "Download"; NextStepButtonText = "Download";
RaisePropertyChanged(nameof(ReleaseNotes));
RaisePropertyChanged(nameof(Version)); RaisePropertyChanged(nameof(Version));
break; break;
} }
@@ -156,6 +155,7 @@ namespace Filtration.ViewModels
} }
case UpdateStatus.ReadyToApplyUpdate: case UpdateStatus.ReadyToApplyUpdate:
{ {
RaisePropertyChanged(nameof(ReleaseNotes));
NextStepButtonText = "Update Ready"; NextStepButtonText = "Update Ready";
break; break;
} }

View File

@@ -3,19 +3,17 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
xmlns:userControls="clr-namespace:Filtration.UserControls" xmlns:userControls="clr-namespace:Filtration.UserControls"
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit" xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
xmlns:views="clr-namespace:Filtration.Views" xmlns:views="clr-namespace:Filtration.Views"
xmlns:converters="clr-namespace:Filtration.Converters" xmlns:converters="clr-namespace:Filtration.Converters"
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel" xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase" xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:designTime="clr-namespace:Filtration.ViewModels.DesignTime"
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:ItemFilterBlockViewModel}" d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemFilterBlockViewModel, IsDesignTimeCreatable=True}"
d:DesignHeight="200" d:DesignWidth="800"> d:DesignHeight="400" d:DesignWidth="817">
<UserControl.Resources> <UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary> <ResourceDictionary>
<views:BindingProxy x:Key="Proxy" Data="{Binding}" /> <views:BindingProxy x:Key="Proxy" Data="{Binding}" />
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" /> <converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
@@ -39,8 +37,6 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources> </UserControl.Resources>
<Grid x:Name="TopLevelGrid"> <Grid x:Name="TopLevelGrid">
<Grid x:Name="DisabledBlockOverlay" IsHitTestVisible="False" Panel.ZIndex="1000" Visibility="{Binding BlockEnabled, Converter={StaticResource InverseBooleanVisibilityConverter}}"> <Grid x:Name="DisabledBlockOverlay" IsHitTestVisible="False" Panel.ZIndex="1000" Visibility="{Binding BlockEnabled, Converter={StaticResource InverseBooleanVisibilityConverter}}">
@@ -99,7 +95,7 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- BlockItems Summary Panel --> <!-- BlockItems Summary Panel -->
<StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"> <StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" Margin="0,5">
<StackPanel.Resources> <StackPanel.Resources>
<CollectionViewSource Source="{Binding SummaryBlockItems}" x:Key="SummaryBlockItemsCollectionViewSource"> <CollectionViewSource Source="{Binding SummaryBlockItems}" x:Key="SummaryBlockItemsCollectionViewSource">
<CollectionViewSource.SortDescriptions> <CollectionViewSource.SortDescriptions>
@@ -199,9 +195,9 @@
</Expander.Header> </Expander.Header>
<Grid Margin="10,5,10,5" x:Name="BlockItemsGrid"> <Grid Margin="10,5,10,5" x:Name="BlockItemsGrid">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition Height="Auto" />
<RowDefinition /> <RowDefinition Height="*" />
<RowDefinition /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<WrapPanel Grid.Row="0"> <WrapPanel Grid.Row="0">
@@ -241,23 +237,77 @@
ToolTip="Add" Background="Transparent" BorderThickness="0" Margin="3,0,0,0" /> ToolTip="Add" Background="Transparent" BorderThickness="0" Margin="3,0,0,0" />
</WrapPanel> </WrapPanel>
<!-- Regular Block Items-->
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}"> <Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition Height="Auto" />
<RowDefinition /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
Switch to Appearance Block Items
</Hyperlink>
</TextBlock>
<!-- Add Block Item Links --> <!-- Add Block Item Links -->
<ItemsControl Grid.Column="0" ItemsSource="{Binding BlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10"> <ItemsControl Grid.Column="0" ItemsSource="{Binding BlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="0,0,3,0">
<Hyperlink Command="{Binding ElementName=TopLevelGrid, Path=DataContext.AddFilterBlockItemCommand}" CommandParameter="{Binding}">
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
</Hyperlink>
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<!-- Enable/Disable Block Button -->
<userControls:EnableDisableToggleButton Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" />
<!-- Block Items -->
<Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200">
<Grid.Resources>
<CollectionViewSource Source="{Binding RegularBlockItems}" x:Key="BlockItemsCollectionViewSource">
<CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="SortOrder"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</Grid.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<userControls:BlockItemControl BlockItem="{Binding}" RemoveItemCommand="{Binding ElementName=TopLevelGrid, Path=DataContext.RemoveFilterBlockItemCommand}" RemoveEnabled="{Binding Path=., Converter={StaticResource BlockItemToRemoveEnabledVisibilityConverter}}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Grid>
<!-- Audio/Visual Block Items-->
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Add AudioVisual Block Item Links -->
<ItemsControl Grid.Column="0" ItemsSource="{Binding AudioVisualBlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
<ItemsPanelTemplate> <ItemsPanelTemplate>
<WrapPanel></WrapPanel> <WrapPanel></WrapPanel>
@@ -275,94 +325,20 @@
</ItemsControl> </ItemsControl>
<!-- Enable/Disable Block Button --> <!-- Enable/Disable Block Button -->
<ToggleButton Grid.Row="0" <userControls:EnableDisableToggleButton Grid.Row="0" Grid.Column="1" VerticalAlignment="Top" />
Grid.Column="1"
Style="{StaticResource ChromelessToggleButton}" <TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" FontStyle="Italic" HorizontalAlignment="Left" Visibility="{Binding HasAudioVisualBlockItems, Converter={StaticResource InverseBooleanVisibilityConverter}}">To change the appearance of this block, add a Text, Background or Border Block Item above.</TextBlock>
IsChecked="{Binding BlockEnabled}"
Margin="0,0,5,0"
ToolTip="Enable/Disable Block"
Cursor="Hand"
Width="25"
Height="25">
<Image RenderOptions.BitmapScalingMode="HighQuality">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding BlockEnabled}" Value="true">
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_enabled_icon.png"/>
</DataTrigger>
<DataTrigger Binding="{Binding BlockEnabled}" Value="false">
<Setter Property="Source" Value="/Filtration;component/Resources/Icons/standby_disabled_icon.png"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</ToggleButton>
<!-- Block Items --> <!-- Block Items -->
<WrapPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200"> <Grid Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" MaxHeight="200">
<WrapPanel.Resources> <Grid.Resources>
<CollectionViewSource Source="{Binding RegularBlockItems}" x:Key="BlockItemsCollectionViewSource">
<CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="SortOrder"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</WrapPanel.Resources>
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<userControls:BlockItemControl BlockItem="{Binding}" RemoveItemCommand="{Binding ElementName=TopLevelGrid, Path=DataContext.RemoveFilterBlockItemCommand}" RemoveEnabled="{Binding Path=., Converter={StaticResource BlockItemToRemoveEnabledVisibilityConverter}}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</WrapPanel>
</Grid>
<Grid Grid.Row="1" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right">
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
Switch to Regular Block Items
</Hyperlink>
</TextBlock>
<!-- Add AudioVisual Block Item Links -->
<ItemsControl ItemsSource="{Binding AudioVisualBlockItemTypesAvailable}" Grid.Row="0" Margin="0,0,0,10">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel></WrapPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBlock Margin="0,0,3,0">
<Hyperlink Command="{Binding ElementName=TopLevelGrid, Path=DataContext.AddFilterBlockItemCommand}" CommandParameter="{Binding}">
<TextBlock>+</TextBlock><TextBlock Text="{Binding Path=., Converter={StaticResource BlockItemTypeToStringConverter}}" />
</Hyperlink>
</TextBlock>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock Grid.Row="1" FontStyle="Italic" HorizontalAlignment="Left" Visibility="{Binding HasAudioVisualBlockItems, Converter={StaticResource InverseBooleanVisibilityConverter}}">To change the appearance of this block, add a Text, Background or Border Block Item above.</TextBlock>
<!-- Block Items -->
<WrapPanel Grid.Row="1" MaxHeight="200">
<WrapPanel.Resources>
<CollectionViewSource Source="{Binding AudioVisualBlockItems}" x:Key="BlockItemsCollectionViewSource"> <CollectionViewSource Source="{Binding AudioVisualBlockItems}" x:Key="BlockItemsCollectionViewSource">
<CollectionViewSource.SortDescriptions> <CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="SortOrder"/> <componentModel:SortDescription PropertyName="SortOrder"/>
</CollectionViewSource.SortDescriptions> </CollectionViewSource.SortDescriptions>
</CollectionViewSource> </CollectionViewSource>
</WrapPanel.Resources> </Grid.Resources>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}" <ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}"
ItemContainerStyle="{StaticResource BlockItemFadeInStyle}"> ItemContainerStyle="{StaticResource BlockItemFadeInStyle}">
<ItemsControl.ItemsPanel> <ItemsControl.ItemsPanel>
@@ -376,15 +352,29 @@
</DataTemplate> </DataTemplate>
</ItemsControl.ItemTemplate> </ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</WrapPanel> </ScrollViewer>
</Grid>
</Grid> </Grid>
<Grid Grid.Row="2" Margin="0,5,0,5"> <Grid Grid.Row="2" Margin="0,5,0,5">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Margin="0,0,5,0" Text="Description:" VerticalAlignment="Center" />
<TextBox Grid.Column="1" Text="{Binding BlockDescription}" /> <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,0,8">
<Hyperlink Command="{Binding SwitchBlockItemsViewCommand}">
<Grid>
<TextBlock Text="Switch to Regular Block Items" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource BooleanVisibilityConverter}}" />
<TextBlock Text="Switch to Appearance Block Items" Visibility="{Binding AudioVisualBlockItemsGridVisible, Converter={StaticResource InverseBooleanVisibilityConverter}}" />
</Grid>
</Hyperlink>
</TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Margin="0,0,5,0" Text="Description:" VerticalAlignment="Center" />
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding BlockDescription}" />
</Grid> </Grid>
</Grid> </Grid>
</Expander> </Expander>

Some files were not shown because too many files have changed in this diff Show More