137 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
c6d75cfff6 Implemented auto-update using Squirrel
Reworked SettingsPageView to not need a Save Button and added a folder browser control
2018-09-26 18:40:54 +01:00
Ben Wallis
2f30eade7c Merge pull request #84 from azakhi/bugfix/fix-child-firing-block-selection-event
Fix block items firing blocklist selectionchanged
2018-09-21 17:43:07 +01:00
azakhi
e719f0bce0 Fix block items firing blocklist selectionchanged 2018-09-21 19:28:37 +03:00
Ben Wallis
dffbbf3591 Merge pull request #82 from azakhi/bugfix/81-increase-maximum-explicit-mod-rule
Increase HasExplicitMod limit to 8
2018-09-17 12:13:26 +01:00
azakhi
07a7e8d05c Increase HasExplicitMod limit to 8 2018-09-17 10:37:25 +03:00
Ben Wallis
1ba224906c Merge pull request #80 from azakhi/feature/improve-section-wide-actions
Improve commands & add multiple selection feature
2018-09-16 19:19:24 +01:00
azakhi
32523787d2 Improve commands & add multiple selection feature 2018-09-13 17:34:16 +03:00
Ben Wallis
ac6943d73b Replaced AlertSound .wav files with .mp3 files (reduces installer size by 50%~) 2018-09-08 22:34:41 +01:00
Ben Wallis
36c0aaea17 Bumped version to 0.21 2018-09-08 10:26:45 +01:00
Ben Wallis
4b38a6a4e0 Bumped version to 0.20 2018-09-08 10:14:56 +01:00
Ben Wallis
9c44dd7e7d Merge pull request #79 from azakhi/feature/12-13-preserve-user-ui-choices
Preserve UI states and last active document
2018-09-08 10:13:36 +01:00
Ben Wallis
18c878e350 Merge pull request #75 from azakhi/feature/40-add-enable-disable-to-group-browser
Feature/40 add enable disable to group browser
2018-09-08 10:12:04 +01:00
Ben Wallis
5d30888597 Merge pull request #72 from azakhi/feature/improve-pasting-multiple-blocks
Improve pasting to support different copy sources
2018-09-08 09:56:14 +01:00
azakhi
bfd722d362 Add add/delete block group support to blocks 2018-09-07 20:36:27 +03:00
azakhi
d23741555a Fix tests 2018-09-07 20:36:27 +03:00
azakhi
820aa5499e Fix block group creation 2018-09-07 20:36:27 +03:00
azakhi
1ee38b4c0e Fix block group output & expand/collapse all 2018-09-07 20:36:27 +03:00
azakhi
4bed777427 Improve parent group status logic 2018-09-07 20:36:27 +03:00
azakhi
1f6cbeec86 Add enable/disable checkbox to group browser 2018-09-07 20:36:27 +03:00
azakhi
550a2d8f25 Preserve UI states and last active document 2018-09-07 19:57:32 +03:00
Ben Wallis
ae38197052 Merge pull request #77 from GlenCFL/save-state
Set the state to dirty on using editing commands.
2018-09-07 15:05:43 +01:00
GlenCFL
4fd4ffc520 Set the state to dirty on using editing commands. 2018-09-07 04:59:57 -04:00
Ben Wallis
e15efe4e15 Merge pull request #76 from GlenCFL/transparency_rework
Make the minimap icons transparent. Take 2.
2018-09-07 08:13:27 +01:00
GlenCFL
196db4c730 Use Enum.IsDefined as suggested. 2018-09-07 03:01:45 -04:00
GlenCFL
910b2b8c7f Make the minimap icons transparent. 2018-09-06 20:01:16 -04:00
Ben Wallis
b31ce1d843 Merge pull request #74 from azakhi/feature/19-add-buttons-to-group-browser
Add clear all button & missing functions
2018-09-05 16:01:46 +01:00
azakhi
99a011c78c Add clear all button & missing functions 2018-09-05 17:55:16 +03:00
azakhi
69ce542c1a Improve pasting to support different copy sources 2018-09-04 14:18:11 +03:00
Ben Wallis
2ff9ebf242 Merge pull request #71 from azakhi/bugfix/70-fix-max-quality
Increase maximum quality to 30
2018-09-04 06:45:18 +01:00
azakhi
0eff63d706 Increase maximum quality to 30 2018-09-04 08:34:26 +03:00
Ben Wallis
1b8f37ca3a Merge pull request #65 from azakhi/bugfix/64-fix-group-browser-filter
Fix block group browser not filtering
2018-09-03 18:55:19 +01:00
Ben Wallis
b4f02f872e Merge pull request #67 from azakhi/bugfix/10-fix-default-opacity
Change default alpha value to 240
2018-09-03 18:53:09 +01:00
azakhi
cfef82e53a Change default alpha value to 240 2018-09-03 15:37:10 +03:00
azakhi
bdd121f48c Fix block group browser not filtering 2018-09-03 11:26:13 +03: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
Ben Wallis
7162e16b49 Merge pull request #59 from azakhi/improvements
Improvements
2018-08-31 15:28:18 +01:00
azakhi
324ce4d0b3 Fix binding problem 2018-08-31 17:05:21 +03:00
azakhi
de489e8b2c Fix folder bug 2018-08-31 16:54:24 +03:00
azakhi
341b1d1eb2 Make section header parsing more generic 2018-08-31 16:13:57 +03:00
azakhi
6be29dbd28 Add tests and fix theme bug 2018-08-31 16:02:17 +03:00
azakhi
3851ad51e1 Add support for comments between rules 2018-08-31 14:22:26 +03:00
azakhi
65d3e07156 Add comment support for all rule types 2018-08-31 11:21:43 +03:00
azakhi
a86ab3ec8d Use available sounds as combobox source 2018-08-31 09:40:48 +03:00
azakhi
41722e8a57 Update icons 2018-08-31 09:00:31 +03:00
Ben Wallis
3cb0a041d7 Update README.md 2018-08-30 19:31:45 +01:00
Ben Wallis
c8778bb1eb bumped version to 0.19 2018-08-30 19:28:32 +01:00
Ben Wallis
8e849d6a8f Merge pull request #57 from azakhi/master
Fix play effect parsing bug
2018-08-30 19:26:37 +01:00
azakhi
0d3f01a856 Update item classes 2018-08-30 21:23:34 +03:00
azakhi
178ff579c6 Fix PlayEffect parsing 2018-08-30 21:22:20 +03:00
Ben Wallis
30aa52e788 updated Delve Socketable Currency in ItemClasses 2018-08-30 19:20:44 +01:00
Ben Wallis
c1aee2f8f7 Merge branch 'master' of https://github.com/ben-wallis/Filtration 2018-08-30 18:31:53 +01:00
Ben Wallis
937426e9a3 added tests 2018-08-30 18:31:34 +01:00
Ben Wallis
7e0932830d Update README.md 2018-08-30 18:14:24 +01:00
Ben Wallis
15c63fa222 Merge pull request #55 from azakhi/master
Copy paste sound bug fix
2018-08-30 18:00:09 +01:00
Ben Wallis
cc986eea21 updated version to 0.18 and 2016 dates to 2018 2018-08-30 17:59:20 +01:00
azakhi
c260014a16 Add requested changes 2018-08-30 19:56:47 +03:00
azakhi
8f0f73f185 Copy paste sound bug fix 2018-08-30 19:33:46 +03:00
Ben Wallis
15143f738f Fixed crash when scrolling with open blocks 2018-08-29 22:45:47 +01:00
Ben Wallis
dc6ed934b2 Merge pull request #54 from azakhi/master
3.4 Update and Improvements
2018-08-29 22:39:36 +01:00
azakhi
78b4ddc862 Add new filter fuatures 2018-08-29 20:12:02 +03:00
azakhi
a09f0a5090 Add custom sound theme support 2018-08-29 13:11:41 +03:00
azakhi
2958d93b33 Add Custom Sound block 2018-08-27 22:43:01 +03:00
azakhi
1e9b1158bd Merge branch 'improvements' 2018-08-26 20:27:23 +03:00
azakhi
d92d34af05 Add alert sound theme support 2018-08-26 20:24:13 +03:00
azakhi
bc5a005ee7 Add font size theme support & improve theme system 2018-08-25 15:52:16 +03:00
azakhi
8ba3433dcf Refactor theme code to support different types 2018-08-24 22:07:24 +03:00
azakhi
d0bc0b6864 Add section search feature 2018-08-24 18:03:38 +03:00
azakhi
1eaf0b6fe5 Improve UI performance 2018-08-24 01:09:44 +03:00
azakhi
4c76dc9bab Improve test block for beam feature 2018-08-22 20:20:12 +03:00
azakhi
2a7df9a1ca Add a temporary block type for new beam feature 2018-08-22 13:15:50 +03:00
azakhi
add7514ce7 Fix temporary block type control 2018-08-22 11:47:32 +03:00
azakhi
0974579684 Add requested changes & minor bug fixes 2018-08-22 11:41:02 +03:00
azakhi
c0e9c534de Add temporary block type for new type 2018-08-21 17:03:42 +03:00
azakhi
780081263c Replace 'Maelström' to prevent encoding problems 2018-08-20 21:34:16 +03:00
azakhi
387f08db85 Improve parsing 2018-08-20 21:25:30 +03:00
azakhi
7fb9378304 Improve parsing & bug fixes 2018-08-20 21:25:30 +03:00
azakhi
e5209fb459 Improve UI 2018-08-20 21:25:30 +03:00
azakhi
961805272d Make comment blocks expandable & improve parsing 2018-08-20 21:25:30 +03:00
azakhi
281c7d85e1 Fix adding comment block to collapsed section 2018-08-20 21:25:30 +03:00
azakhi
57775a9e22 Start sections collapsed & restyle buttons 2018-08-20 21:25:30 +03:00
azakhi
5817295f7c Fix adding block to a collapsed section 2018-08-20 21:25:30 +03:00
azakhi
216168533f Fix pasting sections 2018-08-20 21:25:29 +03:00
azakhi
f6969a0204 Fix performance issue 2018-08-20 21:25:29 +03:00
azakhi
38053666a0 Fix collapsed section height 2018-08-20 21:25:29 +03:00
azakhi
bd730dd518 Add section features 2018-08-20 21:25:29 +03:00
azakhi
2c4096ff2c Add DisableDropSound block type 2018-08-20 21:19:18 +03:00
azakhi
738415f10a Add ElderMap block type 2018-08-12 11:15:45 +03:00
azakhi
f03e37602d Fix script desc bug in a better way 2018-08-11 12:28:13 +03:00
azakhi
2230b81257 Fix test 2018-08-10 17:27:43 +03:00
azakhi
3aa2bf488c Fix tests 2018-08-10 17:22:55 +03:00
azakhi
71b7a45f84 Add tests and small bugfixes 2018-08-10 17:08:17 +03:00
azakhi
0fd2db7076 Add new base types and classes 2018-08-09 17:12:03 +03:00
azakhi
400688573c Add new block types added in 3.3 2018-08-09 16:48:11 +03:00
Ben Wallis
52fc1f6bbc Merge branch 'master' of https://github.com/ben-wallis/Filtration 2017-12-09 16:16:29 +00:00
Ben Wallis
3f437c0109 FIL-18: Fixed first comment block being merged into the script description 2017-12-09 16:16:20 +00:00
Ben Wallis
f838b35b4c Added Murderous Eye Jewel to ItemBaseTypes.txt 2017-12-09 15:12:39 +00:00
Ben Wallis
ac706486cb Update README.md 2017-12-08 18:09:04 +00:00
Ben Wallis
3607ad362e Update README.md 2017-12-08 18:08:48 +00:00
276 changed files with 10685 additions and 3291 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

