Compare commits
261 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
416f145d3f | ||
|
|
92759871b4 | ||
|
|
322afa1c3f | ||
|
|
8ea26a4614 | ||
|
|
dcd963a210 | ||
|
|
757fc46e6b | ||
|
|
7a6747ebad | ||
|
|
309be5e881 | ||
|
|
785524f3ab | ||
|
|
fdec69789e | ||
|
|
4afff926b8 | ||
|
|
4290688ac0 | ||
|
|
7c31ba393c | ||
|
|
7bab2e3392 | ||
|
|
cb6b61c66c | ||
|
|
ab7cbf5ce4 | ||
|
|
02eafb4c62 | ||
|
|
992c6f510a | ||
|
|
85c215382b | ||
|
|
c44d7b6095 | ||
|
|
717a0a83a9 | ||
|
|
1f9a1c5196 | ||
|
|
dea0378a16 | ||
|
|
4862452188 | ||
|
|
db258de11e | ||
|
|
e2a92e10bb | ||
|
|
444f09751a | ||
|
|
9356f55209 | ||
|
|
fb7bd8b81e | ||
|
|
72ed517929 | ||
|
|
290547cbba | ||
|
|
065e56e0a6 | ||
|
|
d686e6da39 | ||
|
|
79398667b4 | ||
|
|
2424ab9195 | ||
|
|
491f448f94 | ||
|
|
2f49e85227 | ||
|
|
dce0af7fd6 | ||
|
|
208aeb39f6 | ||
|
|
79274df0fb | ||
|
|
4052d6e020 | ||
|
|
7c0da57570 | ||
|
|
557767f4dc | ||
|
|
ad1b46f975 | ||
|
|
9f17d84a7f | ||
|
|
0fe21336e6 | ||
|
|
2ba1b8adac | ||
|
|
2415be089b | ||
|
|
892b2f15f2 | ||
|
|
042e5b41f9 | ||
|
|
5fc260dbb2 | ||
|
|
3de33e9447 | ||
|
|
37ad9ac42e | ||
|
|
fbd02702b0 | ||
|
|
a20c988380 | ||
|
|
7ce5aaa861 | ||
|
|
4b6cee9d94 | ||
|
|
6fb0ec8084 | ||
|
|
a13dc44a7d | ||
|
|
05b729edf8 | ||
|
|
876e98437e | ||
|
|
30e76e333c | ||
|
|
f840fb69ad | ||
|
|
ae98c2d5de | ||
|
|
ba6d50cf45 | ||
|
|
6838cb12a8 | ||
|
|
fd2023598b | ||
|
|
e3b1a5dba7 | ||
|
|
25c25c2a1d | ||
|
|
e5386132c3 | ||
|
|
784f0227ee | ||
|
|
fb37faa7bc | ||
|
|
63236769aa | ||
|
|
05a994f562 | ||
|
|
124786dd0d | ||
|
|
cde2d692c9 | ||
|
|
c96aa472d9 | ||
|
|
d4e8a72d47 | ||
|
|
4c826f42fd | ||
|
|
4022cf12a0 | ||
|
|
8073948cfe | ||
|
|
e516ded476 | ||
|
|
f331bffee7 | ||
|
|
f238bbf856 | ||
|
|
a0191576f0 | ||
|
|
1d96b69800 | ||
|
|
99abb276af | ||
|
|
073fe553ea | ||
|
|
0d81d0ef54 | ||
|
|
f04f9c20ed | ||
|
|
f71ba74425 | ||
|
|
04cbf218f3 | ||
|
|
6007306346 | ||
|
|
992bd21570 | ||
|
|
7d8b32b2e7 | ||
|
|
ac904c31ff | ||
|
|
f51fe315ad | ||
|
|
3ce2e12f56 | ||
|
|
43e5b30080 | ||
|
|
bc99339390 | ||
|
|
781faae85d | ||
|
|
c926808878 | ||
|
|
24d9f97717 | ||
|
|
7e4e6fe42e | ||
|
|
c6d75cfff6 | ||
|
|
2f30eade7c | ||
|
|
e719f0bce0 | ||
|
|
dffbbf3591 | ||
|
|
07a7e8d05c | ||
|
|
1ba224906c | ||
|
|
32523787d2 | ||
|
|
ac6943d73b | ||
|
|
36c0aaea17 | ||
|
|
4b38a6a4e0 | ||
|
|
9c44dd7e7d | ||
|
|
18c878e350 | ||
|
|
5d30888597 | ||
|
|
bfd722d362 | ||
|
|
d23741555a | ||
|
|
820aa5499e | ||
|
|
1ee38b4c0e | ||
|
|
4bed777427 | ||
|
|
1f6cbeec86 | ||
|
|
550a2d8f25 | ||
|
|
ae38197052 | ||
|
|
4fd4ffc520 | ||
|
|
e15efe4e15 | ||
|
|
196db4c730 | ||
|
|
910b2b8c7f | ||
|
|
b31ce1d843 | ||
|
|
99a011c78c | ||
|
|
69ce542c1a | ||
|
|
2ff9ebf242 | ||
|
|
0eff63d706 | ||
|
|
1b8f37ca3a | ||
|
|
b4f02f872e | ||
|
|
cfef82e53a | ||
|
|
bdd121f48c | ||
|
|
0209de3817 | ||
|
|
1e26a2ae3e | ||
|
|
54b72e44b0 | ||
|
|
24df1d7687 | ||
|
|
7162e16b49 | ||
|
|
324ce4d0b3 | ||
|
|
de489e8b2c | ||
|
|
341b1d1eb2 | ||
|
|
6be29dbd28 | ||
|
|
3851ad51e1 | ||
|
|
65d3e07156 | ||
|
|
a86ab3ec8d | ||
|
|
41722e8a57 | ||
|
|
3cb0a041d7 | ||
|
|
c8778bb1eb | ||
|
|
8e849d6a8f | ||
|
|
0d3f01a856 | ||
|
|
178ff579c6 | ||
|
|
30aa52e788 | ||
|
|
c1aee2f8f7 | ||
|
|
937426e9a3 | ||
|
|
7e0932830d | ||
|
|
15c63fa222 | ||
|
|
cc986eea21 | ||
|
|
c260014a16 | ||
|
|
8f0f73f185 | ||
|
|
15143f738f | ||
|
|
dc6ed934b2 | ||
|
|
78b4ddc862 | ||
|
|
a09f0a5090 | ||
|
|
2958d93b33 | ||
|
|
1e9b1158bd | ||
|
|
d92d34af05 | ||
|
|
bc5a005ee7 | ||
|
|
8ba3433dcf | ||
|
|
d0bc0b6864 | ||
|
|
1eaf0b6fe5 | ||
|
|
4c76dc9bab | ||
|
|
2a7df9a1ca | ||
|
|
add7514ce7 | ||
|
|
0974579684 | ||
|
|
c0e9c534de | ||
|
|
780081263c | ||
|
|
387f08db85 | ||
|
|
7fb9378304 | ||
|
|
e5209fb459 | ||
|
|
961805272d | ||
|
|
281c7d85e1 | ||
|
|
57775a9e22 | ||
|
|
5817295f7c | ||
|
|
216168533f | ||
|
|
f6969a0204 | ||
|
|
38053666a0 | ||
|
|
bd730dd518 | ||
|
|
2c4096ff2c | ||
|
|
738415f10a | ||
|
|
f03e37602d | ||
|
|
2230b81257 | ||
|
|
3aa2bf488c | ||
|
|
71b7a45f84 | ||
|
|
0fd2db7076 | ||
|
|
400688573c | ||
|
|
52fc1f6bbc | ||
|
|
3f437c0109 | ||
|
|
f838b35b4c | ||
|
|
ac706486cb | ||
|
|
3607ad362e | ||
|
|
1ecec4e9dc | ||
|
|
404a04c210 | ||
|
|
f1b2be7d74 | ||
|
|
6393a53bf5 | ||
|
|
a0a72b5fe8 | ||
|
|
d96234f099 | ||
|
|
07fdc2eb49 | ||
|
|
86ff670fb0 | ||
|
|
c9caed7e6b | ||
|
|
9cf4d86cb0 | ||
|
|
523a9553d9 | ||
|
|
b88730fb3a | ||
|
|
06b88e85f2 | ||
|
|
b98988f0b5 | ||
|
|
d14e4e9320 | ||
|
|
d91f7e1ac3 | ||
|
|
d84b17ced3 | ||
|
|
fef20ff36a | ||
|
|
23fa82655b | ||
|
|
e5bd994164 | ||
|
|
342487f800 | ||
|
|
8bf3527b69 | ||
|
|
010e0dda31 | ||
|
|
2cf6a5953b | ||
|
|
1ebbe5b5a8 | ||
|
|
fee2a4dd99 | ||
|
|
b65fad0679 | ||
|
|
43c6149832 | ||
|
|
4def27c49d | ||
|
|
7b8ff1e3cb | ||
|
|
797c911bb5 | ||
|
|
8e54cc3b4b | ||
|
|
ab7aefa8a6 | ||
|
|
bb77138854 | ||
|
|
2d98f7de36 | ||
|
|
6277917ae6 | ||
|
|
3fe021949a | ||
|
|
733c7d1757 | ||
|
|
702c118783 | ||
|
|
11d85fdd1b | ||
|
|
8dc5864d2e | ||
|
|
884651bce9 | ||
|
|
e7a40c8c6d | ||
|
|
dde9f65ea6 | ||
|
|
ae6e8c5211 | ||
|
|
67685d9eac | ||
|
|
af08cdfed6 | ||
|
|
0b791f5747 | ||
|
|
43bc1410ae | ||
|
|
b3520246b9 | ||
|
|
6d1c51361b | ||
|
|
360b1c8144 | ||
|
|
80b8318574 | ||
|
|
85f47ce654 | ||
|
|
c88c401ca8 | ||
|
|
45ab1a57e3 |
185
.gitignore
vendored
185
.gitignore
vendored
@@ -1,29 +1,43 @@
|
|||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
|
/.vs/
|
||||||
*.suo
|
*.suo
|
||||||
*.user
|
*.user
|
||||||
|
*.userosscache
|
||||||
*.sln.docstates
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
# Build results
|
# Build results
|
||||||
[Dd]ebug/
|
[Dd]ebug/
|
||||||
[Dd]ebugPublic/
|
[Dd]ebugPublic/
|
||||||
[Rr]elease/
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
x64/
|
x64/
|
||||||
build/
|
x86/
|
||||||
bld/
|
bld/
|
||||||
[Bb]in/
|
[Bb]in/
|
||||||
[Oo]bj/
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
|
||||||
# Roslyn cache directories
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
*.ide/
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
# MSTest test Results
|
# MSTest test Results
|
||||||
[Tt]est[Rr]esult*/
|
[Tt]est[Rr]esult*/
|
||||||
[Bb]uild[Ll]og.*
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
#NUNIT
|
# NUNIT
|
||||||
*.VisualState.xml
|
*.VisualState.xml
|
||||||
TestResult.xml
|
TestResult.xml
|
||||||
|
|
||||||
@@ -32,6 +46,19 @@ TestResult.xml
|
|||||||
[Rr]eleasePS/
|
[Rr]eleasePS/
|
||||||
dlldata.c
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
**/Properties/launchSettings.json
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
*_i.c
|
*_i.c
|
||||||
*_p.c
|
*_p.c
|
||||||
*_i.h
|
*_i.h
|
||||||
@@ -64,14 +91,21 @@ _Chutzpah*
|
|||||||
ipch/
|
ipch/
|
||||||
*.aps
|
*.aps
|
||||||
*.ncb
|
*.ncb
|
||||||
|
*.opendb
|
||||||
*.opensdf
|
*.opensdf
|
||||||
*.sdf
|
*.sdf
|
||||||
*.cachefile
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
# Visual Studio profiler
|
# Visual Studio profiler
|
||||||
*.psess
|
*.psess
|
||||||
*.vsp
|
*.vsp
|
||||||
*.vspx
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
# TFS 2012 Local Workspace
|
# TFS 2012 Local Workspace
|
||||||
$tf/
|
$tf/
|
||||||
@@ -84,7 +118,7 @@ _ReSharper*/
|
|||||||
*.[Rr]e[Ss]harper
|
*.[Rr]e[Ss]harper
|
||||||
*.DotSettings.user
|
*.DotSettings.user
|
||||||
|
|
||||||
# JustCode is a .NET coding addin-in
|
# JustCode is a .NET coding add-in
|
||||||
.JustCode
|
.JustCode
|
||||||
|
|
||||||
# TeamCity is a build add-in
|
# TeamCity is a build add-in
|
||||||
@@ -93,9 +127,18 @@ _TeamCity*
|
|||||||
# DotCover is a Code Coverage Tool
|
# DotCover is a Code Coverage Tool
|
||||||
*.dotCover
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
# NCrunch
|
# NCrunch
|
||||||
_NCrunch_*
|
_NCrunch_*
|
||||||
.*crunch*.local.xml
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
# MightyMoose
|
# MightyMoose
|
||||||
*.mm.*
|
*.mm.*
|
||||||
@@ -123,42 +166,63 @@ publish/
|
|||||||
# Publish Web Output
|
# Publish Web Output
|
||||||
*.[Pp]ublish.xml
|
*.[Pp]ublish.xml
|
||||||
*.azurePubxml
|
*.azurePubxml
|
||||||
## TODO: Comment the next line if you want to checkin your
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
## web deploy settings but do note that will include unencrypted
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
## passwords
|
*.pubxml
|
||||||
#*.pubxml
|
*.publishproj
|
||||||
|
|
||||||
# NuGet Packages Directory
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
packages/*
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
## TODO: If the tool you use requires repositories.config
|
# in these scripts will be unencrypted
|
||||||
## uncomment the next line
|
PublishScripts/
|
||||||
#!packages/repositories.config
|
|
||||||
|
|
||||||
# Enable "build/" folder in the NuGet Packages folder since
|
# NuGet Packages
|
||||||
# NuGet packages use it for MSBuild targets.
|
*.nupkg
|
||||||
# This line needs to be after the ignore of the build folder
|
# The packages folder can be ignored because of Package Restore
|
||||||
# (and the packages folder if the line above has been uncommented)
|
**/[Pp]ackages/*
|
||||||
!packages/build/
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
# Windows Azure Build Output
|
# Microsoft Azure Build Output
|
||||||
csx/
|
csx/
|
||||||
*.build.csdef
|
*.build.csdef
|
||||||
|
|
||||||
# Windows Store app package directory
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
AppPackages/
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!*.[Cc]ache/
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
sql/
|
|
||||||
*.Cache
|
|
||||||
ClientBin/
|
ClientBin/
|
||||||
[Ss]tyle[Cc]op.*
|
|
||||||
~$*
|
~$*
|
||||||
*~
|
*~
|
||||||
*.dbmdl
|
*.dbmdl
|
||||||
*.dbproj.schemaview
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
*.pfx
|
*.pfx
|
||||||
*.publishsettings
|
*.publishsettings
|
||||||
node_modules/
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
# RIA/Silverlight projects
|
# RIA/Silverlight projects
|
||||||
Generated_Code/
|
Generated_Code/
|
||||||
@@ -174,6 +238,7 @@ UpgradeLog*.htm
|
|||||||
# SQL Server files
|
# SQL Server files
|
||||||
*.mdf
|
*.mdf
|
||||||
*.ldf
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
# Business Intelligence projects
|
# Business Intelligence projects
|
||||||
*.rdl.data
|
*.rdl.data
|
||||||
@@ -183,7 +248,69 @@ UpgradeLog*.htm
|
|||||||
# Microsoft Fakes
|
# Microsoft Fakes
|
||||||
FakesAssemblies/
|
FakesAssemblies/
|
||||||
|
|
||||||
# LightSwitch generated files
|
# GhostDoc plugin setting file
|
||||||
GeneratedArtifacts/
|
*.GhostDoc.xml
|
||||||
_Pvt_Extensions/
|
|
||||||
ModelManifest.xml
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# JetBrains Rider
|
||||||
|
.idea/
|
||||||
|
*.sln.iml
|
||||||
|
|
||||||
|
# CodeRush
|
||||||
|
.cr/
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
@@ -12,6 +12,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 +33,8 @@
|
|||||||
<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">
|
|
||||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Moq, Version=4.5.21.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Moq.4.5.21\lib\net45\Moq.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -55,7 +46,24 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="app.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Castle.Core">
|
||||||
|
<Version>4.4.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Moq">
|
||||||
|
<Version>4.10.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="NUnit">
|
||||||
|
<Version>3.11.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Threading.Tasks.Extensions">
|
||||||
|
<Version>4.5.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.ValueTuple">
|
||||||
|
<Version>4.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</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.
|
||||||
|
|||||||
19
Filtration.Common.Tests/app.config
Normal file
19
Filtration.Common.Tests/app.config
Normal 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>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
|
|
||||||
<package id="Moq" version="4.5.21" targetFramework="net461" />
|
|
||||||
<package id="NUnit" version="3.4.1" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -4,7 +4,7 @@ using System.Windows.Data;
|
|||||||
|
|
||||||
namespace Filtration.Common.Converters
|
namespace Filtration.Common.Converters
|
||||||
{
|
{
|
||||||
internal class BoolInverterConverter : IValueConverter
|
public class BooleanInverterConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object Convert(object value, Type targetType, object parameter,
|
public object Convert(object value, Type targetType, object parameter,
|
||||||
CultureInfo culture)
|
CultureInfo culture)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -31,36 +31,13 @@
|
|||||||
<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">
|
|
||||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Castle.Windsor">
|
|
||||||
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Practices.ServiceLocation">
|
|
||||||
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
|
||||||
</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.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
<Reference Include="System.Web" />
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xaml" />
|
<Reference Include="System.Xaml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -75,16 +52,20 @@
|
|||||||
<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" />
|
||||||
<Compile Include="Services\MessageBoxService.cs" />
|
<Compile Include="Services\MessageBoxService.cs" />
|
||||||
<Compile Include="Utilities\LineReader.cs" />
|
<Compile Include="Utilities\LineReader.cs" />
|
||||||
|
<Compile Include="Utilities\PathOfExileColors.cs" />
|
||||||
|
<Compile Include="Utilities\VisualTreeUtility.cs" />
|
||||||
<Compile Include="ViewModels\PaneViewModel.cs" />
|
<Compile Include="ViewModels\PaneViewModel.cs" />
|
||||||
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
|
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="app.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||||
@@ -98,6 +79,23 @@
|
|||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Castle.Core">
|
||||||
|
<Version>4.4.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Castle.Windsor">
|
||||||
|
<Version>5.0.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="CommonServiceLocator">
|
||||||
|
<Version>2.0.4</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Extended.Wpf.Toolkit">
|
||||||
|
<Version>3.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MvvmLightLibs">
|
||||||
|
<Version>5.4.1.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</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.
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<Setter Property="Margin" Value="0,0,5,5" />
|
<Setter Property="Margin" Value="0,0,5,5" />
|
||||||
</Style>
|
</Style>
|
||||||
<converters:StringToVisibilityConverter x:Key="StringToVisibilityConverter" />
|
<converters:StringToVisibilityConverter x:Key="StringToVisibilityConverter" />
|
||||||
<converters:BoolInverterConverter x:Key="BoolInverterConverter" />
|
<converters:BooleanInverterConverter x:Key="BoolInverterConverter" />
|
||||||
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
|
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
|
||||||
<converters:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter" />
|
<converters:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter" />
|
||||||
<converters:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter" />
|
<converters:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// the stream into text.
|
/// the stream into text.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="streamSource">Data source</param>
|
/// <param name="streamSource">Data source</param>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public LineReader(Func<Stream> streamSource)
|
public LineReader(Func<Stream> streamSource)
|
||||||
: this(streamSource, Encoding.UTF8)
|
: this(streamSource, Encoding.UTF8)
|
||||||
{
|
{
|
||||||
@@ -33,6 +35,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// <param name="streamSource">Data source</param>
|
/// <param name="streamSource">Data source</param>
|
||||||
/// <param name="encoding">Encoding to use to decode the stream
|
/// <param name="encoding">Encoding to use to decode the stream
|
||||||
/// into text</param>
|
/// into text</param>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public LineReader(Func<Stream> streamSource, Encoding encoding)
|
public LineReader(Func<Stream> streamSource, Encoding encoding)
|
||||||
: this(() => new StreamReader(streamSource(), encoding))
|
: this(() => new StreamReader(streamSource(), encoding))
|
||||||
{
|
{
|
||||||
@@ -44,6 +47,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// UTF8 is used to decode the file into text.
|
/// UTF8 is used to decode the file into text.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filename">File to read from</param>
|
/// <param name="filename">File to read from</param>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public LineReader(string filename)
|
public LineReader(string filename)
|
||||||
: this(filename, Encoding.UTF8)
|
: this(filename, Encoding.UTF8)
|
||||||
{
|
{
|
||||||
@@ -56,6 +60,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// <param name="filename">File to read from</param>
|
/// <param name="filename">File to read from</param>
|
||||||
/// <param name="encoding">Encoding to use to decode the file
|
/// <param name="encoding">Encoding to use to decode the file
|
||||||
/// into text</param>
|
/// into text</param>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public LineReader(string filename, Encoding encoding)
|
public LineReader(string filename, Encoding encoding)
|
||||||
: this(() => new StreamReader(filename, encoding))
|
: this(() => new StreamReader(filename, encoding))
|
||||||
{
|
{
|
||||||
@@ -66,6 +71,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// is only called when the enumerator is fetched
|
/// is only called when the enumerator is fetched
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dataSource">Data source</param>
|
/// <param name="dataSource">Data source</param>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public LineReader(Func<TextReader> dataSource)
|
public LineReader(Func<TextReader> dataSource)
|
||||||
{
|
{
|
||||||
_dataSource = dataSource;
|
_dataSource = dataSource;
|
||||||
@@ -74,6 +80,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enumerates the data source line by line.
|
/// Enumerates the data source line by line.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[DebuggerStepThrough]
|
||||||
public IEnumerator<string> GetEnumerator()
|
public IEnumerator<string> GetEnumerator()
|
||||||
{
|
{
|
||||||
using (TextReader reader = _dataSource())
|
using (TextReader reader = _dataSource())
|
||||||
@@ -89,6 +96,7 @@ namespace Filtration.Common.Utilities
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Enumerates the data source line by line.
|
/// Enumerates the data source line by line.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[DebuggerStepThrough]
|
||||||
IEnumerator IEnumerable.GetEnumerator()
|
IEnumerator IEnumerable.GetEnumerator()
|
||||||
{
|
{
|
||||||
return GetEnumerator();
|
return GetEnumerator();
|
||||||
|
|||||||
48
Filtration.Common/Utilities/PathOfExileColors.cs
Normal file
48
Filtration.Common/Utilities/PathOfExileColors.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Xceed.Wpf.Toolkit;
|
||||||
|
|
||||||
|
namespace Filtration.Common.Utilities
|
||||||
|
{
|
||||||
|
public static class PathOfExileColors
|
||||||
|
{
|
||||||
|
static PathOfExileColors()
|
||||||
|
{
|
||||||
|
DefaultColors = new ObservableCollection<ColorItem>
|
||||||
|
{
|
||||||
|
new ColorItem(new Color {A = 240, R=127, G = 127, B = 127}, "Default"),
|
||||||
|
new ColorItem(new Color {A = 240, R=255, G = 255, B = 255}, "Value Default"),
|
||||||
|
new ColorItem(new Color {A = 240, R=255, G = 192, B = 203}, "Pink"),
|
||||||
|
new ColorItem(new Color {A = 240, R=30, G = 144, B = 255}, "Dodger Blue"),
|
||||||
|
new ColorItem(new Color {A = 240, R=150, G = 0, B = 0}, "Fire"),
|
||||||
|
new ColorItem(new Color {A = 240, R=54, G = 100, B = 146}, "Cold"),
|
||||||
|
new ColorItem(new Color {A = 240, R=255, G = 215, B = 0}, "Lightning"),
|
||||||
|
new ColorItem(new Color {A = 240, R=208, G = 32, B = 144}, "Chaos"),
|
||||||
|
new ColorItem(new Color {A = 240, R=136, G = 136, B = 255}, "Augmented"),
|
||||||
|
new ColorItem(new Color {A = 240, R=184, G = 218, B = 242}, "Crafted"),
|
||||||
|
new ColorItem(new Color {A = 240, R=210, G = 0, B = 0}, "Unmet"),
|
||||||
|
new ColorItem(new Color {A = 240, R=175, G = 96, B = 37}, "Unique Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=255, G = 255, B = 119}, "Rare Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=136, G = 136, B = 255}, "Magic Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=200, G = 200, B = 200}, "White Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=27, G = 162, B = 155}, "Gem Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=170, G = 158, B = 130}, "Currency Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=74, G = 230, B = 58}, "Quest Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=255, G = 200, B = 0}, "Nemesis Mod"),
|
||||||
|
new ColorItem(new Color {A = 220, R = 255, G = 40, B = 0}, "Nemesis Mod Outline"),
|
||||||
|
new ColorItem(new Color {A = 240, R=231, G = 180, B = 120}, "Title"),
|
||||||
|
new ColorItem(new Color {A = 240, R=210, G = 0, B = 0}, "Corrupted"),
|
||||||
|
new ColorItem(new Color {A = 240, R=170, G = 158, B = 130}, "Favour"),
|
||||||
|
new ColorItem(new Color {A = 240, R=180, G = 96, B = 0}, "Supporter Pack New Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=163, G = 141, B = 109}, "Supporter Pack Item"),
|
||||||
|
new ColorItem(new Color {A = 240, R=210, G = 0, B = 220}, "Bloodline Mod"),
|
||||||
|
new ColorItem(new Color {A = 200, R = 74, G = 0, B = 160}, "Bloodline Mod Outline"),
|
||||||
|
new ColorItem(new Color {A = 240, R=50, G = 230, B = 100}, "Torment Mod"),
|
||||||
|
new ColorItem(new Color {A = 200, R = 0, G = 100, B = 150}, "Torment Mod Outline"),
|
||||||
|
new ColorItem(new Color {A = 240, R=210, G = 0, B = 0}, "Can't Trade or Modify")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObservableCollection<ColorItem> DefaultColors { get; private set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
26
Filtration.Common/Utilities/VisualTreeUtility.cs
Normal file
26
Filtration.Common/Utilities/VisualTreeUtility.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace Filtration.Common.Utilities
|
||||||
|
{
|
||||||
|
public class VisualTreeUtility
|
||||||
|
{
|
||||||
|
public static T FindParent<T>(DependencyObject child)
|
||||||
|
where T : DependencyObject
|
||||||
|
{
|
||||||
|
//get parent item
|
||||||
|
var parentObject = VisualTreeHelper.GetParent(child);
|
||||||
|
|
||||||
|
//we've reached the end of the tree
|
||||||
|
if (parentObject == null) return null;
|
||||||
|
|
||||||
|
//check if the parent matches the type we're looking for
|
||||||
|
if (parentObject is T parent)
|
||||||
|
{
|
||||||
|
return parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
return FindParent<T>(parentObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Filtration.Common/app.config
Normal file
11
Filtration.Common/app.config
Normal 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>
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
|
|
||||||
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
|
|
||||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" />
|
|
||||||
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -46,6 +46,17 @@
|
|||||||
<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" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="CommonServiceLocator">
|
||||||
|
<Version>2.0.4</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MvvmLightLibs">
|
||||||
|
<Version>5.4.1.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</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.
|
||||||
|
|||||||
@@ -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
|
||||||
{
|
{
|
||||||
@@ -6,6 +8,7 @@ namespace Filtration.Interface
|
|||||||
{
|
{
|
||||||
bool IsScript { get; }
|
bool IsScript { get; }
|
||||||
bool IsTheme { get; }
|
bool IsTheme { get; }
|
||||||
Task Close();
|
Task<bool> Close();
|
||||||
|
RelayCommand CloseCommand { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
11
Filtration.Interface/app.config
Normal file
11
Filtration.Interface/app.config
Normal 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>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<configSections>
|
<configSections>
|
||||||
<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">
|
||||||
@@ -23,9 +23,12 @@
|
|||||||
<add name="FiltrationDbContext" connectionString="data source="D:\C# Projects\Filtration\Filtration.db"" providerName="System.Data.SQLite.EF6" />
|
<add name="FiltrationDbContext" connectionString="data source="D:\C# Projects\Filtration\Filtration.db"" providerName="System.Data.SQLite.EF6" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
|
|
||||||
<system.data>
|
<runtime>
|
||||||
<DbProviderFactories>
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<remove invariant="System.Data.SQLite.EF6" />
|
<dependentAssembly>
|
||||||
<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" />
|
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
||||||
<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>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
|
||||||
</system.data></configuration>
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@@ -38,32 +38,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</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">
|
|
||||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.102.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.EF6, Version=1.0.102.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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.Linq, Version=1.0.102.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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Choose>
|
<Choose>
|
||||||
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
|
<When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'">
|
||||||
@@ -83,7 +59,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Filtration.ItemFilterPreview.Data\Filtration.ItemFilterPreview.Data.csproj">
|
<ProjectReference Include="..\Filtration.ItemFilterPreview.Data\Filtration.ItemFilterPreview.Data.csproj">
|
||||||
@@ -95,6 +70,17 @@
|
|||||||
<Name>Filtration.ObjectModel</Name>
|
<Name>Filtration.ObjectModel</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="NUnit">
|
||||||
|
<Version>3.11.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Data.SQLite">
|
||||||
|
<Version>1.0.109.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Data.SQLite.Core">
|
||||||
|
<Version>1.0.109.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
<Choose>
|
<Choose>
|
||||||
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -115,13 +101,6 @@
|
|||||||
</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">
|
|
||||||
<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\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'))" />
|
|
||||||
</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">
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using NUnit.Framework;
|
|||||||
|
|
||||||
namespace Filtration.ItemFilterPreview.Data.Tests.Repositories
|
namespace Filtration.ItemFilterPreview.Data.Tests.Repositories
|
||||||
{
|
{
|
||||||
|
[Ignore("integration test")]
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestItemSetRepository
|
public class TestItemSetRepository
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="EntityFramework" version="6.1.3" targetFramework="net461" />
|
|
||||||
<package id="NUnit" version="3.4.1" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.Core" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.EF6" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.Linq" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -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" />
|
||||||
|
|
||||||
</configSections>
|
</configSections>
|
||||||
<entityFramework>
|
<entityFramework>
|
||||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||||
@@ -11,19 +11,23 @@
|
|||||||
</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="D:\C# Projects\Filtration\Filtration.db"" providerName="System.Data.SQLite.EF6" />
|
||||||
<add name="FiltrationDbContext" connectionString="data source="D:\C# Projects\Filtration\Filtration.db"" providerName="System.Data.SQLite.EF6" />
|
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<system.data>
|
|
||||||
<DbProviderFactories>
|
<runtime>
|
||||||
<remove invariant="System.Data.SQLite.EF6" />
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
<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" />
|
<dependentAssembly>
|
||||||
<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>
|
<assemblyIdentity name="CommonServiceLocator" publicKeyToken="489b6accfaf20ef0" culture="neutral" />
|
||||||
</system.data></configuration>
|
<bindingRedirect oldVersion="0.0.0.0-2.0.4.0" newVersion="2.0.4.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
@@ -33,25 +33,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</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">
|
|
||||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.102.0\lib\net46\System.Data.SQLite.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.EF6, Version=1.0.102.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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.SQLite.Linq, Version=1.0.102.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>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.Security" />
|
<Reference Include="System.Security" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
@@ -69,7 +53,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
<None Include="packages.config" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
<ProjectReference Include="..\Filtration.ObjectModel\Filtration.ObjectModel.csproj">
|
||||||
@@ -77,14 +60,15 @@
|
|||||||
<Name>Filtration.ObjectModel</Name>
|
<Name>Filtration.ObjectModel</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="System.Data.SQLite">
|
||||||
|
<Version>1.0.109.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Data.SQLite.Core">
|
||||||
|
<Version>1.0.109.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</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')" />
|
|
||||||
<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\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'))" />
|
|
||||||
</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">
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="EntityFramework" version="6.1.3" targetFramework="net46" />
|
|
||||||
<package id="System.Data.SQLite" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.Core" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.EF6" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
<package id="System.Data.SQLite.Linq" version="1.0.102.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -23,6 +23,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,33 +44,10 @@
|
|||||||
<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">
|
|
||||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FluentAssertions, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="FluentAssertions.Core, Version=4.13.0.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\FluentAssertions.4.13.0\lib\net45\FluentAssertions.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Moq, Version=4.5.21.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Moq.4.5.21\lib\net45\Moq.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<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,10 +97,28 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="Resources\MuldiniFilterScript.txt" />
|
<None Include="Resources\MuldiniFilterScript.txt" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Castle.Core">
|
||||||
|
<Version>4.4.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="FluentAssertions">
|
||||||
|
<Version>5.6.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Moq">
|
||||||
|
<Version>4.10.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="NUnit">
|
||||||
|
<Version>3.11.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Threading.Tasks.Extensions">
|
||||||
|
<Version>4.5.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.ValueTuple">
|
||||||
|
<Version>4.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\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.
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Filtration.ItemFilterPreview.Tests.Properties;
|
|||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.ObjectModel.BlockItemTypes;
|
using Filtration.ObjectModel.BlockItemTypes;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
|
using Filtration.ObjectModel.Factories;
|
||||||
using Filtration.Parser.Services;
|
using Filtration.Parser.Services;
|
||||||
using Moq;
|
using Moq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
@@ -29,7 +30,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
|
|||||||
//Arrange
|
//Arrange
|
||||||
var testInputItem = Mock.Of<IItem>();
|
var testInputItem = Mock.Of<IItem>();
|
||||||
var testInputBlock = Mock.Of<IItemFilterBlock>();
|
var testInputBlock = Mock.Of<IItemFilterBlock>();
|
||||||
var testInputScript = Mock.Of<IItemFilterScript>(s => s.ItemFilterBlocks == new ObservableCollection<IItemFilterBlock> {testInputBlock});
|
var testInputScript = Mock.Of<IItemFilterScript>(s => s.ItemFilterBlocks == new ObservableCollection<IItemFilterBlockBase> {testInputBlock});
|
||||||
|
|
||||||
_testUtility.MockBlockItemMatcher
|
_testUtility.MockBlockItemMatcher
|
||||||
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
|
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
|
||||||
@@ -50,7 +51,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
|
|||||||
//Arrange
|
//Arrange
|
||||||
var testInputItem = Mock.Of<IItem>();
|
var testInputItem = Mock.Of<IItem>();
|
||||||
var testInputBlock = Mock.Of<IItemFilterBlock>();
|
var testInputBlock = Mock.Of<IItemFilterBlock>();
|
||||||
var testInputScript = Mock.Of<IItemFilterScript>(s => s.ItemFilterBlocks == new ObservableCollection<IItemFilterBlock> { testInputBlock });
|
var testInputScript = Mock.Of<IItemFilterScript>(s => s.ItemFilterBlocks == new ObservableCollection<IItemFilterBlockBase> { testInputBlock });
|
||||||
|
|
||||||
_testUtility.MockBlockItemMatcher
|
_testUtility.MockBlockItemMatcher
|
||||||
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
|
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
|
||||||
@@ -66,12 +67,18 @@ namespace Filtration.ItemFilterPreview.Tests.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Ignore("Outdated item filter")]
|
||||||
public void ProcessItemsAgainstItemFilterScript_IntegrationTest()
|
public void ProcessItemsAgainstItemFilterScript_IntegrationTest()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var testInputScriptFile = Resources.MuldiniFilterScript;
|
var testInputScriptFile = Resources.MuldiniFilterScript;
|
||||||
var blockGroupHierarchyBuilder = new BlockGroupHierarchyBuilder();
|
var blockGroupHierarchyBuilder = new BlockGroupHierarchyBuilder();
|
||||||
var scriptTranslator = new ItemFilterScriptTranslator(new ItemFilterBlockTranslator(blockGroupHierarchyBuilder), blockGroupHierarchyBuilder);
|
var mockItemFilterScriptFactory = new Mock<IItemFilterScriptFactory>();
|
||||||
|
mockItemFilterScriptFactory
|
||||||
|
.Setup(i => i.Create())
|
||||||
|
.Returns(new ItemFilterScript());
|
||||||
|
|
||||||
|
var scriptTranslator = new ItemFilterScriptTranslator(blockGroupHierarchyBuilder, new ItemFilterBlockTranslator(blockGroupHierarchyBuilder), mockItemFilterScriptFactory.Object);
|
||||||
var script = scriptTranslator.TranslateStringToItemFilterScript(testInputScriptFile);
|
var script = scriptTranslator.TranslateStringToItemFilterScript(testInputScriptFile);
|
||||||
|
|
||||||
var testInputItem = new Item
|
var testInputItem = new Item
|
||||||
@@ -96,12 +103,17 @@ namespace Filtration.ItemFilterPreview.Tests.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Ignore("Outdated item filter")]
|
||||||
public void ProcessItemsAgainstItemFilterScript_IntegrationTest_10Items()
|
public void ProcessItemsAgainstItemFilterScript_IntegrationTest_10Items()
|
||||||
{
|
{
|
||||||
//Arrange
|
//Arrange
|
||||||
var testInputScriptFile = Resources.MuldiniFilterScript;
|
var testInputScriptFile = Resources.MuldiniFilterScript;
|
||||||
var blockGroupHierarchyBuilder = new BlockGroupHierarchyBuilder();
|
var blockGroupHierarchyBuilder = new BlockGroupHierarchyBuilder();
|
||||||
var scriptTranslator = new ItemFilterScriptTranslator(new ItemFilterBlockTranslator(blockGroupHierarchyBuilder), blockGroupHierarchyBuilder);
|
var mockItemFilterScriptFactory = new Mock<IItemFilterScriptFactory>();
|
||||||
|
mockItemFilterScriptFactory
|
||||||
|
.Setup(i => i.Create())
|
||||||
|
.Returns(new ItemFilterScript());
|
||||||
|
var scriptTranslator = new ItemFilterScriptTranslator(blockGroupHierarchyBuilder, new ItemFilterBlockTranslator(blockGroupHierarchyBuilder), mockItemFilterScriptFactory.Object);
|
||||||
var script = scriptTranslator.TranslateStringToItemFilterScript(testInputScriptFile);
|
var script = scriptTranslator.TranslateStringToItemFilterScript(testInputScriptFile);
|
||||||
|
|
||||||
var testInputItems = new List<IItem>
|
var testInputItems = new List<IItem>
|
||||||
|
|||||||
@@ -6,12 +6,12 @@ using System.Xml.Serialization;
|
|||||||
using Filtration.ObjectModel;
|
using Filtration.ObjectModel;
|
||||||
using Filtration.ObjectModel.Enums;
|
using Filtration.ObjectModel.Enums;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using YamlDotNet.Serialization;
|
|
||||||
|
|
||||||
namespace Filtration.ItemFilterPreview.Tests.Services
|
namespace Filtration.ItemFilterPreview.Tests.Services
|
||||||
{
|
{
|
||||||
class serializationtest
|
class serializationtest
|
||||||
{
|
{
|
||||||
|
[Ignore("")]
|
||||||
[Test]
|
[Test]
|
||||||
public void test_serialization()
|
public void test_serialization()
|
||||||
{
|
{
|
||||||
@@ -39,7 +39,6 @@ namespace Filtration.ItemFilterPreview.Tests.Services
|
|||||||
output = textWriter.ToString();
|
output = textWriter.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var x = 2;
|
|
||||||
//Assert
|
//Assert
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,35 @@
|
|||||||
<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.5.0.0" newVersion="3.5.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.1.2.3" newVersion="2.1.2.3" />
|
<bindingRedirect oldVersion="0.0.0.0-2.2.0.4" newVersion="2.2.0.4" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Xceed.Wpf.Toolkit" publicKeyToken="3e4669d2f30244f4" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.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>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
|
|
||||||
<package id="FluentAssertions" version="4.13.0" targetFramework="net461" />
|
|
||||||
<package id="Moq" version="4.5.21" targetFramework="net461" />
|
|
||||||
<package id="NUnit" version="3.4.1" targetFramework="net461" />
|
|
||||||
<package id="YamlDotNet" version="3.9.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -36,40 +36,11 @@
|
|||||||
<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">
|
|
||||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Castle.Windsor, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight, Version=5.3.0.19026, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.3.0.19032, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Moq, Version=4.5.21.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Moq.4.5.21\lib\net45\Moq.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
|
<Reference Include="System.Web" />
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -155,7 +126,6 @@
|
|||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<None Include="packages.config" />
|
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
@@ -193,6 +163,29 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Model\" />
|
<Folder Include="Model\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Castle.Core">
|
||||||
|
<Version>4.4.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Castle.Windsor">
|
||||||
|
<Version>5.0.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="CommonServiceLocator">
|
||||||
|
<Version>2.0.4</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Moq">
|
||||||
|
<Version>4.10.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="MvvmLightLibs">
|
||||||
|
<Version>5.4.1.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Threading.Tasks.Extensions">
|
||||||
|
<Version>4.5.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.ValueTuple">
|
||||||
|
<Version>4.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
</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.
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ namespace Filtration.ItemFilterPreview.Services
|
|||||||
sw.Restart();
|
sw.Restart();
|
||||||
|
|
||||||
var matchedBlock = itemFilterScript.ItemFilterBlocks
|
var matchedBlock = itemFilterScript.ItemFilterBlocks
|
||||||
.Where(b => !(b is ItemFilterSection))
|
.OfType<IItemFilterBlock>()
|
||||||
.FirstOrDefault(block => _blockItemMatcher.ItemBlockMatch(block, item));
|
.FirstOrDefault(block => _blockItemMatcher.ItemBlockMatch(block, item));
|
||||||
|
|
||||||
filteredItems.Add(new FilteredItem(item, matchedBlock));
|
filteredItems.Add(new FilteredItem(item, matchedBlock));
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
|
|
||||||
<package id="Castle.Windsor" version="3.3.0" targetFramework="net461" />
|
|
||||||
<package id="CommonServiceLocator" version="1.3" targetFramework="net461" />
|
|
||||||
<package id="Moq" version="4.5.21" targetFramework="net461" />
|
|
||||||
<package id="MvvmLightLibs" version="5.3.0.0" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -12,6 +12,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,20 +33,9 @@
|
|||||||
<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">
|
|
||||||
<HintPath>..\packages\Castle.Core.3.3.3\lib\net45\Castle.Core.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Moq, Version=4.5.21.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Moq.4.5.21\lib\net45\Moq.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="nunit.framework, Version=3.4.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\NUnit.3.4.1\lib\net45\nunit.framework.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</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.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
@@ -66,7 +57,27 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="packages.config" />
|
<None Include="app.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Castle.Core">
|
||||||
|
<Version>4.4.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="Moq">
|
||||||
|
<Version>4.10.1</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="NUnit">
|
||||||
|
<Version>3.11.0</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.Threading.Tasks.Extensions">
|
||||||
|
<Version>4.5.2</Version>
|
||||||
|
</PackageReference>
|
||||||
|
<PackageReference Include="System.ValueTuple">
|
||||||
|
<Version>4.5.0</Version>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</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.
|
||||||
|
|||||||
@@ -6,23 +6,6 @@ namespace Filtration.ObjectModel.Tests
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestItemFilterBlock
|
public class TestItemFilterBlock
|
||||||
{
|
{
|
||||||
[Test]
|
|
||||||
public void ItemFilterBlock_BlockCount_ReturnsCorrectNumber()
|
|
||||||
{
|
|
||||||
// Arrange
|
|
||||||
var block = new ItemFilterBlock();
|
|
||||||
block.BlockItems.Add(new ItemLevelBlockItem());
|
|
||||||
block.BlockItems.Add(new ItemLevelBlockItem());
|
|
||||||
block.BlockItems.Add(new ItemLevelBlockItem());
|
|
||||||
block.BlockItems.Add(new ItemLevelBlockItem());
|
|
||||||
|
|
||||||
// Act
|
|
||||||
var count = block.BlockCount(typeof (ItemLevelBlockItem));
|
|
||||||
|
|
||||||
// Assert
|
|
||||||
Assert.AreEqual(4, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void ItemFilterBlock_AddBlockItemAllowed_LessThanMaximum_ReturnsTrue()
|
public void ItemFilterBlock_AddBlockItemAllowed_LessThanMaximum_ReturnsTrue()
|
||||||
{
|
{
|
||||||
|
|||||||
27
Filtration.ObjectModel.Tests/app.config
Normal file
27
Filtration.ObjectModel.Tests/app.config
Normal 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>
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<packages>
|
|
||||||
<package id="Castle.Core" version="3.3.3" targetFramework="net461" />
|
|
||||||
<package id="Moq" version="4.5.21" targetFramework="net461" />
|
|
||||||
<package id="NUnit" version="3.4.1" targetFramework="net461" />
|
|
||||||
</packages>
|
|
||||||
@@ -7,7 +7,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
public sealed class ActionBlockItem : BlockItemBase
|
public sealed class ActionBlockItem : BlockItemBase
|
||||||
{
|
{
|
||||||
private BlockAction _action;
|
private BlockAction _action;
|
||||||
private bool _isDirty;
|
|
||||||
|
|
||||||
public ActionBlockItem(BlockAction action)
|
public ActionBlockItem(BlockAction action)
|
||||||
{
|
{
|
||||||
@@ -16,7 +15,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
|
|
||||||
public BlockAction Action
|
public BlockAction Action
|
||||||
{
|
{
|
||||||
get { return _action; }
|
get => _action;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_action = value;
|
_action = value;
|
||||||
@@ -24,7 +23,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
OnPropertyChanged(nameof(SummaryText));
|
OnPropertyChanged(nameof(SummaryText));
|
||||||
OnPropertyChanged(nameof(SummaryBackgroundColor));
|
OnPropertyChanged(nameof(SummaryBackgroundColor));
|
||||||
OnPropertyChanged(nameof(SummaryText));
|
OnPropertyChanged(nameof(SummaryTextColor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,17 +41,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
|
|
||||||
public override Color SummaryTextColor => Action == BlockAction.Show ? Colors.Black : Colors.White;
|
public override Color SummaryTextColor => Action == BlockAction.Show ? Colors.Black : Colors.White;
|
||||||
|
|
||||||
public override int SortOrder => 0;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Action;
|
||||||
|
|
||||||
public override bool IsDirty
|
|
||||||
{
|
|
||||||
get { return _isDirty; }
|
|
||||||
protected set
|
|
||||||
{
|
|
||||||
_isDirty = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ToggleAction()
|
public void ToggleAction()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using Filtration.ObjectModel.Annotations;
|
using Filtration.ObjectModel.Annotations;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
||||||
{
|
{
|
||||||
public abstract class BlockItemBase : IItemFilterBlockItem
|
public abstract class BlockItemBase : IItemFilterBlockItem
|
||||||
{
|
{
|
||||||
|
private bool _isDirty;
|
||||||
|
|
||||||
public abstract string PrefixText { get; }
|
public abstract string PrefixText { get; }
|
||||||
public abstract string OutputText { get; }
|
public abstract string OutputText { get; }
|
||||||
public abstract int MaximumAllowed { get; }
|
public abstract int MaximumAllowed { get; }
|
||||||
@@ -14,8 +17,18 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
public abstract string SummaryText { get; }
|
public abstract string SummaryText { get; }
|
||||||
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 BlockItemOrdering SortOrder { get; }
|
||||||
public abstract bool IsDirty { get; protected set; }
|
public string Comment { get; set; }
|
||||||
|
|
||||||
|
public bool IsDirty
|
||||||
|
{
|
||||||
|
get { return _isDirty; }
|
||||||
|
protected set
|
||||||
|
{
|
||||||
|
_isDirty = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
||||||
|
{
|
||||||
|
public abstract class BooleanBlockItem : BlockItemBase
|
||||||
|
{
|
||||||
|
private bool _booleanValue;
|
||||||
|
|
||||||
|
protected BooleanBlockItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected BooleanBlockItem(bool booleanValue)
|
||||||
|
{
|
||||||
|
BooleanValue = booleanValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool BooleanValue
|
||||||
|
{
|
||||||
|
get { return _booleanValue; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_booleanValue = value;
|
||||||
|
IsDirty = true;
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged(nameof(SummaryText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string OutputText => PrefixText + " " + BooleanValue;
|
||||||
|
public override string SummaryText => DisplayHeading + " = " + BooleanValue;
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
|
||||||
|
public void ToggleValue()
|
||||||
|
{
|
||||||
|
BooleanValue = !BooleanValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,13 +19,11 @@ 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;
|
||||||
|
|
||||||
public override bool IsDirty { get; protected set; }
|
|
||||||
|
|
||||||
public ThemeComponent ThemeComponent
|
public ThemeComponent ThemeComponent
|
||||||
{
|
{
|
||||||
get { return _themeComponent; }
|
get { return _themeComponent; }
|
||||||
@@ -65,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)
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,8 +23,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
public override Color SummaryBackgroundColor => Colors.Transparent;
|
public override Color SummaryBackgroundColor => Colors.Transparent;
|
||||||
public override Color SummaryTextColor => Colors.Transparent;
|
public override Color SummaryTextColor => Colors.Transparent;
|
||||||
|
|
||||||
public override bool IsDirty { get; protected set; }
|
|
||||||
|
|
||||||
public int Value
|
public int Value
|
||||||
{
|
{
|
||||||
get { return _value; }
|
get { return _value; }
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
103
Filtration.ObjectModel/BlockItemBaseTypes/IconBlockItem.cs
Normal file
103
Filtration.ObjectModel/BlockItemBaseTypes/IconBlockItem.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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,7 +27,28 @@ 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 override bool IsDirty { get; protected set; }
|
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
|
||||||
{
|
{
|
||||||
@@ -36,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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
Filtration.ObjectModel/BlockItemBaseTypes/NilBlockItem.cs
Normal file
16
Filtration.ObjectModel/BlockItemBaseTypes/NilBlockItem.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
namespace Filtration.ObjectModel.BlockItemBaseTypes
|
||||||
|
{
|
||||||
|
public abstract class NilBlockItem : BlockItemBase
|
||||||
|
{
|
||||||
|
protected NilBlockItem()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string OutputText => PrefixText;
|
||||||
|
public override string SummaryText => DisplayHeading;
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
|
||||||
|
public abstract string Description { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -26,8 +26,6 @@ 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 override bool IsDirty { get; protected set; }
|
|
||||||
|
|
||||||
public NumericFilterPredicate FilterPredicate
|
public NumericFilterPredicate FilterPredicate
|
||||||
{
|
{
|
||||||
get { return _filterPredicate; }
|
get { return _filterPredicate; }
|
||||||
|
|||||||
87
Filtration.ObjectModel/BlockItemBaseTypes/StrIntBlockItem.cs
Normal file
87
Filtration.ObjectModel/BlockItemBaseTypes/StrIntBlockItem.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
72
Filtration.ObjectModel/BlockItemBaseTypes/StringBlockItem.cs
Normal file
72
Filtration.ObjectModel/BlockItemBaseTypes/StringBlockItem.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,8 +30,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
|
|||||||
|
|
||||||
public ObservableCollection<string> Items { get; protected set; }
|
public ObservableCollection<string> Items { get; protected set; }
|
||||||
|
|
||||||
public override bool IsDirty { get; protected set; }
|
|
||||||
|
|
||||||
private void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
private void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
IsDirty = true;
|
IsDirty = true;
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class AnyEnchantmentBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public AnyEnchantmentBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnyEnchantmentBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "AnyEnchantment";
|
||||||
|
public override string DisplayHeading => "Any Enchantment";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.YellowGreen;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.AnyEnchantment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
|
||||||
namespace Filtration.ObjectModel.BlockItemTypes
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
@@ -7,6 +8,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 +18,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 => 13;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetBackgroundColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -16,23 +17,23 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
{
|
{
|
||||||
if (Items.Count > 0 && Items.Count < 4)
|
if (Items.Count > 0 && Items.Count < 4)
|
||||||
{
|
{
|
||||||
return "Item Base Types: " +
|
return "Base Types: " +
|
||||||
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
}
|
}
|
||||||
if (Items.Count >= 4)
|
if (Items.Count >= 4)
|
||||||
{
|
{
|
||||||
var remaining = Items.Count - 3;
|
var remaining = Items.Count - 3;
|
||||||
return "Item Base Types: " + Items.Take(3)
|
return "Base Types: " + Items.Take(3)
|
||||||
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
.TrimEnd(' ')
|
.TrimEnd(' ')
|
||||||
.TrimEnd(',') + " (+" + remaining + " more)";
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
}
|
}
|
||||||
return "Item Base Types: (none)";
|
return "Base Types: (none)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => 11;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class BlightedMapBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public BlightedMapBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlightedMapBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "BlightedMap";
|
||||||
|
public override string DisplayHeading => "Blighted Map";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Khaki;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.BligtedMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 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 +18,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 => 14;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetBorderColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
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
|
||||||
{
|
{
|
||||||
@@ -16,23 +17,23 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
{
|
{
|
||||||
if (Items.Count > 0 && Items.Count < 4)
|
if (Items.Count > 0 && Items.Count < 4)
|
||||||
{
|
{
|
||||||
return "Item Classes: " +
|
return "Classes: " +
|
||||||
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
}
|
}
|
||||||
if (Items.Count >= 4)
|
if (Items.Count >= 4)
|
||||||
{
|
{
|
||||||
var remaining = Items.Count - 3;
|
var remaining = Items.Count - 3;
|
||||||
return "Item Classes: " + Items.Take(3)
|
return "Classes: " + Items.Take(3)
|
||||||
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
.TrimEnd(' ')
|
.TrimEnd(' ')
|
||||||
.TrimEnd(',') + " (+" + remaining + " more)";
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
}
|
}
|
||||||
return "Item Classes: (none)";
|
return "Classes: (none)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => 10;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
Filtration.ObjectModel/BlockItemTypes/CorruptedBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/CorruptedBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class CorruptedBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public CorruptedBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public CorruptedBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "Corrupted";
|
||||||
|
public override string DisplayHeading => "Corrupted";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DarkRed;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Corrupted;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
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 BlockItemOrdering SortOrder => BlockItemOrdering.CustomAlertSound;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class DisableDropSoundBlockItem : NilBlockItem, IAudioVisualBlockItem
|
||||||
|
{
|
||||||
|
public DisableDropSoundBlockItem() : base()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "DisableDropSound";
|
||||||
|
public override string DisplayHeading => "Disable Drop Sound";
|
||||||
|
public override string Description => "Default drop sound disabled.";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Transparent;
|
||||||
|
public override Color SummaryTextColor => Colors.Transparent;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.DisableDropSound;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 => 2;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.DropLevel;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 100;
|
public override int Maximum => 100;
|
||||||
}
|
}
|
||||||
|
|||||||
23
Filtration.ObjectModel/BlockItemTypes/ElderItemBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/ElderItemBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class ElderItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public ElderItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ElderItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "ElderItem";
|
||||||
|
public override string DisplayHeading => "Elder Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DarkGray;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.ElderItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
Filtration.ObjectModel/BlockItemTypes/ElderMapBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/ElderMapBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
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 BlockItemOrdering SortOrder => BlockItemOrdering.ElderMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
namespace Filtration.ObjectModel.BlockItemTypes
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
{
|
{
|
||||||
@@ -16,7 +17,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 => 15;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetFontSize;
|
||||||
public override int Minimum => 11;
|
public override int Minimum => 11;
|
||||||
public override int Maximum => 45;
|
public override int Maximum => 45;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class FracturedItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public FracturedItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public FracturedItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "FracturedItem";
|
||||||
|
public override string DisplayHeading => "Fractured Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Salmon;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.FracturedItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Filtration.ObjectModel/BlockItemTypes/GemLevelBlockItem.cs
Normal file
28
Filtration.ObjectModel/BlockItemTypes/GemLevelBlockItem.cs
Normal 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 BlockItemOrdering SortOrder => BlockItemOrdering.GemLevel;
|
||||||
|
public override int Minimum => 0;
|
||||||
|
public override int Maximum => 21;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public class HasEnchantmentBlockItem : StringListBlockItem
|
||||||
|
{
|
||||||
|
public override string PrefixText => "HasEnchantment";
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
public override string DisplayHeading => "Has Enchantment";
|
||||||
|
|
||||||
|
public override string SummaryText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Items.Count > 0 && Items.Count < 4)
|
||||||
|
{
|
||||||
|
return "Enchantments: " +
|
||||||
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
|
}
|
||||||
|
if (Items.Count >= 4)
|
||||||
|
{
|
||||||
|
var remaining = Items.Count - 3;
|
||||||
|
return "Enchantments: " + Items.Take(3)
|
||||||
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
|
.TrimEnd(' ')
|
||||||
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
|
}
|
||||||
|
return "Enchantments: (none)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Color SummaryBackgroundColor => Colors.PaleGreen;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.HasEnchantment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
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 "Explicit Mods: " +
|
||||||
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
|
}
|
||||||
|
if (Items.Count >= 4)
|
||||||
|
{
|
||||||
|
var remaining = Items.Count - 3;
|
||||||
|
return "Explicit Mods: " + Items.Take(3)
|
||||||
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
|
.TrimEnd(' ')
|
||||||
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
|
}
|
||||||
|
return "Explicit Mods: (none)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Color SummaryBackgroundColor => Colors.MidnightBlue;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.HasExplicitMod;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 => 8;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Height;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 6;
|
public override int Maximum => 6;
|
||||||
}
|
}
|
||||||
|
|||||||
23
Filtration.ObjectModel/BlockItemTypes/IdentifiedBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/IdentifiedBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class IdentifiedBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public IdentifiedBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public IdentifiedBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "Identified";
|
||||||
|
public override string DisplayHeading => "Identified";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Identified;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 => 1;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.ItemLevel;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 100;
|
public override int Maximum => 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
public override string SummaryText => "Linked Sockets " + FilterPredicate;
|
public override string SummaryText => "Linked Sockets " + FilterPredicate;
|
||||||
public override Color SummaryBackgroundColor => Colors.Gold;
|
public override Color SummaryBackgroundColor => Colors.Gold;
|
||||||
public override Color SummaryTextColor => Colors.Black;
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
public override int SortOrder => 6;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.LinkedSockets;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 6;
|
public override int Maximum => 6;
|
||||||
}
|
}
|
||||||
|
|||||||
24
Filtration.ObjectModel/BlockItemTypes/MapIconBlockItem.cs
Normal file
24
Filtration.ObjectModel/BlockItemTypes/MapIconBlockItem.cs
Normal 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 BlockItemOrdering SortOrder => BlockItemOrdering.MinimapIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
28
Filtration.ObjectModel/BlockItemTypes/MapTierBlockItem.cs
Normal file
28
Filtration.ObjectModel/BlockItemTypes/MapTierBlockItem.cs
Normal 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 BlockItemOrdering SortOrder => BlockItemOrdering.MapTier;
|
||||||
|
public override int Minimum => 1;
|
||||||
|
public override int Maximum => 16;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
Filtration.ObjectModel/BlockItemTypes/PlayEffectBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/PlayEffectBlockItem.cs
Normal 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 BlockItemOrdering SortOrder => BlockItemOrdering.PlayEffect;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public class PositionalSoundBlockItem : StrIntBlockItem
|
||||||
|
{
|
||||||
|
public PositionalSoundBlockItem()
|
||||||
|
{
|
||||||
|
Value = "1";
|
||||||
|
SecondValue = 79;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PositionalSoundBlockItem(string value, int secondValue) : base(value, secondValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "PlayAlertSoundPositional";
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
public override string DisplayHeading => "Play Positional Alert Sound";
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.PlayAlertSoundPositional;
|
||||||
|
}
|
||||||
|
}
|
||||||
39
Filtration.ObjectModel/BlockItemTypes/ProphecyBlockItem.cs
Normal file
39
Filtration.ObjectModel/BlockItemTypes/ProphecyBlockItem.cs
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public class ProphecyBlockItem : StringListBlockItem
|
||||||
|
{
|
||||||
|
public override string PrefixText => "Prophecy";
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
public override string DisplayHeading => "Prophecy";
|
||||||
|
|
||||||
|
public override string SummaryText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Items.Count > 0 && Items.Count < 4)
|
||||||
|
{
|
||||||
|
return "Prophecies: " +
|
||||||
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
|
}
|
||||||
|
if (Items.Count >= 4)
|
||||||
|
{
|
||||||
|
var remaining = Items.Count - 3;
|
||||||
|
return "Prophecies: " + Items.Take(3)
|
||||||
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
|
.TrimEnd(' ')
|
||||||
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
|
}
|
||||||
|
return "Prophecies: (none)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DarkMagenta;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Prophecy;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,8 +21,8 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
public override string SummaryText => "Quality " + FilterPredicate;
|
public override string SummaryText => "Quality " + FilterPredicate;
|
||||||
public override Color SummaryBackgroundColor => Colors.DarkOrange;
|
public override Color SummaryBackgroundColor => Colors.DarkOrange;
|
||||||
public override Color SummaryTextColor => Colors.White;
|
public override Color SummaryTextColor => Colors.White;
|
||||||
public override int SortOrder => 3;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Quality;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 20;
|
public override int Maximum => 99;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RarityBlockItem(FilterPredicateOperator predicateOperator, ItemRarity predicateOperand)
|
||||||
|
: base(predicateOperator, (int)predicateOperand)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public override string PrefixText => "Rarity";
|
public override string PrefixText => "Rarity";
|
||||||
public override string OutputText => PrefixText + " " + FilterPredicate.PredicateOperator
|
public override string OutputText => PrefixText + " " + FilterPredicate.PredicateOperator
|
||||||
.GetAttributeDescription() + " " + ((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
|
.GetAttributeDescription() + " " + ((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
|
||||||
@@ -25,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 => 4;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Rarity;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => (int)ItemRarity.Unique;
|
public override int Maximum => (int)ItemRarity.Unique;
|
||||||
}
|
}
|
||||||
|
|||||||
23
Filtration.ObjectModel/BlockItemTypes/ShapedMapBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/ShapedMapBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class ShapedMapBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public ShapedMapBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShapedMapBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "ShapedMap";
|
||||||
|
public override string DisplayHeading => "Shaped Map";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DarkGoldenrod;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.ShapedMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
Filtration.ObjectModel/BlockItemTypes/ShaperItemBlockItem.cs
Normal file
23
Filtration.ObjectModel/BlockItemTypes/ShaperItemBlockItem.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class ShaperItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public ShaperItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShaperItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "ShaperItem";
|
||||||
|
public override string DisplayHeading => "Shaper Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.DimGray;
|
||||||
|
public override Color SummaryTextColor => Colors.White;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.ShaperItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 BlockItemOrdering SortOrder => BlockItemOrdering.SocketGroup;
|
||||||
|
|
||||||
private SocketColor StringToSocketColor(char socketColorString)
|
private SocketColor StringToSocketColor(char socketColorString)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
public override string SummaryText => "Sockets " + FilterPredicate;
|
public override string SummaryText => "Sockets " + FilterPredicate;
|
||||||
public override Color SummaryBackgroundColor => Colors.LightGray;
|
public override Color SummaryBackgroundColor => Colors.LightGray;
|
||||||
public override Color SummaryTextColor => Colors.Black;
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
public override int SortOrder => 5;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Sockets;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 6;
|
public override int Maximum => 6;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
using Filtration.ObjectModel.BlockItemBaseTypes;
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
namespace Filtration.ObjectModel.BlockItemTypes
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
{
|
{
|
||||||
public class SoundBlockItem : DualIntegerBlockItem
|
public class SoundBlockItem : StrIntBlockItem
|
||||||
{
|
{
|
||||||
public SoundBlockItem()
|
public SoundBlockItem()
|
||||||
{
|
{
|
||||||
Value = 1;
|
Value = "1";
|
||||||
SecondValue = 79;
|
SecondValue = 79;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SoundBlockItem(int value, int secondValue) : base(value, secondValue)
|
public SoundBlockItem(string value, int secondValue) : base(value, secondValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
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 => 16;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.PlayAlertSound;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
Filtration.ObjectModel/BlockItemTypes/StackSizeBlockItem.cs
Normal file
28
Filtration.ObjectModel/BlockItemTypes/StackSizeBlockItem.cs
Normal 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 BlockItemOrdering SortOrder => BlockItemOrdering.StackSize;
|
||||||
|
public override int Minimum => 0;
|
||||||
|
public override int Maximum => 1000;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class SynthesisedItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public SynthesisedItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public SynthesisedItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "SynthesisedItem";
|
||||||
|
public override string DisplayHeading => "Synthesised Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Salmon;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SynthesisedItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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 => 12;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetTextColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 => 7;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Width;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 2;
|
public override int Maximum => 2;
|
||||||
}
|
}
|
||||||
|
|||||||
61
Filtration.ObjectModel/Commands/CommandManager.cs
Normal file
61
Filtration.ObjectModel/Commands/CommandManager.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands
|
||||||
|
{
|
||||||
|
public interface ICommandManager
|
||||||
|
{
|
||||||
|
void ExecuteCommand(ICommand command);
|
||||||
|
void Undo(int undoLevels = 1);
|
||||||
|
void Redo(int redoLevels = 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface ICommandManagerInternal : ICommandManager
|
||||||
|
{
|
||||||
|
void SetScript(IItemFilterScriptInternal layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class CommandManager : ICommandManagerInternal
|
||||||
|
{
|
||||||
|
private readonly Stack<IUndoableCommand> _undoCommandStack = new Stack<IUndoableCommand>();
|
||||||
|
private readonly Stack<IUndoableCommand> _redoCommandStack = new Stack<IUndoableCommand>();
|
||||||
|
private IItemFilterScriptInternal _itemFilterScript;
|
||||||
|
|
||||||
|
public void SetScript(IItemFilterScriptInternal itemFilterScript)
|
||||||
|
{
|
||||||
|
_itemFilterScript = itemFilterScript;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ExecuteCommand(ICommand command)
|
||||||
|
{
|
||||||
|
command.Execute();
|
||||||
|
if (command is IUndoableCommand undoableCommand)
|
||||||
|
{
|
||||||
|
_undoCommandStack.Push(undoableCommand);
|
||||||
|
_redoCommandStack.Clear();
|
||||||
|
}
|
||||||
|
_itemFilterScript.SetIsDirty(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo(int undoLevels = 1)
|
||||||
|
{
|
||||||
|
for (var index = undoLevels; _undoCommandStack.Count > 0 && index > 0; --index)
|
||||||
|
{
|
||||||
|
var undoableCommand = _undoCommandStack.Pop();
|
||||||
|
undoableCommand.Undo();
|
||||||
|
_redoCommandStack.Push(undoableCommand);
|
||||||
|
}
|
||||||
|
_itemFilterScript.SetIsDirty(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo(int redoLevels = 1)
|
||||||
|
{
|
||||||
|
for (int index = redoLevels; _redoCommandStack.Count > 0 && index > 0; --index)
|
||||||
|
{
|
||||||
|
var undoableCommand = _redoCommandStack.Pop();
|
||||||
|
undoableCommand.Redo();
|
||||||
|
_undoCommandStack.Push(undoableCommand);
|
||||||
|
}
|
||||||
|
_itemFilterScript.SetIsDirty(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
Filtration.ObjectModel/Commands/ICommand.cs
Normal file
7
Filtration.ObjectModel/Commands/ICommand.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace Filtration.ObjectModel.Commands
|
||||||
|
{
|
||||||
|
public interface ICommand
|
||||||
|
{
|
||||||
|
void Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
8
Filtration.ObjectModel/Commands/IUndoableCommand.cs
Normal file
8
Filtration.ObjectModel/Commands/IUndoableCommand.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
namespace Filtration.ObjectModel.Commands
|
||||||
|
{
|
||||||
|
internal interface IUndoableCommand : ICommand
|
||||||
|
{
|
||||||
|
void Undo();
|
||||||
|
void Redo();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class AddBlockCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly IItemFilterScript _itemFilterScript;
|
||||||
|
private readonly IItemFilterBlockBase _addAfterItemFilterBlock;
|
||||||
|
private IItemFilterBlock _newItemFilterBlock;
|
||||||
|
|
||||||
|
public AddBlockCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase addAfterItemFilterBlock)
|
||||||
|
{
|
||||||
|
_itemFilterScript = itemFilterScript;
|
||||||
|
_addAfterItemFilterBlock = addAfterItemFilterBlock;
|
||||||
|
}
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
_newItemFilterBlock = new ItemFilterBlock(_itemFilterScript);
|
||||||
|
if (_addAfterItemFilterBlock != null)
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(_addAfterItemFilterBlock) + 1, _newItemFilterBlock);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Add(_newItemFilterBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Remove(_newItemFilterBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class AddBlockItemToBlocksCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> _input;
|
||||||
|
|
||||||
|
public AddBlockItemToBlocksCommand(List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> input)
|
||||||
|
{
|
||||||
|
_input = input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
foreach (var v in _input)
|
||||||
|
{
|
||||||
|
var blockItems = v.Item1;
|
||||||
|
var item = v.Item2;
|
||||||
|
|
||||||
|
blockItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
foreach (var v in _input)
|
||||||
|
{
|
||||||
|
var blockItems = v.Item1;
|
||||||
|
var item = v.Item2;
|
||||||
|
blockItems.Remove(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class AddCommentBlockCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly IItemFilterScript _itemFilterScript;
|
||||||
|
private readonly IItemFilterBlockBase _addAfterItemFilterBlock;
|
||||||
|
private IItemFilterCommentBlock _newItemFilterBlock;
|
||||||
|
|
||||||
|
public AddCommentBlockCommand(IItemFilterScript itemFilterScript, IItemFilterBlockBase addAfterItemFilterBlock)
|
||||||
|
{
|
||||||
|
_itemFilterScript = itemFilterScript;
|
||||||
|
_addAfterItemFilterBlock = addAfterItemFilterBlock;
|
||||||
|
}
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
_newItemFilterBlock = new ItemFilterCommentBlock(_itemFilterScript)
|
||||||
|
{
|
||||||
|
Comment = string.Empty
|
||||||
|
};
|
||||||
|
if (_addAfterItemFilterBlock != null)
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Insert(_itemFilterScript.ItemFilterBlocks.IndexOf(_addAfterItemFilterBlock) + 1, _newItemFilterBlock);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Add(_newItemFilterBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
_itemFilterScript.ItemFilterBlocks.Remove(_newItemFilterBlock);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class RemoveBlockItemFromBlocksCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> _input;
|
||||||
|
|
||||||
|
public RemoveBlockItemFromBlocksCommand(List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> input)
|
||||||
|
{
|
||||||
|
_input = input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
foreach (var pair in _input)
|
||||||
|
{
|
||||||
|
var blockItems = pair.Item1;
|
||||||
|
var blockItem = pair.Item2;
|
||||||
|
|
||||||
|
for (var i = 0; i < blockItems.Count; i++)
|
||||||
|
{
|
||||||
|
if (blockItems[i] == blockItem)
|
||||||
|
{
|
||||||
|
blockItems.RemoveAt(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
foreach (var pair in _input)
|
||||||
|
{
|
||||||
|
var blockItems = pair.Item1;
|
||||||
|
var blockItem = pair.Item2;
|
||||||
|
blockItems.Add(blockItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user