@@ -3,9 +3,9 @@ using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Windows.Markup; using System.Windows.Markup;
namespace Filtration.Extensions namespace Filtration.Common.Extensions
{ {
internal class EnumerationExtension : MarkupExtension public class EnumerationExtension : MarkupExtension
{ {
private Type _enumType; private Type _enumType;

View File

@@ -4,7 +4,7 @@ using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Navigation; using System.Windows.Navigation;
namespace Filtration.Extensions namespace Filtration.Common.Extensions
{ {
public static class HyperlinkExtensions public static class HyperlinkExtensions
{ {

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" />
@@ -75,6 +73,8 @@
<Compile Include="Converters\ColorToSolidColorBrushConverter.cs" /> <Compile Include="Converters\ColorToSolidColorBrushConverter.cs" />
<Compile Include="Converters\InverseBooleanVisibilityConverter.cs" /> <Compile Include="Converters\InverseBooleanVisibilityConverter.cs" />
<Compile Include="Converters\StringToVisibilityConverter.cs" /> <Compile Include="Converters\StringToVisibilityConverter.cs" />
<Compile Include="Extensions\EnumerationExtension.cs" />
<Compile Include="Extensions\HyperlinkExtensions.cs" />
<Compile Include="Messages\ThemeClosedMessage.cs" /> <Compile Include="Messages\ThemeClosedMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\FileSystemService.cs" /> <Compile Include="Services\FileSystemService.cs" />
@@ -84,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,9 +31,24 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</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 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">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.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" />
@@ -46,6 +61,10 @@
<Compile Include="IEditableDocument.cs" /> <Compile Include="IEditableDocument.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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.

View File

@@ -1,4 +1,6 @@
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Input;
using GalaSoft.MvvmLight.CommandWpf;
namespace Filtration.Interface namespace Filtration.Interface
{ {
@@ -7,5 +9,6 @@ namespace Filtration.Interface
bool IsScript { get; } bool IsScript { get; }
bool IsTheme { get; } bool IsTheme { get; }
Task Close(); Task Close();
RelayCommand CloseCommand { get; }
} }
} }

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

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
</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,19 +11,28 @@
</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>
<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

@@ -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

@@ -67,6 +67,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
} }
[Test] [Test]
[Ignore("Outdated item filter")]
public void ProcessItemsAgainstItemFilterScript_IntegrationTest() public void ProcessItemsAgainstItemFilterScript_IntegrationTest()
{ {
//Arrange //Arrange
@@ -102,6 +103,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
} }
[Test] [Test]
[Ignore("Outdated item filter")]
public void ProcessItemsAgainstItemFilterScript_IntegrationTest_10Items() public void ProcessItemsAgainstItemFilterScript_IntegrationTest_10Items()
{ {
//Arrange //Arrange

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,9 +76,19 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="app.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</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

@@ -27,8 +27,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
} }
} }
public string Comment { get; set; }
public override string OutputText => Action.GetAttributeDescription(); public override string OutputText => Action.GetAttributeDescription();
public override string PrefixText => string.Empty; public override string PrefixText => string.Empty;

View File

@@ -17,6 +17,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public abstract Color SummaryBackgroundColor { get; } public abstract Color SummaryBackgroundColor { get; }
public abstract Color SummaryTextColor { get; } public abstract Color SummaryTextColor { get; }
public abstract int SortOrder { get; } public abstract int SortOrder { get; }
public string Comment { get; set; }
public bool IsDirty public bool IsDirty
{ {

View File

@@ -4,7 +4,7 @@ using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes namespace Filtration.ObjectModel.BlockItemBaseTypes
{ {
public abstract class ColorBlockItem : BlockItemBase, IAudioVisualBlockItem public abstract class ColorBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{ {
private Color _color; private Color _color;
private ThemeComponent _themeComponent; private ThemeComponent _themeComponent;
@@ -19,7 +19,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
} }
public override string OutputText => PrefixText + " " + +Color.R + " " + Color.G + " " public override string OutputText => PrefixText + " " + +Color.R + " " + Color.G + " "
+ Color.B + (Color.A < 255 ? " " + Color.A : string.Empty) + + Color.B + (Color.A != 240 ? " " + Color.A : string.Empty) +
(ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty); (ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty; public override string SummaryText => string.Empty;
@@ -63,7 +63,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
private void OnThemeComponentUpdated(object sender, EventArgs e) private void OnThemeComponentUpdated(object sender, EventArgs e)
{ {
Color = ((ThemeComponent) sender).Color; Color = ((ColorThemeComponent) sender).Color;
} }
private void OnThemeComponentDeleted(object sender, EventArgs e) private void OnThemeComponentDeleted(object sender, EventArgs e)

View File

@@ -0,0 +1,53 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class ColorBooleanBlockItem : BlockItemBase, IAudioVisualBlockItem
{
private Color _color;
private bool _booleanValue;
protected ColorBooleanBlockItem()
{
}
protected ColorBooleanBlockItem(Color color, bool booleanValue)
{
Color = color;
BooleanValue = booleanValue;
}
public override string OutputText => PrefixText + " " + +Color.R + " " + Color.G + " "
+ Color.B + (Color.A < 255 ? " " + Color.A : string.Empty) +
(BooleanValue ? " True" : " False");
public override string SummaryText => string.Empty;
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public Color Color
{
get { return _color; }
set
{
_color = value;
IsDirty = true;
OnPropertyChanged();
}
}
public bool BooleanValue
{
get { return _booleanValue; }
set
{
_booleanValue = value;
IsDirty = true;
OnPropertyChanged();
}
}
}
}

View File

@@ -0,0 +1,90 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
using Filtration.ObjectModel.Extensions;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class EffectColorBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private EffectColor _color;
private bool _temporary;
private ThemeComponent _themeComponent;
protected EffectColorBlockItem()
{
}
protected EffectColorBlockItem(EffectColor color, bool temporary)
{
Color = color;
Temporary = temporary;
}
public override string OutputText => PrefixText + " " + Color.GetAttributeDescription() +
(Temporary ? " " + "Temp" : string.Empty) +
(ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty;
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
set
{
if (_themeComponent == value) { return; }
if (_themeComponent != null)
{
_themeComponent.ThemeComponentUpdated -= OnThemeComponentUpdated;
_themeComponent.ThemeComponentDeleted -= OnThemeComponentDeleted;
}
if (value != null)
{
value.ThemeComponentUpdated += OnThemeComponentUpdated;
value.ThemeComponentDeleted += OnThemeComponentDeleted;
}
_themeComponent = value;
OnPropertyChanged();
}
}
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public EffectColor Color
{
get { return _color; }
set
{
_color = value;
IsDirty = true;
OnPropertyChanged();
}
}
public bool Temporary
{
get { return _temporary; }
set
{
_temporary = value;
IsDirty = true;
OnPropertyChanged();
}
}
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Color = ((EffectColorThemeComponent)sender).EffectColor;
Temporary = ((EffectColorThemeComponent)sender).Temporary;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
}
}

View File

@@ -0,0 +1,103 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
using Filtration.ObjectModel.Extensions;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class IconBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private IconSize _size;
private IconColor _color;
private IconShape _shape;
private ThemeComponent _themeComponent;
protected IconBlockItem()
{
}
protected IconBlockItem(IconSize size, IconColor color, IconShape shape)
{
Size = size;
Color = color;
Shape = shape;
}
public override string OutputText => PrefixText + " " + (int)Size + " " + Color.GetAttributeDescription() + " " + Shape.GetAttributeDescription() +
(ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty;
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
set
{
if (_themeComponent == value) { return; }
if (_themeComponent != null)
{
_themeComponent.ThemeComponentUpdated -= OnThemeComponentUpdated;
_themeComponent.ThemeComponentDeleted -= OnThemeComponentDeleted;
}
if (value != null)
{
value.ThemeComponentUpdated += OnThemeComponentUpdated;
value.ThemeComponentDeleted += OnThemeComponentDeleted;
}
_themeComponent = value;
OnPropertyChanged();
}
}
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public IconSize Size
{
get { return _size; }
set
{
_size = value;
IsDirty = true;
OnPropertyChanged();
}
}
public IconColor Color
{
get { return _color; }
set
{
_color = value;
IsDirty = true;
OnPropertyChanged();
}
}
public IconShape Shape
{
get { return _shape; }
set
{
_shape = value;
IsDirty = true;
OnPropertyChanged();
}
}
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Size = ((IconThemeComponent)sender).IconSize;
Color = ((IconThemeComponent)sender).IconColor;
Shape = ((IconThemeComponent)sender).IconShape;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
}
}

View File

@@ -1,10 +1,13 @@
using System.Windows.Media; using System;
using System.Windows.Media;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes namespace Filtration.ObjectModel.BlockItemBaseTypes
{ {
public abstract class IntegerBlockItem : BlockItemBase, IAudioVisualBlockItem public abstract class IntegerBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{ {
private int _value; private int _value;
private ThemeComponent _themeComponent;
protected IntegerBlockItem() protected IntegerBlockItem()
{ {
@@ -15,7 +18,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
Value = value; Value = value;
} }
public override string OutputText => PrefixText + " " + Value; public override string OutputText => PrefixText + " " + Value + (ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty; public override string SummaryText => string.Empty;
public override Color SummaryBackgroundColor => Colors.Transparent; public override Color SummaryBackgroundColor => Colors.Transparent;
@@ -24,6 +27,29 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public abstract int Minimum { get; } public abstract int Minimum { get; }
public abstract int Maximum { get; } public abstract int Maximum { get; }
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
set
{
if (_themeComponent == value) { return; }
if (_themeComponent != null)
{
_themeComponent.ThemeComponentUpdated -= OnThemeComponentUpdated;
_themeComponent.ThemeComponentDeleted -= OnThemeComponentDeleted;
}
if (value != null)
{
value.ThemeComponentUpdated += OnThemeComponentUpdated;
value.ThemeComponentDeleted += OnThemeComponentDeleted;
}
_themeComponent = value;
OnPropertyChanged();
}
}
public int Value public int Value
{ {
get { return _value; } get { return _value; }
@@ -34,5 +60,15 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
OnPropertyChanged(); OnPropertyChanged();
} }
} }
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Value = ((IntegerBlockItem)sender).Value;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
} }
} }

View File

@@ -0,0 +1,87 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class StrIntBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private string _value;
private int _secondValue;
private ThemeComponent _themeComponent;
protected StrIntBlockItem()
{
}
protected StrIntBlockItem(string value, int secondValue)
{
Value = value;
SecondValue = secondValue;
Value = value;
SecondValue = secondValue;
}
public override string OutputText => PrefixText + " " + Value + " " + SecondValue + (ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty;
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
set
{
if (_themeComponent == value) { return; }
if (_themeComponent != null)
{
_themeComponent.ThemeComponentUpdated -= OnThemeComponentUpdated;
_themeComponent.ThemeComponentDeleted -= OnThemeComponentDeleted;
}
if (value != null)
{
value.ThemeComponentUpdated += OnThemeComponentUpdated;
value.ThemeComponentDeleted += OnThemeComponentDeleted;
}
_themeComponent = value;
OnPropertyChanged();
}
}
public string Value
{
get { return _value; }
set
{
_value = value;
IsDirty = true;
OnPropertyChanged();
}
}
public int SecondValue
{
get { return _secondValue; }
set
{
_secondValue = value;
IsDirty = true;
OnPropertyChanged();
}
}
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Value = ((StrIntBlockItem)sender).Value;
SecondValue = ((StrIntBlockItem)sender).SecondValue;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
}
}

View File

@@ -0,0 +1,72 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class StringBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private string _value;
private ThemeComponent _themeComponent;
protected StringBlockItem()
{
}
protected StringBlockItem(string value)
{
Value = value;
}
public override string OutputText => PrefixText + " \"" + Value + "\""
+ (ThemeComponent != null ? " # " + ThemeComponent.ComponentName : string.Empty);
public override string SummaryText => string.Empty;
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
set
{
if (_themeComponent == value) { return; }
if (_themeComponent != null)
{
_themeComponent.ThemeComponentUpdated -= OnThemeComponentUpdated;
_themeComponent.ThemeComponentDeleted -= OnThemeComponentDeleted;
}
if (value != null)
{
value.ThemeComponentUpdated += OnThemeComponentUpdated;
value.ThemeComponentDeleted += OnThemeComponentDeleted;
}
_themeComponent = value;
OnPropertyChanged();
}
}
public string Value
{
get { return _value; }
set
{
_value = value;
IsDirty = true;
OnPropertyChanged();
}
}
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Value = ((StringThemeComponent)sender).Value;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
}
}

View File

@@ -1,50 +0,0 @@
using System.Windows.Media;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class StrIntBlockItem : BlockItemBase, IAudioVisualBlockItem
{
private string _value;
private int _secondValue;
protected StrIntBlockItem()
{
}
protected StrIntBlockItem(string value, int secondValue)
{
Value = value;
SecondValue = secondValue;
Value = value;
SecondValue = secondValue;
}
public override string OutputText => PrefixText + " " + Value + " " + SecondValue;
public override string SummaryText => string.Empty;
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public string Value
{
get { return _value; }
set
{
_value = value;
IsDirty = true;
OnPropertyChanged();
}
}
public int SecondValue
{
get { return _secondValue; }
set
{
_secondValue = value;
IsDirty = true;
OnPropertyChanged();
}
}
}
}

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)
@@ -16,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBackgroundColor"; public override string PrefixText => "SetBackgroundColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Background Color"; public override string DisplayHeading => "Background Color";
public override int SortOrder => 18; public override int SortOrder => 23;
} }
} }

View File

@@ -33,6 +33,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.MediumTurquoise; public override Color SummaryBackgroundColor => Colors.MediumTurquoise;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 16; public override int SortOrder => 20;
} }
} }

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)
@@ -16,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBorderColor"; public override string PrefixText => "SetBorderColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Border Color"; public override string DisplayHeading => "Border Color";
public override int SortOrder => 19; public override int SortOrder => 24;
} }
} }

View File

@@ -33,6 +33,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.MediumSeaGreen; public override Color SummaryBackgroundColor => Colors.MediumSeaGreen;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 15; public override int SortOrder => 19;
} }
} }

View File

@@ -0,0 +1,21 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class CustomSoundBlockItem : StringBlockItem
{
public CustomSoundBlockItem()
{
Value = "placeholder.mp3";
}
public CustomSoundBlockItem(string value) : base(value)
{
}
public override string PrefixText => "CustomAlertSound";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Custom Alert Sound";
public override int SortOrder => 31;
}
}

View File

@@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class DisableDropSoundBlockItem : BooleanBlockItem, IAudioVisualBlockItem
{
public DisableDropSoundBlockItem()
{
}
public DisableDropSoundBlockItem(bool booleanValue) : base(booleanValue)
{
}
public override string PrefixText => "DisableDropSound";
public override string DisplayHeading => "Disable Drop Sound";
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public override int SortOrder => 28;
}
}

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Drop Level " + FilterPredicate; public override string SummaryText => "Drop Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DodgerBlue; public override Color SummaryBackgroundColor => Colors.DodgerBlue;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 13; public override int SortOrder => 15;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 100; public override int Maximum => 100;
} }

View File

@@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class ElderMapBlockItem : BooleanBlockItem
{
public ElderMapBlockItem()
{
}
public ElderMapBlockItem(bool booleanValue) : base(booleanValue)
{
}
public override string PrefixText => "ElderMap";
public override string DisplayHeading => "Elder Map";
public override Color SummaryBackgroundColor => Colors.DarkGoldenrod;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 10;
}
}

View File

@@ -16,7 +16,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetFontSize"; public override string PrefixText => "SetFontSize";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Font Size"; public override string DisplayHeading => "Font Size";
public override int SortOrder => 20; public override int SortOrder => 25;
public override int Minimum => 11; public override int Minimum => 11;
public override int Maximum => 45; public override int Maximum => 45;
} }

View File

@@ -0,0 +1,28 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class GemLevelBlockItem : NumericFilterPredicateBlockItem
{
public GemLevelBlockItem()
{
}
public GemLevelBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
public override string PrefixText => "GemLevel";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Gem Level";
public override string SummaryText => "Gem Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 16;
public override int Minimum => 0;
public override int Maximum => 21;
}
}

View File

@@ -0,0 +1,38 @@
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class HasExplicitModBlockItem : StringListBlockItem
{
public override string PrefixText => "HasExplicitMod";
public override int MaximumAllowed => 8;
public override string DisplayHeading => "Has Explicit Mod";
public override string SummaryText
{
get
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Explicit Mods: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Explicit Mods: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Explicit Mods: (none)";
}
}
public override Color SummaryBackgroundColor => Colors.MidnightBlue;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 21;
}
}

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Height " + FilterPredicate; public override string SummaryText => "Height " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.LightBlue; public override Color SummaryBackgroundColor => Colors.LightBlue;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 10; public override int SortOrder => 12;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 6; public override int Maximum => 6;
} }

View File

@@ -20,7 +20,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Item Level " + FilterPredicate; public override string SummaryText => "Item Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray; public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 12; public override int SortOrder => 14;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 100; public override int Maximum => 100;
} }

View File

@@ -0,0 +1,24 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class MapIconBlockItem : IconBlockItem
{
public MapIconBlockItem()
{
Size = IconSize.Largest;
Color = IconColor.Red;
Shape = IconShape.Circle;
}
public MapIconBlockItem(IconSize size, IconColor iconColor, IconShape iconShape) : base(size, iconColor, iconShape)
{
}
public override string PrefixText => "MinimapIcon";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Minimap Icon";
public override int SortOrder => 29;
}
}

View File

@@ -0,0 +1,28 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class MapTierBlockItem : NumericFilterPredicateBlockItem
{
public MapTierBlockItem()
{
}
public MapTierBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
public override string PrefixText => "MapTier";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Map Tier";
public override string SummaryText => "Map Tier " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 8;
public override int Minimum => 1;
public override int Maximum => 16;
}
}

View File

@@ -0,0 +1,23 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class PlayEffectBlockItem : EffectColorBlockItem
{
public PlayEffectBlockItem()
{
Color = EffectColor.Red;
Temporary = false;
}
public PlayEffectBlockItem(EffectColor effectColor, bool temporary) : base(effectColor, temporary)
{
}
public override string PrefixText => "PlayEffect";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Effect";
public override int SortOrder => 30;
}
}

View File

@@ -17,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "PlayAlertSoundPositional"; public override string PrefixText => "PlayAlertSoundPositional";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Positional Alert Sound"; public override string DisplayHeading => "Play Positional Alert Sound";
public override int SortOrder => 22; public override int SortOrder => 27;
} }
} }

View File

@@ -23,6 +23,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 3; public override int SortOrder => 3;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 20; public override int Maximum => 30;
} }
} }

View File

@@ -30,7 +30,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription(); ((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
public override Color SummaryBackgroundColor => Colors.LightCoral; public override Color SummaryBackgroundColor => Colors.LightCoral;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 14; public override int SortOrder => 18;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => (int)ItemRarity.Unique; public override int Maximum => (int)ItemRarity.Unique;
} }

View File

@@ -17,7 +17,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string DisplayHeading => "Shaped Map"; public override string DisplayHeading => "Shaped Map";
public override Color SummaryBackgroundColor => Colors.DarkGoldenrod; public override Color SummaryBackgroundColor => Colors.DarkGoldenrod;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 8; public override int SortOrder => 9;
} }
} }

View File

@@ -39,7 +39,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override Color SummaryBackgroundColor => Colors.GhostWhite; public override Color SummaryBackgroundColor => Colors.GhostWhite;
public override Color SummaryTextColor => Colors.Black; public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 9; public override int SortOrder => 11;
private SocketColor StringToSocketColor(char socketColorString) private SocketColor StringToSocketColor(char socketColorString)
{ {

View File

@@ -17,6 +17,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "PlayAlertSound"; public override string PrefixText => "PlayAlertSound";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Alert Sound"; public override string DisplayHeading => "Play Alert Sound";
public override int SortOrder => 21; public override int SortOrder => 26;
} }
} }

View File

@@ -0,0 +1,28 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class StackSizeBlockItem : NumericFilterPredicateBlockItem
{
public StackSizeBlockItem()
{
}
public StackSizeBlockItem(FilterPredicateOperator predicateOperator, int predicateOperand)
: base(predicateOperator, predicateOperand)
{
}
public override string PrefixText => "StackSize";
public override int MaximumAllowed => 2;
public override string DisplayHeading => "Stack Size";
public override string SummaryText => "Stack Size " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 17;
public override int Minimum => 0;
public override int Maximum => 1000;
}
}

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)
@@ -16,6 +18,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetTextColor"; public override string PrefixText => "SetTextColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Text Color"; public override string DisplayHeading => "Text Color";
public override int SortOrder => 17; public override int SortOrder => 22;
} }
} }

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Width " + FilterPredicate; public override string SummaryText => "Width " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.MediumPurple; public override Color SummaryBackgroundColor => Colors.MediumPurple;
public override Color SummaryTextColor => Colors.White; public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 11; public override int SortOrder => 13;
public override int Minimum => 0; public override int Minimum => 0;
public override int Maximum => 2; public override int Maximum => 2;
} }

View File

@@ -1,39 +0,0 @@
using System;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlockDownCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly IItemFilterBlockBase _blockToMove;
private int _indexMovedFrom;
public MoveBlockDownCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase blockToMove)
{
_itemFilterScript = itemFilterScript;
_blockToMove = blockToMove;
}
public void Execute()
{
_indexMovedFrom = _itemFilterScript.ItemFilterBlocks.IndexOf(_blockToMove);
if (_indexMovedFrom >= _itemFilterScript.ItemFilterBlocks.Count)
{
throw new InvalidOperationException("Cannot move the bottom block down");
}
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom + 1, _blockToMove);
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom, _blockToMove);
}
public void Redo() => Execute();
}
}

View File

@@ -1,30 +0,0 @@
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlockToBottomCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly IItemFilterBlockBase _blockToMove;
private int _indexMovedFrom;
public MoveBlockToBottomCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase blockToMove)
{
_itemFilterScript = itemFilterScript;
_blockToMove = blockToMove;
}
public void Execute()
{
_indexMovedFrom = _itemFilterScript.ItemFilterBlocks.IndexOf(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Add(_blockToMove);
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom, _blockToMove);
}
public void Redo() => Execute();
}
}

View File

@@ -1,30 +0,0 @@
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlockToTopCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly IItemFilterBlockBase _blockToMove;
private int _indexMovedFrom;
public MoveBlockToTopCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase blockToMove)
{
_itemFilterScript = itemFilterScript;
_blockToMove = blockToMove;
}
public void Execute()
{
_indexMovedFrom = _itemFilterScript.ItemFilterBlocks.IndexOf(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(0, _blockToMove);
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom, _blockToMove);
}
public void Redo() => Execute();
}
}

View File

@@ -1,39 +0,0 @@
using System;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlockUpCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly IItemFilterBlockBase _blockToMove;
private int _indexMovedFrom;
public MoveBlockUpCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase blockToMove)
{
_itemFilterScript = itemFilterScript;
_blockToMove = blockToMove;
}
public void Execute()
{
_indexMovedFrom = _itemFilterScript.ItemFilterBlocks.IndexOf(_blockToMove);
if (_indexMovedFrom <= 0)
{
throw new InvalidOperationException("Cannot move the top block up");
}
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom-1, _blockToMove);
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Remove(_blockToMove);
_itemFilterScript.ItemFilterBlocks.Insert(_indexMovedFrom, _blockToMove);
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,60 @@
using System.Collections.Generic;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlocksToBottomCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly List<int> _sourceIndexes;
public MoveBlocksToBottomCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase block)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = new List<int> { _itemFilterScript.ItemFilterBlocks.IndexOf(block) };
}
public MoveBlocksToBottomCommand(IItemFilterScript itemFilterScript, List<int> sourceIndexes)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = sourceIndexes;
_sourceIndexes.Sort();
}
public void Execute()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[_sourceIndexes[i]]);
}
for (var i = _sourceIndexes.Count - 1; i >= 0; i--)
{
_itemFilterScript.ItemFilterBlocks.RemoveAt(_sourceIndexes[i]);
}
foreach (var block in blocksToMove)
{
_itemFilterScript.ItemFilterBlocks.Add(block);
}
}
public void Undo()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
var movedIndex = _itemFilterScript.ItemFilterBlocks.Count - _sourceIndexes.Count;
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[movedIndex]);
_itemFilterScript.ItemFilterBlocks.RemoveAt(movedIndex);
}
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(_sourceIndexes[i], blocksToMove[i]);
}
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlocksToIndexCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private List<int> _sourceIndexes;
private int _targetIndex;
public MoveBlocksToIndexCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase block, int targetIndex)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = new List<int> { _itemFilterScript.ItemFilterBlocks.IndexOf(block) };
_targetIndex = targetIndex;
}
public MoveBlocksToIndexCommand(IItemFilterScript itemFilterScript, List<int> sourceIndexes, int targetIndex)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = sourceIndexes;
_sourceIndexes.Sort();
_targetIndex = targetIndex;
}
public void Execute()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[_sourceIndexes[i]]);
}
for (var i = _sourceIndexes.Count - 1; i >= 0; i--)
{
_itemFilterScript.ItemFilterBlocks.RemoveAt(_sourceIndexes[i]);
}
for (var i = 0; i < blocksToMove.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(_targetIndex + i, blocksToMove[i]);
}
}
public void Undo()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[_targetIndex]);
_itemFilterScript.ItemFilterBlocks.RemoveAt(_targetIndex);
}
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(_sourceIndexes[i], blocksToMove[i]);
}
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,59 @@
using System.Collections.Generic;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class MoveBlocksToTopCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly List<int> _sourceIndexes;
public MoveBlocksToTopCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase block)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = new List<int> { _itemFilterScript.ItemFilterBlocks.IndexOf(block) };
}
public MoveBlocksToTopCommand(IItemFilterScript itemFilterScript, List<int> sourceIndexes)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = sourceIndexes;
_sourceIndexes.Sort();
}
public void Execute()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[_sourceIndexes[i]]);
}
for (var i = _sourceIndexes.Count - 1; i >= 0; i--)
{
_itemFilterScript.ItemFilterBlocks.RemoveAt(_sourceIndexes[i]);
}
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(i, blocksToMove[i]);
}
}
public void Undo()
{
List<IItemFilterBlockBase> blocksToMove = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
blocksToMove.Add(_itemFilterScript.ItemFilterBlocks[0]);
_itemFilterScript.ItemFilterBlocks.RemoveAt(0);
}
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(_sourceIndexes[i], blocksToMove[i]);
}
}
public void Redo() => Execute();
}
}

View File

@@ -1,37 +0,0 @@
using System;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class PasteBlockCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly IItemFilterBlockBase _pastedItemFilterBlock;
private readonly IItemFilterBlockBase _addAfterItemFilterBlock;
public PasteBlockCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase pastedItemFilterBlock, IItemFilterBlockBase addAfterItemFilterBlock)
{
_itemFilterScript = itemFilterScript;
_pastedItemFilterBlock = pastedItemFilterBlock;
_addAfterItemFilterBlock = addAfterItemFilterBlock;
}
public void Execute()
{
if (_addAfterItemFilterBlock != null)
{
_itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(_addAfterItemFilterBlock) + 1, _pastedItemFilterBlock);
}
else
{
_itemFilterScript.ItemFilterBlocks.Add(_pastedItemFilterBlock);
}
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Remove(_pastedItemFilterBlock);
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class PasteBlocksCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly List<IItemFilterBlockBase> _pastedItemFilterBlocks;
private readonly IItemFilterBlockBase _addAfterItemFilterBlock;
public PasteBlocksCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase block, IItemFilterBlockBase addAfterItemFilterBlock)
{
_itemFilterScript = itemFilterScript;
_pastedItemFilterBlocks = new List<IItemFilterBlockBase> { block };
_addAfterItemFilterBlock = addAfterItemFilterBlock;
}
public PasteBlocksCommand(IItemFilterScript itemFilterScript, List<IItemFilterBlockBase> pastedItemFilterBlocks, IItemFilterBlockBase addAfterItemFilterBlock)
{
_itemFilterScript = itemFilterScript;
_pastedItemFilterBlocks = pastedItemFilterBlocks;
_addAfterItemFilterBlock = addAfterItemFilterBlock;
}
public void Execute()
{
if (_addAfterItemFilterBlock != null)
{
var lastAddedBlock = _addAfterItemFilterBlock;
foreach (var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(lastAddedBlock) + 1, block);
lastAddedBlock = block;
}
}
else
{
foreach (var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Add(block);
}
}
}
public void Undo()
{
foreach (var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Remove(block);
}
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class PasteSectionCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly List<IItemFilterBlockBase> _pastedItemFilterBlocks;
private readonly IItemFilterBlockBase _addAfterItemFilterBlock;
public PasteSectionCommand(IItemFilterScript itemFilterScript, List<IItemFilterBlockBase> pastedItemFilterBlocks, IItemFilterBlockBase addAfterItemFilterBlock)
{
_itemFilterScript = itemFilterScript;
_pastedItemFilterBlocks = pastedItemFilterBlocks;
_addAfterItemFilterBlock = addAfterItemFilterBlock;
}
public void Execute()
{
if (_addAfterItemFilterBlock != null)
{
var lastAddedBlock = _addAfterItemFilterBlock;
foreach(var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(lastAddedBlock) + 1, block);
lastAddedBlock = block;
}
}
else
{
foreach (var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Add(block);
}
}
}
public void Undo()
{
foreach (var block in _pastedItemFilterBlocks)
{
_itemFilterScript.ItemFilterBlocks.Remove(block);
}
}
public void Redo() => Execute();
}
}

View File

@@ -1,29 +0,0 @@
using System;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class RemoveBlockCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private IItemFilterBlockBase _removedItemFilterBlock;
private int _indexRemovedFrom;
public RemoveBlockCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase itemFilterBlockBase)
{
_itemFilterScript = itemFilterScript;
_removedItemFilterBlock = itemFilterBlockBase;
}
public void Execute()
{
_indexRemovedFrom = _itemFilterScript.ItemFilterBlocks.IndexOf(_removedItemFilterBlock);
_itemFilterScript.ItemFilterBlocks.Remove(_removedItemFilterBlock);
}
public void Undo()
{
_itemFilterScript.ItemFilterBlocks.Insert(_indexRemovedFrom, _removedItemFilterBlock);
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class RemoveBlocksCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private List<IItemFilterBlockBase> _removedItemFilterBlocks;
private List<int> _sourceIndexes;
public RemoveBlocksCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase block)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = new List<int> { _itemFilterScript.ItemFilterBlocks.IndexOf(block) };
_removedItemFilterBlocks = new List<IItemFilterBlockBase> { block };
}
public RemoveBlocksCommand(IItemFilterScript itemFilterScript, List<int> sourceIndexes)
{
_itemFilterScript = itemFilterScript;
_sourceIndexes = sourceIndexes;
_sourceIndexes.Sort();
_removedItemFilterBlocks = new List<IItemFilterBlockBase>();
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_removedItemFilterBlocks.Add(_itemFilterScript.ItemFilterBlocks[_sourceIndexes[i]]);
}
}
public void Execute()
{
for (var i = _sourceIndexes.Count - 1; i >= 0; i--)
{
_itemFilterScript.ItemFilterBlocks.RemoveAt(_sourceIndexes[i]);
}
}
public void Undo()
{
for (var i = 0; i < _sourceIndexes.Count; i++)
{
_itemFilterScript.ItemFilterBlocks.Insert(_sourceIndexes[i], _removedItemFilterBlocks[i]);
}
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel;
namespace Filtration.ObjectModel.Enums
{
public enum EffectColor
{
[Description("Red")]
Red,
[Description("Green")]
Green,
[Description("Blue")]
Blue,
[Description("Brown")]
Brown,
[Description("White")]
White,
[Description("Yellow")]
Yellow
}
}

View File

@@ -0,0 +1,26 @@
using System.ComponentModel;
namespace Filtration.ObjectModel.Enums
{
/// <summary>
/// Each of the colors supported by the MinimapIcon block rule.
/// </summary>
/// <remarks>
/// The ordering here should match the ordering of the colors within the source image.
/// </remarks>
public enum IconColor
{
[Description("Blue")]
Blue,
[Description("Green")]
Green,
[Description("Brown")]
Brown,
[Description("Red")]
Red,
[Description("White")]
White,
[Description("Yellow")]
Yellow
}
}

View File

@@ -0,0 +1,26 @@
using System.ComponentModel;
namespace Filtration.ObjectModel.Enums
{
/// <summary>
/// Each of the shapes supported by the MinimapIcon block rule.
/// </summary>
/// <remarks>
/// The ordering here should match the ordering of the shapes within the source image.
/// </remarks>
public enum IconShape
{
[Description("Circle")]
Circle,
[Description("Diamond")]
Diamond,
[Description("Hexagon")]
Hexagon,
[Description("Square")]
Square,
[Description("Star")]
Star,
[Description("Triangle")]
Triangle
}
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel;
namespace Filtration.ObjectModel.Enums
{
/// <summary>
/// Each of the sizes supported by the MinimapIcon block rule.
/// </summary>
/// <remarks>
/// The ordering here should match the ordering of the sizes within the source image.
/// </remarks>
public enum IconSize
{
[Description("Largest")]
Largest,
[Description("Medium")]
Medium,
[Description("Small")]
Small
}
}

View File

@@ -9,6 +9,16 @@ namespace Filtration.ObjectModel.Enums
[Description("Background")] [Description("Background")]
BackgroundColor, BackgroundColor,
[Description("Border")] [Description("Border")]
BorderColor BorderColor,
[Description("Font Size")]
FontSize,
[Description("Alert Sound")]
AlertSound,
[Description("Custom Sound")]
CustomSound,
[Description("Icon")]
Icon,
[Description("Effect")]
Effect
} }
} }

View File

@@ -24,8 +24,8 @@ namespace Filtration.ObjectModel
ItemFilterBlock = itemFilterBlock; ItemFilterBlock = itemFilterBlock;
BlockAction = itemFilterBlock?.Action ?? BlockAction.Show; BlockAction = itemFilterBlock?.Action ?? BlockAction.Show;
BackgroundColor = itemFilterBlock?.DisplayBackgroundColor ?? new Color { A = 255, R = 0, G = 0, B = 0 }; BackgroundColor = itemFilterBlock?.DisplayBackgroundColor ?? new Color { A = 240, R = 0, G = 0, B = 0 };
BorderColor = itemFilterBlock?.DisplayBorderColor ?? new Color {A = 255, R = 0, G = 0, B = 0}; BorderColor = itemFilterBlock?.DisplayBorderColor ?? new Color {A = 240, R = 0, G = 0, B = 0};
FontSize = (itemFilterBlock?.DisplayFontSize ?? 34) / 1.8; FontSize = (itemFilterBlock?.DisplayFontSize ?? 34) / 1.8;
SetTextColor(); SetTextColor();

View File

@@ -31,16 +31,35 @@
<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 Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</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="PresentationCore" /> <Reference Include="PresentationCore" />
<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">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.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" />
@@ -52,15 +71,27 @@
<Compile Include="BlockItemBaseTypes\BlockItemBase.cs" /> <Compile Include="BlockItemBaseTypes\BlockItemBase.cs" />
<Compile Include="BlockItemBaseTypes\BooleanBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\BooleanBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\ColorBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\ColorBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\ColorBooleanBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\DualIntegerBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\DualIntegerBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\StringIntBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\EffectColorBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\IconBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\StringBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\StrIntBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" />
<Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" /> <Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" />
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" /> <Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
<Compile Include="BlockItemTypes\MapTierBlockItem.cs" />
<Compile Include="BlockItemTypes\PlayEffectBlockItem.cs" />
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" /> <Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
<Compile Include="BlockItemTypes\ClassBlockItem.cs" /> <Compile Include="BlockItemTypes\ClassBlockItem.cs" />
<Compile Include="BlockItemTypes\CustomSoundBlockItem.cs" />
<Compile Include="BlockItemTypes\DisableDropSoundBlockItem.cs" />
<Compile Include="BlockItemTypes\ElderMapBlockItem.cs" />
<Compile Include="BlockItemTypes\GemLevelBlockItem.cs" />
<Compile Include="BlockItemTypes\HasExplicitModBlockItem.cs" />
<Compile Include="BlockItemTypes\MapIconBlockItem.cs" />
<Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" /> <Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
<Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" /> <Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
<Compile Include="BlockItemTypes\ElderItemBlockItem.cs" /> <Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
@@ -77,38 +108,43 @@
<Compile Include="BlockItemTypes\SocketsBlockItem.cs" /> <Compile Include="BlockItemTypes\SocketsBlockItem.cs" />
<Compile Include="BlockItemTypes\PositionalSoundBlockItem.cs" /> <Compile Include="BlockItemTypes\PositionalSoundBlockItem.cs" />
<Compile Include="BlockItemTypes\SoundBlockItem.cs" /> <Compile Include="BlockItemTypes\SoundBlockItem.cs" />
<Compile Include="BlockItemTypes\StackSizeBlockItem.cs" />
<Compile Include="BlockItemTypes\TextColorBlockItem.cs" /> <Compile Include="BlockItemTypes\TextColorBlockItem.cs" />
<Compile Include="BlockItemTypes\WidthBlockItem.cs" /> <Compile Include="BlockItemTypes\WidthBlockItem.cs" />
<Compile Include="Commands\CommandManager.cs" /> <Compile Include="Commands\CommandManager.cs" />
<Compile Include="Commands\ICommand.cs" /> <Compile Include="Commands\ICommand.cs" />
<Compile Include="Commands\ItemFilterScript\PasteBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlocksToIndexCommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockToBottomCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlocksToBottomCommand.cs" />
<Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockDownCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlocksToTopCommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockUpCommand.cs" /> <Compile Include="Commands\ItemFilterScript\PasteBlocksCommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockToTopCommand.cs" /> <Compile Include="Commands\ItemFilterScript\RemoveBlocksCommand.cs" />
<Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" /> <Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" />
<Compile Include="Commands\ItemFilterScript\RemoveBlockCommand.cs" />
<Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" />
<Compile Include="Commands\IUndoableCommand.cs" /> <Compile Include="Commands\IUndoableCommand.cs" />
<Compile Include="Enums\BlockAction.cs" /> <Compile Include="Enums\BlockAction.cs" />
<Compile Include="Enums\BlockItemType.cs" /> <Compile Include="Enums\BlockItemType.cs" />
<Compile Include="Enums\EffectColor.cs" />
<Compile Include="Enums\FilterPredicateOperator.cs" /> <Compile Include="Enums\FilterPredicateOperator.cs" />
<Compile Include="Enums\FilterType.cs" /> <Compile Include="Enums\FilterType.cs" />
<Compile Include="Enums\IconColor.cs" />
<Compile Include="Enums\IconShape.cs" />
<Compile Include="Enums\IconSize.cs" />
<Compile Include="Enums\ItemRarity.cs" /> <Compile Include="Enums\ItemRarity.cs" />
<Compile Include="Enums\SocketColor.cs" /> <Compile Include="Enums\SocketColor.cs" />
<Compile Include="Enums\ThemeComponentType.cs" /> <Compile Include="Enums\ThemeComponentType.cs" />
<Compile Include="Extensions\EnumHelper.cs" /> <Compile Include="Extensions\EnumHelper.cs" />
<Compile Include="Extensions\ItemRarityExtensions.cs" /> <Compile Include="Extensions\ItemRarityExtensions.cs" />
<Compile Include="Factories\IItemFilterScriptFactory.cs" /> <Compile Include="Factories\IItemFilterScriptFactory.cs" />
<Compile Include="FilteredItem.cs" /> <Compile Include="FilteredItem.cs" />
<Compile Include="IAudioVisualBlockItem.cs" /> <Compile Include="IAudioVisualBlockItem.cs" />
<Compile Include="IBlockItemWithTheme.cs" />
<Compile Include="IItemFilterBlockItem.cs" /> <Compile Include="IItemFilterBlockItem.cs" />
<Compile Include="Item.cs" /> <Compile Include="Item.cs" />
<Compile Include="ItemFilterBlock.cs" /> <Compile Include="ItemFilterBlock.cs" />
<Compile Include="ItemFilterBlockGroup.cs" /> <Compile Include="ItemFilterBlockGroup.cs" />
<Compile Include="ItemFilterScript.cs" /> <Compile Include="ItemFilterScript.cs" />
<Compile Include="ItemFilterScriptSettings.cs" /> <Compile Include="ItemFilterScriptSettings.cs" />
<Compile Include="ItemSet.cs" /> <Compile Include="ItemSet.cs" />
<Compile Include="NumericFilterPredicate.cs" /> <Compile Include="NumericFilterPredicate.cs" />
<Compile Include="PathOfExileNamedColors.cs" /> <Compile Include="PathOfExileNamedColors.cs" />
@@ -118,12 +154,22 @@
<Compile Include="ReplaceColorsParameterSet.cs" /> <Compile Include="ReplaceColorsParameterSet.cs" />
<Compile Include="Socket.cs" /> <Compile Include="Socket.cs" />
<Compile Include="SocketGroup.cs" /> <Compile Include="SocketGroup.cs" />
<Compile Include="ThemeEditor\EffectColorThemeComponent.cs" />
<Compile Include="ThemeEditor\IconThemeComponent.cs" />
<Compile Include="ThemeEditor\StringThemeComponent.cs" />
<Compile Include="ThemeEditor\StrIntThemeComponent.cs" />
<Compile Include="ThemeEditor\IntegerThemeComponent.cs" />
<Compile Include="ThemeEditor\Theme.cs" /> <Compile Include="ThemeEditor\Theme.cs" />
<Compile Include="ThemeEditor\ColorThemeComponent.cs" />
<Compile Include="ThemeEditor\ThemeComponent.cs" /> <Compile Include="ThemeEditor\ThemeComponent.cs" />
<Compile Include="ThemeEditor\ThemeComponentCollection.cs" /> <Compile Include="ThemeEditor\ThemeComponentCollection.cs" />
<Compile Include="WindsorInstallers\CommandsInstaller.cs" /> <Compile Include="WindsorInstallers\CommandsInstaller.cs" />
<Compile Include="WindsorInstallers\ModelsInstaller.cs" /> <Compile Include="WindsorInstallers\ModelsInstaller.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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.

View File

@@ -0,0 +1,9 @@
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel
{
public interface IBlockItemWithTheme : IItemFilterBlockItem
{
ThemeComponent ThemeComponent { get; set; }
}
}

View File

@@ -14,5 +14,6 @@ namespace Filtration.ObjectModel
int MaximumAllowed { get; } int MaximumAllowed { get; }
int SortOrder { get; } int SortOrder { get; }
bool IsDirty { get; } bool IsDirty { get; }
string Comment { get; set; }
} }
} }

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq; using System.Linq;
using System.Windows.Media; using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes; using Filtration.ObjectModel.BlockItemBaseTypes;
@@ -13,6 +14,7 @@ namespace Filtration.ObjectModel
public interface IItemFilterBlock : IItemFilterBlockBase public interface IItemFilterBlock : IItemFilterBlockBase
{ {
bool Enabled { get; set; } bool Enabled { get; set; }
event EventHandler EnabledStatusChanged;
string Description { get; set; } string Description { get; set; }
ItemFilterBlockGroup BlockGroup { get; set; } ItemFilterBlockGroup BlockGroup { get; set; }
BlockAction Action { get; set; } BlockAction Action { get; set; }
@@ -22,12 +24,18 @@ namespace Filtration.ObjectModel
Color DisplayTextColor { get; } Color DisplayTextColor { get; }
Color DisplayBorderColor { get; } Color DisplayBorderColor { get; }
double DisplayFontSize { get; } double DisplayFontSize { get; }
int DisplayIconSize { get; }
int DisplayIconColor { get; }
int DisplayIconShape { get; }
Color DisplayEffectColor { get; }
bool HasBlockItemOfType<T>(); bool HasBlockItemOfType<T>();
bool HasBlockGroupInParentHierarchy(ItemFilterBlockGroup targetBlockGroup, ItemFilterBlockGroup startingBlockGroup); bool HasBlockGroupInParentHierarchy(ItemFilterBlockGroup targetBlockGroup, ItemFilterBlockGroup startingBlockGroup);
} }
public interface IItemFilterBlockBase public interface IItemFilterBlockBase
{ {
bool IsEdited { get; set; }
string OriginalText { get; set; }
} }
public abstract class ItemFilterBlockBase : IItemFilterBlockBase public abstract class ItemFilterBlockBase : IItemFilterBlockBase
@@ -44,6 +52,8 @@ namespace Filtration.ObjectModel
public ICommandManager CommandManager { get; } public ICommandManager CommandManager { get; }
public IItemFilterScript ParentScript { get; set; } public IItemFilterScript ParentScript { get; set; }
public bool IsEdited { get; set; }
public string OriginalText { get; set; }
} }
public interface IItemFilterCommentBlock : IItemFilterBlockBase public interface IItemFilterCommentBlock : IItemFilterBlockBase
@@ -53,29 +63,70 @@ namespace Filtration.ObjectModel
public class ItemFilterCommentBlock : ItemFilterBlockBase, IItemFilterCommentBlock public class ItemFilterCommentBlock : ItemFilterBlockBase, IItemFilterCommentBlock
{ {
private string _comment;
public ItemFilterCommentBlock(IItemFilterScript parentScript) : base(parentScript) public ItemFilterCommentBlock(IItemFilterScript parentScript) : base(parentScript)
{ {
} }
public string Comment { get; set; } public string Comment
{
get { return _comment; }
set
{
_comment = value;
IsEdited = true;
}
}
} }
public class ItemFilterBlock : ItemFilterBlockBase, IItemFilterBlock public class ItemFilterBlock : ItemFilterBlockBase, IItemFilterBlock
{ {
private ItemFilterBlockGroup _blockGroup; private ItemFilterBlockGroup _blockGroup;
private bool _enabled;
private string _description;
internal ItemFilterBlock() internal ItemFilterBlock()
{ {
BlockItems = new ObservableCollection<IItemFilterBlockItem> { ActionBlockItem }; BlockItems = new ObservableCollection<IItemFilterBlockItem> { ActionBlockItem };
BlockItems.CollectionChanged += new NotifyCollectionChangedEventHandler(OnBlockItemsChanged);
ActionBlockItem.PropertyChanged += OnActionBlockItemChanged;
_enabled = true;
} }
public ItemFilterBlock(IItemFilterScript parentScript) : base(parentScript) public ItemFilterBlock(IItemFilterScript parentScript) : base(parentScript)
{ {
BlockItems = new ObservableCollection<IItemFilterBlockItem> { ActionBlockItem }; BlockItems = new ObservableCollection<IItemFilterBlockItem> { ActionBlockItem };
BlockItems.CollectionChanged += new NotifyCollectionChangedEventHandler(OnBlockItemsChanged);
ActionBlockItem.PropertyChanged += OnActionBlockItemChanged;
_enabled = true;
} }
public bool Enabled { get; set; } = true; public bool Enabled
public string Description { get; set; } {
get { return _enabled; }
set
{
_enabled = value;
IsEdited = true;
EnabledStatusChanged?.Invoke(null, null);
if(BlockGroup != null && BlockGroup.IsEnableChecked != value)
{
BlockGroup.IsEnableChecked = value;
}
}
}
public event EventHandler EnabledStatusChanged;
public string Description
{
get { return _description; }
set
{
_description = value;
IsEdited = true;
}
}
public ItemFilterBlockGroup BlockGroup public ItemFilterBlockGroup BlockGroup
{ {
@@ -114,12 +165,24 @@ namespace Filtration.ObjectModel
{ {
var actionBlock = BlockItems.OfType<ActionBlockItem>().First(); var actionBlock = BlockItems.OfType<ActionBlockItem>().First();
actionBlock.Action = value; actionBlock.Action = value;
IsEdited = true;
} }
} }
public ActionBlockItem ActionBlockItem { get; } = new ActionBlockItem(BlockAction.Show); public ActionBlockItem ActionBlockItem { get; } = new ActionBlockItem(BlockAction.Show);
public ObservableCollection<IItemFilterBlockItem> BlockItems { get; } public ObservableCollection<IItemFilterBlockItem> BlockItems { get; }
private void OnBlockItemsChanged(object sender, NotifyCollectionChangedEventArgs e)
{
IsEdited = true;
}
private void OnActionBlockItemChanged(object sender, EventArgs e)
{
if (BlockGroup != null && BlockGroup.IsShowChecked != (Action == BlockAction.Show))
{
BlockGroup.IsShowChecked = (Action == BlockAction.Show);
}
}
public bool AddBlockItemAllowed(Type type) public bool AddBlockItemAllowed(Type type)
{ {
@@ -153,14 +216,23 @@ namespace Filtration.ObjectModel
private void OnBlockGroupStatusChanged(object sender, EventArgs e) private void OnBlockGroupStatusChanged(object sender, EventArgs e)
{ {
if (BlockGroup.IsChecked == false && Action == BlockAction.Show) if (BlockGroup.IsShowChecked == false && Action == BlockAction.Show)
{ {
Action = BlockAction.Hide; Action = BlockAction.Hide;
} }
else if (BlockGroup.IsChecked && Action == BlockAction.Hide) else if (BlockGroup.IsShowChecked == true && Action == BlockAction.Hide)
{ {
Action = BlockAction.Show; Action = BlockAction.Show;
} }
if (BlockGroup.IsEnableChecked == false && Enabled)
{
Enabled = false;
}
else if (BlockGroup.IsEnableChecked == true && !Enabled)
{
Enabled = true;
}
} }
public Color DisplayTextColor public Color DisplayTextColor
@@ -198,7 +270,7 @@ namespace Filtration.ObjectModel
get get
{ {
var backgroundColorBlockItem = BlockItems.OfType<BackgroundColorBlockItem>().FirstOrDefault(); var backgroundColorBlockItem = BlockItems.OfType<BackgroundColorBlockItem>().FirstOrDefault();
return backgroundColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 }; return backgroundColorBlockItem?.Color ?? new Color { A = 240, R = 0, G = 0, B = 0 };
} }
} }
@@ -207,7 +279,7 @@ namespace Filtration.ObjectModel
get get
{ {
var borderColorBlockItem = BlockItems.OfType<BorderColorBlockItem>().FirstOrDefault(); var borderColorBlockItem = BlockItems.OfType<BorderColorBlockItem>().FirstOrDefault();
return borderColorBlockItem?.Color ?? new Color { A = 255, R = 0, G = 0, B = 0 }; return borderColorBlockItem?.Color ?? new Color { A = 240, R = 0, G = 0, B = 0 };
} }
} }
@@ -219,5 +291,70 @@ namespace Filtration.ObjectModel
return fontSizeBlockItem?.Value ?? 34; return fontSizeBlockItem?.Value ?? 34;
} }
} }
public int DisplayIconSize
{
get
{
var mapIconBlockItem = BlockItems.OfType<MapIconBlockItem>().FirstOrDefault();
if (mapIconBlockItem != null)
return (int)mapIconBlockItem.Size;
return -1;
}
}
public int DisplayIconColor
{
get
{
var mapIconBlockItem = BlockItems.OfType<MapIconBlockItem>().FirstOrDefault();
if (mapIconBlockItem != null)
return (int)mapIconBlockItem.Color;
return -1;
}
}
public int DisplayIconShape
{
get
{
var mapIconBlockItem = BlockItems.OfType<MapIconBlockItem>().FirstOrDefault();
if (mapIconBlockItem != null)
return (int)mapIconBlockItem.Shape;
return -1;
}
}
public Color DisplayEffectColor
{
get
{
var beamBlockItem = BlockItems.OfType<PlayEffectBlockItem>().FirstOrDefault();
if (beamBlockItem != null)
{
switch (beamBlockItem.Color)
{
case EffectColor.Red:
return Colors.Red;
case EffectColor.Green:
return Colors.Green;
case EffectColor.Blue:
return Colors.Blue;
case EffectColor.Brown:
return Colors.Brown;
case EffectColor.White:
return Colors.White;
case EffectColor.Yellow:
return Colors.Yellow;
}
}
return Colors.Transparent;
}
}
} }
} }

View File

@@ -5,31 +5,34 @@ namespace Filtration.ObjectModel
{ {
public class ItemFilterBlockGroup public class ItemFilterBlockGroup
{ {
private bool _isChecked; private bool? _isShowChecked;
private bool? _isEnableChecked;
public ItemFilterBlockGroup(string groupName, ItemFilterBlockGroup parent, bool advanced = false) public ItemFilterBlockGroup(string groupName, ItemFilterBlockGroup parent, bool advanced = false, bool isLeafNode = false)
{ {
GroupName = groupName; GroupName = groupName;
ParentGroup = parent; ParentGroup = parent;
Advanced = advanced; Advanced = advanced;
ChildGroups = new List<ItemFilterBlockGroup>(); ChildGroups = new List<ItemFilterBlockGroup>();
IsLeafNode = isLeafNode;
} }
public string GroupName { get; }
public ItemFilterBlockGroup ParentGroup { get; set; }
public List<ItemFilterBlockGroup> ChildGroups { get; }
public bool Advanced { get; }
public bool IsLeafNode { get; }
public event EventHandler BlockGroupStatusChanged; public event EventHandler BlockGroupStatusChanged;
public string GroupName { get; } public bool? IsShowChecked
public ItemFilterBlockGroup ParentGroup { get; }
public List<ItemFilterBlockGroup> ChildGroups { get; }
public bool Advanced { get; }
public bool IsChecked
{ {
get { return _isChecked; } get { return _isShowChecked; }
set set
{ {
if (value != _isChecked) if (value != _isShowChecked)
{ {
_isChecked = value; _isShowChecked = value;
// Raise an event to let blocks that have this block group assigned that // Raise an event to let blocks that have this block group assigned that
// they might need to change their Action due to the block group status changing. // they might need to change their Action due to the block group status changing.
BlockGroupStatusChanged?.Invoke(null, null); BlockGroupStatusChanged?.Invoke(null, null);
@@ -37,20 +40,85 @@ namespace Filtration.ObjectModel
} }
} }
public bool? IsEnableChecked
{
get { return _isEnableChecked; }
set
{
if (value != _isEnableChecked)
{
_isEnableChecked = value;
// Raise an event to let blocks that have this block group assigned that
// they might need to change their Enabled due to the block group status changing.
BlockGroupStatusChanged?.Invoke(null, null);
}
}
}
public void ClearStatusChangeSubscribers()
{
BlockGroupStatusChanged = null;
}
public void AddOrJoinBlockGroup(ItemFilterBlockGroup blockGroup)
{
var childIndex = ChildGroups.FindIndex(item => item.GroupName.Equals(blockGroup.GroupName));
if (!blockGroup.IsLeafNode && childIndex >= 0)
{
while(blockGroup.ChildGroups.Count > 0)
{
ChildGroups[childIndex].AddOrJoinBlockGroup(blockGroup.ChildGroups[0]);
}
}
else
{
if(blockGroup.ParentGroup != null)
{
blockGroup.ParentGroup.ChildGroups.Remove(blockGroup);
}
blockGroup.ParentGroup = this;
ChildGroups.Add(blockGroup);
}
}
public void DetachSelf(bool keepChildren)
{
if(ParentGroup == null)
return;
if(IsLeafNode && ParentGroup.ParentGroup != null && ParentGroup.ChildGroups.Count < 2)
{
ParentGroup.DetachSelf(false);
}
else
{
ParentGroup.ChildGroups.Remove(this);
if (keepChildren)
{
foreach(var child in ChildGroups)
{
ParentGroup.AddOrJoinBlockGroup(child);
}
}
ParentGroup = null;
}
}
public override string ToString() public override string ToString()
{ {
var currentBlockGroup = this; if(ParentGroup == null)
{
return string.Empty;
}
var outputString = (Advanced ? "~" : string.Empty) + GroupName; var outputString = (Advanced ? "~" : string.Empty) + GroupName;
// TODO: This is retarded, fix this. var parentOutput = ParentGroup.ToString();
if (currentBlockGroup.ParentGroup != null) if(!string.IsNullOrWhiteSpace(parentOutput))
{ {
while (currentBlockGroup.ParentGroup.ParentGroup != null) outputString = parentOutput + (IsLeafNode ? string.Empty : " - " + outputString);
{
outputString = (currentBlockGroup.ParentGroup.Advanced ? "~" : string.Empty) + currentBlockGroup.ParentGroup.GroupName + " - " + outputString;
currentBlockGroup = currentBlockGroup.ParentGroup;
}
} }
return outputString; return outputString;

View File

@@ -8,36 +8,36 @@ namespace Filtration.ObjectModel
{ {
public static Dictionary<PathOfExileNamedColor, Color> Colors => new Dictionary<PathOfExileNamedColor, Color> public static Dictionary<PathOfExileNamedColor, Color> Colors => new Dictionary<PathOfExileNamedColor, Color>
{ {
{PathOfExileNamedColor.Default, new Color {A = 255, R = 127, G = 127, B = 127}}, {PathOfExileNamedColor.Default, new Color {A = 240, R = 127, G = 127, B = 127}},
{PathOfExileNamedColor.ValueDefault, new Color {A = 255, R = 255, G = 255, B = 255}}, {PathOfExileNamedColor.ValueDefault, new Color {A = 240, R = 255, G = 255, B = 255}},
{PathOfExileNamedColor.Pink, new Color {A = 255, R = 255, G = 192, B = 203}}, {PathOfExileNamedColor.Pink, new Color {A = 240, R = 255, G = 192, B = 203}},
{PathOfExileNamedColor.DodgerBlue, new Color {A = 255, R = 30, G = 144, B = 255}}, {PathOfExileNamedColor.DodgerBlue, new Color {A = 240, R = 30, G = 144, B = 255}},
{PathOfExileNamedColor.Fire, new Color {A = 255, R = 150, G = 0, B = 0}}, {PathOfExileNamedColor.Fire, new Color {A = 240, R = 150, G = 0, B = 0}},
{PathOfExileNamedColor.Cold, new Color {A = 255, R = 54, G = 100, B = 146}}, {PathOfExileNamedColor.Cold, new Color {A = 240, R = 54, G = 100, B = 146}},
{PathOfExileNamedColor.Lightning, new Color {A = 255, R = 255, G = 215, B = 0}}, {PathOfExileNamedColor.Lightning, new Color {A = 240, R = 255, G = 215, B = 0}},
{PathOfExileNamedColor.Chaos, new Color {A = 255, R = 208, G = 32, B = 144}}, {PathOfExileNamedColor.Chaos, new Color {A = 240, R = 208, G = 32, B = 144}},
{PathOfExileNamedColor.Augmented, new Color {A = 255, R = 136, G = 136, B = 255}}, {PathOfExileNamedColor.Augmented, new Color {A = 240, R = 136, G = 136, B = 255}},
{PathOfExileNamedColor.Crafted, new Color {A = 255, R = 184, G = 218, B = 242}}, {PathOfExileNamedColor.Crafted, new Color {A = 240, R = 184, G = 218, B = 242}},
{PathOfExileNamedColor.Unmet, new Color {A = 255, R = 210, G = 0, B = 0}}, {PathOfExileNamedColor.Unmet, new Color {A = 240, R = 210, G = 0, B = 0}},
{PathOfExileNamedColor.UniqueItem, new Color {A = 255, R = 175, G = 96, B = 37}}, {PathOfExileNamedColor.UniqueItem, new Color {A = 240, R = 175, G = 96, B = 37}},
{PathOfExileNamedColor.RareItem, new Color {A = 255, R = 255, G = 255, B = 119}}, {PathOfExileNamedColor.RareItem, new Color {A = 240, R = 255, G = 255, B = 119}},
{PathOfExileNamedColor.MagicItem, new Color {A = 255, R = 136, G = 136, B = 255}}, {PathOfExileNamedColor.MagicItem, new Color {A = 240, R = 136, G = 136, B = 255}},
{PathOfExileNamedColor.WhiteItem, new Color {A = 255, R = 200, G = 200, B = 200}}, {PathOfExileNamedColor.WhiteItem, new Color {A = 240, R = 200, G = 200, B = 200}},
{PathOfExileNamedColor.GemItem, new Color {A = 255, R = 27, G = 162, B = 155}}, {PathOfExileNamedColor.GemItem, new Color {A = 240, R = 27, G = 162, B = 155}},
{PathOfExileNamedColor.CurrencyItem, new Color {A = 255, R = 170, G = 158, B = 130}}, {PathOfExileNamedColor.CurrencyItem, new Color {A = 240, R = 170, G = 158, B = 130}},
{PathOfExileNamedColor.QuestItem, new Color {A = 255, R = 74, G = 230, B = 58}}, {PathOfExileNamedColor.QuestItem, new Color {A = 240, R = 74, G = 230, B = 58}},
{PathOfExileNamedColor.NemesisMod, new Color {A = 255, R = 255, G = 200, B = 0}}, {PathOfExileNamedColor.NemesisMod, new Color {A = 240, R = 255, G = 200, B = 0}},
{PathOfExileNamedColor.NemesisModOutline, new Color {A = 220, R = 255, G = 40, B = 0}}, {PathOfExileNamedColor.NemesisModOutline, new Color {A = 220, R = 255, G = 40, B = 0}},
{PathOfExileNamedColor.Title, new Color {A = 255, R = 231, G = 180, B = 120}}, {PathOfExileNamedColor.Title, new Color {A = 240, R = 231, G = 180, B = 120}},
{PathOfExileNamedColor.Corrupted, new Color {A = 255, R = 210, G = 0, B = 0}}, {PathOfExileNamedColor.Corrupted, new Color {A = 240, R = 210, G = 0, B = 0}},
{PathOfExileNamedColor.Favour, new Color {A = 255, R = 170, G = 158, B = 130}}, {PathOfExileNamedColor.Favour, new Color {A = 240, R = 170, G = 158, B = 130}},
{PathOfExileNamedColor.SupporterPackNewItem, new Color {A = 255, R = 180, G = 96, B = 0}}, {PathOfExileNamedColor.SupporterPackNewItem, new Color {A = 240, R = 180, G = 96, B = 0}},
{PathOfExileNamedColor.SupporterPackItem, new Color {A = 255, R = 163, G = 141, B = 109}}, {PathOfExileNamedColor.SupporterPackItem, new Color {A = 240, R = 163, G = 141, B = 109}},
{PathOfExileNamedColor.BloodlineMod, new Color {A = 255, R = 210, G = 0, B = 220}}, {PathOfExileNamedColor.BloodlineMod, new Color {A = 240, R = 210, G = 0, B = 220}},
{PathOfExileNamedColor.BloodlineModOutline, new Color {A = 200, R = 74, G = 0, B = 160}}, {PathOfExileNamedColor.BloodlineModOutline, new Color {A = 200, R = 74, G = 0, B = 160}},
{PathOfExileNamedColor.TormentMod, new Color {A = 255, R = 50, G = 230, B = 100}}, {PathOfExileNamedColor.TormentMod, new Color {A = 240, R = 50, G = 230, B = 100}},
{PathOfExileNamedColor.TormentModOutline, new Color {A = 200, R = 0, G = 100, B = 150}}, {PathOfExileNamedColor.TormentModOutline, new Color {A = 200, R = 0, G = 100, B = 150}},
{PathOfExileNamedColor.CantTradeorModify, new Color {A = 255, R = 210, G = 0, B = 0}}, {PathOfExileNamedColor.CantTradeorModify, new Color {A = 240, R = 210, G = 0, B = 0}},
}; };
} }

View File

@@ -0,0 +1,39 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class ColorThemeComponent : ThemeComponent
{
private Color _color;
private ColorThemeComponent()
{
}
public ColorThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor)
{
if (componentName == null || componentColor == null)
{
throw new ArgumentException("Null parameters not allowed in ColorThemeComponent constructor");
}
ComponentType = componentType;
Color = componentColor;
ComponentName = componentName;
}
public Color Color
{
get => _color;
set
{
_color = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class EffectColorThemeComponent : ThemeComponent
{
private EffectColor _effectColor;
private bool _temporary;
private EffectColorThemeComponent()
{
}
public EffectColorThemeComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary)
{
ComponentType = componentType;
ComponentName = componentName ?? throw new ArgumentException("Null parameters not allowed in EffectColorThemeComponent constructor");
EffectColor = componentEffectColor;
Temporary = componentTemporary;
}
public EffectColor EffectColor
{
get => _effectColor;
set
{
_effectColor = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public bool Temporary
{
get => _temporary;
set
{
_temporary = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}

View File

@@ -0,0 +1,64 @@
using System;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class IconThemeComponent : ThemeComponent
{
private IconSize _iconSize;
private IconColor _iconColor;
private IconShape _iconShape;
private IconThemeComponent()
{
}
public IconThemeComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape)
{
if (componentName == null)
{
throw new ArgumentException("Null parameters not allowed in IconThemeComponent constructor");
}
ComponentType = componentType;
ComponentName = componentName;
IconSize = componentIconSize;
IconColor = componentIconColor;
IconShape = componentIconShape;
}
public IconSize IconSize
{
get => _iconSize;
set
{
_iconSize = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public IconColor IconColor
{
get => _iconColor;
set
{
_iconColor = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public IconShape IconShape
{
get => _iconShape;
set
{
_iconShape = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class IntegerThemeComponent : ThemeComponent
{
private int _value;
private IntegerThemeComponent()
{
}
public IntegerThemeComponent(ThemeComponentType componentType, string componentName, int componentValue)
{
if (componentName == null)
{
throw new ArgumentException("Null parameters not allowed in IntegerThemeComponent constructor");
}
ComponentType = componentType;
Value = componentValue;
ComponentName = componentName;
}
public int Value
{
get => _value;
set
{
_value = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}

View File

@@ -0,0 +1,51 @@
using System;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class StrIntThemeComponent : ThemeComponent
{
private string _value;
private int _secondValue;
private StrIntThemeComponent()
{
}
public StrIntThemeComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{
if (componentName == null || componentValue == null)
{
throw new ArgumentException("Null parameters not allowed in StrIntThemeComponent constructor");
}
ComponentType = componentType;
Value = componentValue;
SecondValue = componentSecondValue;
ComponentName = componentName;
}
public string Value
{
get => _value;
set
{
_value = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public int SecondValue
{
get => _secondValue;
set
{
_secondValue = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
}
}

View File

@@ -0,0 +1,109 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
using System.Xml.Serialization;
using Filtration.ObjectModel.Enums;
using GalaSoft.MvvmLight.Command;
using Microsoft.Win32;
namespace Filtration.ObjectModel.ThemeEditor
{
[Serializable]
public class StringThemeComponent : ThemeComponent
{
private string _value;
public static ObservableCollection<string> _customSoundsAvailable;
private StringThemeComponent()
{
}
public StringThemeComponent(ThemeComponentType componentType, string componentName, string componentValue)
{
if (componentName == null || componentValue == null)
{
throw new ArgumentException("Null parameters not allowed in StringThemeComponent constructor");
}
ComponentType = componentType;
Value = componentValue;
ComponentName = componentName;
if (_customSoundsAvailable == null || _customSoundsAvailable.Count < 1)
{
_customSoundsAvailable = new ObservableCollection<string>();
var poeFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString() + @"\My Games\Path of Exile\";
if(System.IO.Directory.Exists(poeFolderPath))
{
var poeFolderFiles = System.IO.Directory.GetFiles(poeFolderPath).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(poeFolderPath, ""));
}
}
}
if(string.IsNullOrWhiteSpace(Value))
{
Value = _customSoundsAvailable.Count > 0 ? _customSoundsAvailable[0] : "";
}
else if (_customSoundsAvailable.IndexOf(Value) < 0)
{
_customSoundsAvailable.Add(Value);
}
CustomSoundFileDialogCommand = new RelayCommand(OnCustomSoundFileDialog);
}
[XmlIgnore]
public RelayCommand CustomSoundFileDialogCommand { get; set; }
public ObservableCollection<string> CustomSoundsAvailable => _customSoundsAvailable;
public string Value
{
get => _value;
set
{
_value = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
private void OnCustomSoundFileDialog()
{
OpenFileDialog fileDialog = new OpenFileDialog {DefaultExt = ".mp3"};
var poePath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\My Games\Path of Exile\";
fileDialog.InitialDirectory = poePath;
bool? result = fileDialog.ShowDialog();
if (result == true)
{
var fileName = fileDialog.FileName;
if (fileName.StartsWith(poePath))
{
fileName = fileName.Replace(poePath, "");
}
if (CustomSoundsAvailable.IndexOf(fileName) < 0)
{
CustomSoundsAvailable.Add(fileName);
OnPropertyChanged(nameof(CustomSoundsAvailable));
}
Value = 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,18 +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 ThemeComponent(componentType, componentName, componentColor)); Components.Add(new ColorThemeComponent(componentType, componentName, componentColor));
}
public void AddComponent(ThemeComponentType componentType, string componentName, int componentValue)
{
Components.Add(new IntegerThemeComponent(componentType, componentName, componentValue));
}
public void AddComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{
Components.Add(new StrIntThemeComponent(componentType, componentName, componentValue, componentSecondValue));
} }
} }
} }

View File

@@ -10,8 +10,7 @@ namespace Filtration.ObjectModel.ThemeEditor
[Serializable] [Serializable]
public class ThemeComponent : INotifyPropertyChanged public class ThemeComponent : INotifyPropertyChanged
{ {
private Color _color; protected EventHandler _themeComponentUpdatedEventHandler;
private EventHandler _themeComponentUpdatedEventHandler;
private readonly object _eventLock = new object(); private readonly object _eventLock = new object();
public ThemeComponent() public ThemeComponent()
@@ -19,18 +18,6 @@ namespace Filtration.ObjectModel.ThemeEditor
} }
public ThemeComponent(ThemeComponentType componentType, string componentName, Color componentColor)
{
if (componentName == null || componentColor == null)
{
throw new ArgumentException("Null parameters not allowed in ThemeComponent constructor");
}
ComponentType = componentType;
Color = componentColor;
ComponentName = componentName;
}
// By implementing a custom event accessor here we can keep the UsageCount up to date. // By implementing a custom event accessor here we can keep the UsageCount up to date.
public event EventHandler ThemeComponentUpdated public event EventHandler ThemeComponentUpdated
{ {
@@ -58,17 +45,6 @@ namespace Filtration.ObjectModel.ThemeEditor
public string ComponentName { get; set; } public string ComponentName { get; set; }
public ThemeComponentType ComponentType{ get; set; } public ThemeComponentType ComponentType{ get; set; }
public Color Color
{
get { return _color; }
set
{
_color = value;
OnPropertyChanged();
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
public int UsageCount public int UsageCount
{ {
get get

View File

@@ -16,7 +16,72 @@ namespace Filtration.ObjectModel.ThemeEditor
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType); return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
} }
var component = new ThemeComponent(componentType, componentName, componentColor); var component = new ColorThemeComponent(componentType, componentName, componentColor);
Items.Add(component);
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, int componentValue)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new IntegerThemeComponent(componentType, componentName, componentValue);
Items.Add(component);
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, string componentValue, int componentSecondValue)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new StrIntThemeComponent(componentType, componentName, componentValue, componentSecondValue);
Items.Add(component);
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, string componentValue)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new StringThemeComponent(componentType, componentName, componentValue);
Items.Add(component);
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, IconSize componentIconSize, IconColor componentIconColor, IconShape componentIconShape)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new IconThemeComponent(componentType, componentName, componentIconSize, componentIconColor, componentIconShape);
Items.Add(component);
return component;
}
public ThemeComponent AddComponent(ThemeComponentType componentType, string componentName, EffectColor componentEffectColor, bool componentTemporary)
{
if (ComponentExists(componentType, componentName))
{
return Items.FirstOrDefault(t => t.ComponentName == componentName && t.ComponentType == componentType);
}
var component = new EffectColorThemeComponent(componentType, componentName, componentEffectColor, componentTemporary);
Items.Add(component); Items.Add(component);
return component; return component;
@@ -28,5 +93,10 @@ namespace Filtration.ObjectModel.ThemeEditor
Items.Count(c => c.ComponentName == componentName && c.ComponentType == componentType); Items.Count(c => c.ComponentName == componentName && c.ComponentType == componentType);
return componentCount > 0; return componentCount > 0;
} }
public bool ComponentExists(ThemeComponent themeComponent)
{
return ComponentExists(themeComponent.ComponentType, themeComponent.ComponentName);
}
} }
} }

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,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.4" 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

@@ -7,6 +7,6 @@ namespace Filtration.Parser.Interface.Services
{ {
void Initialise(ItemFilterBlockGroup rootBlockGroup); void Initialise(ItemFilterBlockGroup rootBlockGroup);
void Cleanup(); void Cleanup();
ItemFilterBlockGroup IntegrateStringListIntoBlockGroupHierarchy(IEnumerable<string> groupStrings); ItemFilterBlockGroup IntegrateStringListIntoBlockGroupHierarchy(IEnumerable<string> groupStrings, bool show, bool enabled);
} }
} }

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