195 Commits

Author SHA1 Message Date
Ben Wallis
a20c988380 Bumped version to 1.1.0-beta4 2018-12-05 07:04:35 +00:00
Glen M
7ce5aaa861 Support for Path of Exile 3.5 and Betrayal league. (#108)
* Fix #107 by pulling SortOrder form an enum.
* Add initial support for the Prophecy block item.
* Update the static data.
* Hook Prophecy data into the static data service.
* Fill out the initial prophecy data.
2018-12-05 06:59:10 +00:00
Glen M
4b6cee9d94 Add a few missing item classes. (#106) 2018-12-04 19:30:25 +00:00
Ben Wallis
6fb0ec8084 Fixed EditableListBoxControl mouse wheel scrolling 2018-12-03 17:41:44 +00:00
Ben Wallis
a13dc44a7d Added comments 2018-12-03 16:31:19 +00:00
Ben Wallis
05b729edf8 Fixed ScrollViewer in ItemFilterBlockView handling mouse wheel events (#105) 2018-12-03 16:28:22 +00:00
Ben Wallis
876e98437e Shortened/fixed SummaryText for several block items 2018-12-02 21:51:19 +00:00
Ben Wallis
30e76e333c * Bumped version to 1.1.0-beta3
* Fixed Switch to Appearance/Regular Block Items text overlapping block item controls
* Added Enable/Disable toggle button to Appearance block items control
* Added horizontal scrollbar to block items view
* Moved Enable/Disable toggle button to separate user control(previously it was only visible when viewing Regular block items)
* Added DesignTimeItemFilterBlockViewModel
2018-12-02 21:36:01 +00:00
Glen M
f840fb69ad Throttle selections to improve Select All performance. (#104)
Throttle selections to improve Select All performance in ItemFilterScriptViewModel.
2018-12-02 16:30:50 +00:00
Ben Wallis
ae98c2d5de Bumped version to 1.1.0-beta2 2018-11-28 22:29:52 +00:00
Ben Wallis
ba6d50cf45 * Added auto-expand sections on open setting
* Changed all sections to be expanded unless the new setting is disabled
* Tidied up some casting in ItemFilterScriptViewModel by using pattern matching
2018-11-28 22:28:21 +00:00
Ben Wallis
6838cb12a8 Fixed a crash when loading filters with custom sounds 2018-11-28 22:03:27 +00:00
Ben Wallis
fd2023598b #83 - Fixed theme serialization 2018-11-28 21:50:42 +00:00
Ben Wallis
e3b1a5dba7 Updated nuspec release notes 2018-11-27 21:56:20 +00:00
Ben Wallis
25c25c2a1d * Removed incorrect use of async method in MainWindowViewModel constructor
* Moved script/theme loading code to new ScriptLoadingService class
2018-11-27 21:48:36 +00:00
Ben Wallis
e5386132c3 Updated Squirrel from 1.8.0 to 1.9.0 2018-11-27 21:34:58 +00:00
Ben Wallis
784f0227ee Updated NuGet packages 2018-11-27 21:26:04 +00:00
Ben Wallis
fb37faa7bc * Moved item filter script directory handling code to new ItemFilterScriptDirectorySerivce class
* Fixed issue #94 where the user was prompted to select their Path of Exile data directory after every upgrade.
* The default Path of Exile data directory is now automatically chosen on first run if it exists
* Moved CommonOpenFileDialog usage to new DialogService class
* Changed Custom Sounds code in ItemFilterScriptViewModel to use ItemFilterScriptDirectory instead of DefaultPathOfExileDirectory
* Moved Custom Sounds code from constructor to Initialise method to prevent the files being enumerated before the directory is set during startup
2018-11-27 20:40:00 +00:00
azakhi
63236769aa Add clear styles button (#99) 2018-11-26 21:26:04 +00:00
azakhi
05a994f562 Remember all open scripts (#100) 2018-11-26 21:25:10 +00:00
azakhi
124786dd0d Fix block group changes not affecting script (#101) 2018-11-26 21:24:27 +00:00
Ben Wallis
e516ded476 Bumped version to 1.1.0-beta1 2018-09-30 14:06:33 +01:00
Ben Wallis
f238bbf856 Fixed a crash on exit caused by a null SelectedBlockViewModel 2018-09-30 14:02:47 +01:00
Ben Wallis
a0191576f0 Update README.md 2018-09-30 13:57:35 +01:00
Ben Wallis
1d96b69800 Update README.md 2018-09-30 12:51:47 +01:00
Ben Wallis
99abb276af Merge branch 'bugfix/FixBlockOutputPreview' 2018-09-30 12:49:35 +01:00
Ben Wallis
073fe553ea Made block output preview pane text selectable 2018-09-30 12:48:24 +01:00
Ben Wallis
0d81d0ef54 Fixed block output preview 2018-09-30 12:38:26 +01:00
Ben Wallis
f04f9c20ed Update README.md 2018-09-30 11:57:40 +01:00
Ben Wallis
f71ba74425 Update README.md 2018-09-30 11:57:24 +01:00
Ben Wallis
04cbf218f3 Bumped version to 1.0.0 2018-09-30 11:43:22 +01:00
Ben Wallis
6007306346 Added 1.0.0 release notes 2018-09-28 20:44:25 +01:00
Ben Wallis
992bd21570 Fixed UpdateService which was erroneously using the local update manager instead of the GitHub update manager for several parts of the update process 2018-09-28 20:24:09 +01:00
Ben Wallis
7d8b32b2e7 Fixup after merging missed commit from master 2018-09-28 17:58:16 +01:00
Ben Wallis
ac904c31ff * Added default colours for TextColor, BorderColor and BackgroundColor block items (previously the default color was completely transparent)
* Bumped version to 1.0.0-beta3
2018-09-28 17:47:23 +01:00
Ben Wallis
f51fe315ad Updated Filtration.nuspec for 1.0.0-beta2 2018-09-28 17:27:07 +01:00
Ben Wallis
3ce2e12f56 Disabled setting themes for MinimapIcon, PlayEffect and SetFontSize blocks (temporary fix for issue #68) 2018-09-28 17:20:42 +01:00
Ben Wallis
43e5b30080 Merge pull request #88 from GlenCFL/validate-lists
Audit and Validate the Data Files
2018-09-27 12:38:58 +01:00
GlenCFL
bc99339390 Audit the static data files. 2018-09-27 07:21:32 -04:00
Ben Wallis
781faae85d Merge pull request #87 from GlenCFL/mod-completions
Provide autocompletions for item mods.
2018-09-27 07:08:47 +01:00
GlenCFL
c926808878 Remove the now irrelevant static data test. 2018-09-26 23:40:34 -04:00
GlenCFL
24d9f97717 Provide autocompletions for item mods. 2018-09-26 23:35:39 -04:00
Ben Wallis
7e4e6fe42e Refactored StaticDataService to use local resources for ItemBaseTypes.txt and ItemClasses.txt instead of the old files in APPDATA that aren't used anymore.
Bumped develop version to 1.0.0-beta2
2018-09-26 19:12:31 +01:00
Ben Wallis
c6d75cfff6 Implemented auto-update using Squirrel
Reworked SettingsPageView to not need a Save Button and added a folder browser control
2018-09-26 18:40:54 +01:00
Ben Wallis
2f30eade7c Merge pull request #84 from azakhi/bugfix/fix-child-firing-block-selection-event
Fix block items firing blocklist selectionchanged
2018-09-21 17:43:07 +01:00
azakhi
e719f0bce0 Fix block items firing blocklist selectionchanged 2018-09-21 19:28:37 +03:00
Ben Wallis
dffbbf3591 Merge pull request #82 from azakhi/bugfix/81-increase-maximum-explicit-mod-rule
Increase HasExplicitMod limit to 8
2018-09-17 12:13:26 +01:00
azakhi
07a7e8d05c Increase HasExplicitMod limit to 8 2018-09-17 10:37:25 +03:00
Ben Wallis
1ba224906c Merge pull request #80 from azakhi/feature/improve-section-wide-actions
Improve commands & add multiple selection feature
2018-09-16 19:19:24 +01:00
azakhi
32523787d2 Improve commands & add multiple selection feature 2018-09-13 17:34:16 +03:00
Ben Wallis
ac6943d73b Replaced AlertSound .wav files with .mp3 files (reduces installer size by 50%~) 2018-09-08 22:34:41 +01:00
Ben Wallis
36c0aaea17 Bumped version to 0.21 2018-09-08 10:26:45 +01:00
Ben Wallis
4b38a6a4e0 Bumped version to 0.20 2018-09-08 10:14:56 +01:00
Ben Wallis
9c44dd7e7d Merge pull request #79 from azakhi/feature/12-13-preserve-user-ui-choices
Preserve UI states and last active document
2018-09-08 10:13:36 +01:00
Ben Wallis
18c878e350 Merge pull request #75 from azakhi/feature/40-add-enable-disable-to-group-browser
Feature/40 add enable disable to group browser
2018-09-08 10:12:04 +01:00
Ben Wallis
5d30888597 Merge pull request #72 from azakhi/feature/improve-pasting-multiple-blocks
Improve pasting to support different copy sources
2018-09-08 09:56:14 +01:00
azakhi
bfd722d362 Add add/delete block group support to blocks 2018-09-07 20:36:27 +03:00
azakhi
d23741555a Fix tests 2018-09-07 20:36:27 +03:00
azakhi
820aa5499e Fix block group creation 2018-09-07 20:36:27 +03:00
azakhi
1ee38b4c0e Fix block group output & expand/collapse all 2018-09-07 20:36:27 +03:00
azakhi
4bed777427 Improve parent group status logic 2018-09-07 20:36:27 +03:00
azakhi
1f6cbeec86 Add enable/disable checkbox to group browser 2018-09-07 20:36:27 +03:00
azakhi
550a2d8f25 Preserve UI states and last active document 2018-09-07 19:57:32 +03:00
Ben Wallis
ae38197052 Merge pull request #77 from GlenCFL/save-state
Set the state to dirty on using editing commands.
2018-09-07 15:05:43 +01:00
GlenCFL
4fd4ffc520 Set the state to dirty on using editing commands. 2018-09-07 04:59:57 -04:00
Ben Wallis
e15efe4e15 Merge pull request #76 from GlenCFL/transparency_rework
Make the minimap icons transparent. Take 2.
2018-09-07 08:13:27 +01:00
GlenCFL
196db4c730 Use Enum.IsDefined as suggested. 2018-09-07 03:01:45 -04:00
GlenCFL
910b2b8c7f Make the minimap icons transparent. 2018-09-06 20:01:16 -04:00
Ben Wallis
b31ce1d843 Merge pull request #74 from azakhi/feature/19-add-buttons-to-group-browser
Add clear all button & missing functions
2018-09-05 16:01:46 +01:00
azakhi
99a011c78c Add clear all button & missing functions 2018-09-05 17:55:16 +03:00
azakhi
69ce542c1a Improve pasting to support different copy sources 2018-09-04 14:18:11 +03:00
Ben Wallis
2ff9ebf242 Merge pull request #71 from azakhi/bugfix/70-fix-max-quality
Increase maximum quality to 30
2018-09-04 06:45:18 +01:00
azakhi
0eff63d706 Increase maximum quality to 30 2018-09-04 08:34:26 +03:00
Ben Wallis
1b8f37ca3a Merge pull request #65 from azakhi/bugfix/64-fix-group-browser-filter
Fix block group browser not filtering
2018-09-03 18:55:19 +01:00
Ben Wallis
b4f02f872e Merge pull request #67 from azakhi/bugfix/10-fix-default-opacity
Change default alpha value to 240
2018-09-03 18:53:09 +01:00
azakhi
cfef82e53a Change default alpha value to 240 2018-09-03 15:37:10 +03:00
azakhi
bdd121f48c Fix block group browser not filtering 2018-09-03 11:26:13 +03:00
Ben Wallis
0209de3817 Update README.md 2018-09-01 10:15:38 +01:00
Ben Wallis
1e26a2ae3e Merge pull request #62 from GlenCFL/fix-reopen
Fix the reading of CustomAlertSounds containing path separators.
2018-09-01 09:57:54 +01:00
GlenCFL
54b72e44b0 Reposition the new custom sound tests. 2018-08-31 21:06:51 -04:00
GlenCFL
24df1d7687 Fix the reading of CustomAlertSounds containing path separators. 2018-08-31 20:01:21 -04:00
Ben Wallis
7162e16b49 Merge pull request #59 from azakhi/improvements
Improvements
2018-08-31 15:28:18 +01:00
azakhi
324ce4d0b3 Fix binding problem 2018-08-31 17:05:21 +03:00
azakhi
de489e8b2c Fix folder bug 2018-08-31 16:54:24 +03:00
azakhi
341b1d1eb2 Make section header parsing more generic 2018-08-31 16:13:57 +03:00
azakhi
6be29dbd28 Add tests and fix theme bug 2018-08-31 16:02:17 +03:00
azakhi
3851ad51e1 Add support for comments between rules 2018-08-31 14:22:26 +03:00
azakhi
65d3e07156 Add comment support for all rule types 2018-08-31 11:21:43 +03:00
azakhi
a86ab3ec8d Use available sounds as combobox source 2018-08-31 09:40:48 +03:00
azakhi
41722e8a57 Update icons 2018-08-31 09:00:31 +03:00
Ben Wallis
3cb0a041d7 Update README.md 2018-08-30 19:31:45 +01:00
Ben Wallis
c8778bb1eb bumped version to 0.19 2018-08-30 19:28:32 +01:00
Ben Wallis
8e849d6a8f Merge pull request #57 from azakhi/master
Fix play effect parsing bug
2018-08-30 19:26:37 +01:00
azakhi
0d3f01a856 Update item classes 2018-08-30 21:23:34 +03:00
azakhi
178ff579c6 Fix PlayEffect parsing 2018-08-30 21:22:20 +03:00
Ben Wallis
30aa52e788 updated Delve Socketable Currency in ItemClasses 2018-08-30 19:20:44 +01:00
Ben Wallis
c1aee2f8f7 Merge branch 'master' of https://github.com/ben-wallis/Filtration 2018-08-30 18:31:53 +01:00
Ben Wallis
937426e9a3 added tests 2018-08-30 18:31:34 +01:00
Ben Wallis
7e0932830d Update README.md 2018-08-30 18:14:24 +01:00
Ben Wallis
15c63fa222 Merge pull request #55 from azakhi/master
Copy paste sound bug fix
2018-08-30 18:00:09 +01:00
Ben Wallis
cc986eea21 updated version to 0.18 and 2016 dates to 2018 2018-08-30 17:59:20 +01:00
azakhi
c260014a16 Add requested changes 2018-08-30 19:56:47 +03:00
azakhi
8f0f73f185 Copy paste sound bug fix 2018-08-30 19:33:46 +03:00
Ben Wallis
15143f738f Fixed crash when scrolling with open blocks 2018-08-29 22:45:47 +01:00
Ben Wallis
dc6ed934b2 Merge pull request #54 from azakhi/master
3.4 Update and Improvements
2018-08-29 22:39:36 +01:00
azakhi
78b4ddc862 Add new filter fuatures 2018-08-29 20:12:02 +03:00
azakhi
a09f0a5090 Add custom sound theme support 2018-08-29 13:11:41 +03:00
azakhi
2958d93b33 Add Custom Sound block 2018-08-27 22:43:01 +03:00
azakhi
1e9b1158bd Merge branch 'improvements' 2018-08-26 20:27:23 +03:00
azakhi
d92d34af05 Add alert sound theme support 2018-08-26 20:24:13 +03:00
azakhi
bc5a005ee7 Add font size theme support & improve theme system 2018-08-25 15:52:16 +03:00
azakhi
8ba3433dcf Refactor theme code to support different types 2018-08-24 22:07:24 +03:00
azakhi
d0bc0b6864 Add section search feature 2018-08-24 18:03:38 +03:00
azakhi
1eaf0b6fe5 Improve UI performance 2018-08-24 01:09:44 +03:00
azakhi
4c76dc9bab Improve test block for beam feature 2018-08-22 20:20:12 +03:00
azakhi
2a7df9a1ca Add a temporary block type for new beam feature 2018-08-22 13:15:50 +03:00
azakhi
add7514ce7 Fix temporary block type control 2018-08-22 11:47:32 +03:00
azakhi
0974579684 Add requested changes & minor bug fixes 2018-08-22 11:41:02 +03:00
azakhi
c0e9c534de Add temporary block type for new type 2018-08-21 17:03:42 +03:00
azakhi
780081263c Replace 'Maelström' to prevent encoding problems 2018-08-20 21:34:16 +03:00
azakhi
387f08db85 Improve parsing 2018-08-20 21:25:30 +03:00
azakhi
7fb9378304 Improve parsing & bug fixes 2018-08-20 21:25:30 +03:00
azakhi
e5209fb459 Improve UI 2018-08-20 21:25:30 +03:00
azakhi
961805272d Make comment blocks expandable & improve parsing 2018-08-20 21:25:30 +03:00
azakhi
281c7d85e1 Fix adding comment block to collapsed section 2018-08-20 21:25:30 +03:00
azakhi
57775a9e22 Start sections collapsed & restyle buttons 2018-08-20 21:25:30 +03:00
azakhi
5817295f7c Fix adding block to a collapsed section 2018-08-20 21:25:30 +03:00
azakhi
216168533f Fix pasting sections 2018-08-20 21:25:29 +03:00
azakhi
f6969a0204 Fix performance issue 2018-08-20 21:25:29 +03:00
azakhi
38053666a0 Fix collapsed section height 2018-08-20 21:25:29 +03:00
azakhi
bd730dd518 Add section features 2018-08-20 21:25:29 +03:00
azakhi
2c4096ff2c Add DisableDropSound block type 2018-08-20 21:19:18 +03:00
azakhi
738415f10a Add ElderMap block type 2018-08-12 11:15:45 +03:00
azakhi
f03e37602d Fix script desc bug in a better way 2018-08-11 12:28:13 +03:00
azakhi
2230b81257 Fix test 2018-08-10 17:27:43 +03:00
azakhi
3aa2bf488c Fix tests 2018-08-10 17:22:55 +03:00
azakhi
71b7a45f84 Add tests and small bugfixes 2018-08-10 17:08:17 +03:00
azakhi
0fd2db7076 Add new base types and classes 2018-08-09 17:12:03 +03:00
azakhi
400688573c Add new block types added in 3.3 2018-08-09 16:48:11 +03:00
Ben Wallis
52fc1f6bbc Merge branch 'master' of https://github.com/ben-wallis/Filtration 2017-12-09 16:16:29 +00:00
Ben Wallis
3f437c0109 FIL-18: Fixed first comment block being merged into the script description 2017-12-09 16:16:20 +00:00
Ben Wallis
f838b35b4c Added Murderous Eye Jewel to ItemBaseTypes.txt 2017-12-09 15:12:39 +00:00
Ben Wallis
ac706486cb Update README.md 2017-12-08 18:09:04 +00:00
Ben Wallis
3607ad362e Update README.md 2017-12-08 18:08:48 +00:00
Ben Wallis
1ecec4e9dc Bumped version to 0.17 2017-12-08 17:58:53 +00:00
Ben Wallis
404a04c210 Merge pull request #51 from GlenCFL/fixes
0.16 Regression Fixing
2017-12-08 17:57:13 +00:00
GlenCFL
f1b2be7d74 Add in Ben's fix for Comments not setting dirty state. 2017-12-08 12:54:53 -05:00
GlenCFL
6393a53bf5 Remove code duplication. 2017-12-08 12:12:17 -05:00
GlenCFL
a0a72b5fe8 Mark comments as two way, fixing updating issues. 2017-12-08 10:44:22 -05:00
GlenCFL
d96234f099 Fix the contextual Delete Section command. 2017-12-08 09:15:01 -05:00
GlenCFL
07fdc2eb49 Fix the Add Section crash. 2017-12-08 07:41:16 -05:00
GlenCFL
86ff670fb0 Fix for the ShChaos sound not playing. 2017-12-08 01:42:00 -05:00
Ben Wallis
c9caed7e6b Fixed failing test 2017-12-07 22:35:06 +00:00
Ben Wallis
9cf4d86cb0 Fixed multiline comment saving 2017-12-07 22:22:26 +00:00
Ben Wallis
523a9553d9 Fixed section browser 2017-12-07 21:36:42 +00:00
Ben Wallis
b88730fb3a Merge pull request #49 from GlenCFL/master
Provide an update to fully support Path of Exile 3.1.
2017-12-07 20:19:14 +00:00
GlenCFL
06b88e85f2 Fix failing tests. 2017-12-07 14:27:03 -05:00
GlenCFL
b98988f0b5 Merge remote-tracking branch 'upstream/master' 2017-12-07 14:16:47 -05:00
Ben Wallis
d14e4e9320 Merge pull request #50 from ben-wallis/develop
Various changes from local repo
2017-12-07 18:24:46 +00:00
Ben Wallis
d91f7e1ac3 Fixed compile warnings 2017-12-07 18:18:05 +00:00
Ben Wallis
d84b17ced3 Implemented script-level undo/redo (currently hidden in UI) 2017-12-07 18:14:47 +00:00
GlenCFL
fef20ff36a Fix the halting issue on window close. 2017-12-07 12:53:44 -05:00
GlenCFL
23fa82655b Add tests for the new keywords. 2017-12-07 12:14:42 -05:00
GlenCFL
e5bd994164 Fix the existing tests. 2017-12-07 11:57:36 -05:00
GlenCFL
342487f800 Update the ordering of the BlockItems. 2017-12-07 09:26:33 -05:00
GlenCFL
8bf3527b69 Add support for PlayAlertSoundPositional. 2017-12-07 08:21:32 -05:00
GlenCFL
010e0dda31 Add support for the new alert sounds. 2017-12-07 06:49:25 -05:00
GlenCFL
2cf6a5953b Update both the item class and item base lists. 2017-12-06 23:24:30 -05:00
GlenCFL
1ebbe5b5a8 Add support for the new block types. 2017-12-06 23:03:46 -05:00
Ben Wallis
fee2a4dd99 Initial refactoring to support CommandManager 2017-06-17 13:50:44 +01:00
Ben Wallis
b65fad0679 FIL-4 Completed refactoring of Sections to ItemFilterCommentBlocks 2017-06-17 12:19:54 +01:00
Ben Wallis
43c6149832 Fixed failing tests 2017-05-20 18:34:45 +01:00
Ben Wallis
4def27c49d FIL-4 Refactored script parsing to retain isolated comments as a new ItemFilterBlockComment type - UI still needs reworking with new templates and such. 2017-05-20 18:14:28 +01:00
Ben Wallis
7b8ff1e3cb Update README.md 2017-05-14 14:15:11 +01:00
Ben Wallis
797c911bb5 FIL-13 Comments on the Show/Hide line are now preserved if block groups are not enabled for the script 2017-05-14 14:10:54 +01:00
Ben Wallis
8e54cc3b4b Fixed failing tests 2017-05-14 13:06:07 +01:00
Ben Wallis
ab7aefa8a6 FIL-11 Added BlockGroupsEnabled flag to ItemFilterScript (encapsulated in new ItemFilterScriptSettings object) 2017-05-14 13:02:30 +01:00
Ben Wallis
bb77138854 FIL-1 Changed Block Group Parsing to use " - " as delimiter instead of "-" 2017-05-14 12:12:42 +01:00
Ben Wallis
2d98f7de36 Updated appveyor.yml 2017-05-09 22:03:24 +01:00
Ben Wallis
6277917ae6 Updated Filtration.sln Visual Studio version from 14 to 15 2017-05-09 21:58:34 +01:00
Ben Wallis
3fe021949a Replaced AutoMapper usage for ItemFilterBlockGroup viewmodel mapping with constructor overload
Updated NuGet packages
2017-05-09 21:41:51 +01:00
Ben Wallis
733c7d1757 Added [Ignore] to integration unit tests 2017-05-08 20:12:24 +01:00
Ben Wallis
702c118783 Added appveyor.yml 2017-05-08 20:09:29 +01:00
Ben Wallis
11d85fdd1b Update README.md 2016-12-03 12:22:15 +00:00
Ben Wallis
8dc5864d2e Bumped version to 0.15 2016-12-03 12:14:23 +00:00
Ben Wallis
884651bce9 Added support for Identified (Issue #34) and Corrupted (Issue #42) block items
Changed block item output order (Issue #41)
2016-12-03 11:58:18 +00:00
Ben Wallis
e7a40c8c6d Updated FluentAssertions nuget package 2016-09-01 21:27:39 +01:00
Ben Wallis
dde9f65ea6 Bumped version number to 0.14, added icon to Update Available window 2016-09-01 21:19:22 +01:00
Ben Wallis
ae6e8c5211 Fixed #31 - Added context menu to sections 2016-09-01 21:11:15 +01:00
Ben Wallis
67685d9eac Fixed #30 - Updating a section title does not update the Section Browser 2016-09-01 21:02:38 +01:00
Ben Wallis
af08cdfed6 Fixed #32 - PlayAlertSound ignored on Paste Block Style 2016-09-01 20:56:58 +01:00
Ben Wallis
0b791f5747 Fixed #33 - Update check window buttons erroneously shut down application 2016-09-01 20:26:55 +01:00
Ben Wallis
43bc1410ae Merge branch 'master' of https://github.com/ben-wallis/Filtration.git 2016-08-31 00:10:40 +01:00
Ben Wallis
b3520246b9 Fixed bug causing removing a block item to not refresh the item preview 2016-08-31 00:10:36 +01:00
Ben Wallis
6d1c51361b Bumped to 0.13 2016-08-30 22:57:49 +01:00
315 changed files with 15982 additions and 4974 deletions

185
.gitignore vendored
View File

@@ -1,29 +1,43 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
/.vs/
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
build/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Roslyn cache directories
*.ide/
# Visual Studio 2015/2017 cache/options directory
.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
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
# NUNIT
*.VisualState.xml
TestResult.xml
@@ -32,6 +46,19 @@ TestResult.xml
[Rr]eleasePS/
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
*_p.c
*_i.h
@@ -64,14 +91,21 @@ _Chutzpah*
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
@@ -84,7 +118,7 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
@@ -93,9 +127,18 @@ _TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
@@ -123,42 +166,63 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
#*.pubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages Directory
packages/*
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# 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/
*.build.csdef
# Windows Store app package directory
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
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
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.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
Generated_Code/
@@ -174,6 +238,7 @@ UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
@@ -183,7 +248,69 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
# LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
# GhostDoc plugin setting file
*.GhostDoc.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/

View File

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

View File

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

View File

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

View File

@@ -4,7 +4,7 @@ using System.Windows.Data;
namespace Filtration.Common.Converters
{
internal class BoolInverterConverter : IValueConverter
public class BooleanInverterConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
CultureInfo culture)

View File

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

View File

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

View File

@@ -31,35 +31,33 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<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 Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="Castle.Windsor">
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
<Reference Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.4.1.1\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 Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.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 Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.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 Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Practices.ServiceLocation">
<HintPath>..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
@@ -75,6 +73,8 @@
<Compile Include="Converters\ColorToSolidColorBrushConverter.cs" />
<Compile Include="Converters\InverseBooleanVisibilityConverter.cs" />
<Compile Include="Converters\StringToVisibilityConverter.cs" />
<Compile Include="Extensions\EnumerationExtension.cs" />
<Compile Include="Extensions\HyperlinkExtensions.cs" />
<Compile Include="Messages\ThemeClosedMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\FileSystemService.cs" />
@@ -84,6 +84,7 @@
<Compile Include="WindsorInstallers\ServicesInstaller.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>

View File

@@ -38,7 +38,7 @@
<Setter Property="Margin" Value="0,0,5,5" />
</Style>
<converters:StringToVisibilityConverter x:Key="StringToVisibilityConverter" />
<converters:BoolInverterConverter x:Key="BoolInverterConverter" />
<converters:BooleanInverterConverter x:Key="BoolInverterConverter" />
<converters:ColorToSolidColorBrushConverter x:Key="ColorToSolidColorBrushConverter" />
<converters:BooleanVisibilityConverter x:Key="BooleanVisibilityConverter" />
<converters:InverseBooleanVisibilityConverter x:Key="InverseBooleanVisibilityConverter" />

View File

@@ -2,6 +2,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
@@ -21,6 +22,7 @@ namespace Filtration.Common.Utilities
/// the stream into text.
/// </summary>
/// <param name="streamSource">Data source</param>
[DebuggerStepThrough]
public LineReader(Func<Stream> streamSource)
: this(streamSource, Encoding.UTF8)
{
@@ -33,6 +35,7 @@ namespace Filtration.Common.Utilities
/// <param name="streamSource">Data source</param>
/// <param name="encoding">Encoding to use to decode the stream
/// into text</param>
[DebuggerStepThrough]
public LineReader(Func<Stream> streamSource, Encoding encoding)
: this(() => new StreamReader(streamSource(), encoding))
{
@@ -44,6 +47,7 @@ namespace Filtration.Common.Utilities
/// UTF8 is used to decode the file into text.
/// </summary>
/// <param name="filename">File to read from</param>
[DebuggerStepThrough]
public LineReader(string filename)
: this(filename, Encoding.UTF8)
{
@@ -56,6 +60,7 @@ namespace Filtration.Common.Utilities
/// <param name="filename">File to read from</param>
/// <param name="encoding">Encoding to use to decode the file
/// into text</param>
[DebuggerStepThrough]
public LineReader(string filename, Encoding encoding)
: this(() => new StreamReader(filename, encoding))
{
@@ -66,6 +71,7 @@ namespace Filtration.Common.Utilities
/// is only called when the enumerator is fetched
/// </summary>
/// <param name="dataSource">Data source</param>
[DebuggerStepThrough]
public LineReader(Func<TextReader> dataSource)
{
_dataSource = dataSource;
@@ -74,6 +80,7 @@ namespace Filtration.Common.Utilities
/// <summary>
/// Enumerates the data source line by line.
/// </summary>
[DebuggerStepThrough]
public IEnumerator<string> GetEnumerator()
{
using (TextReader reader = _dataSource())
@@ -89,6 +96,7 @@ namespace Filtration.Common.Utilities
/// <summary>
/// Enumerates the data source line by line.
/// </summary>
[DebuggerStepThrough]
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();

View File

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

View File

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

View File

@@ -31,9 +31,24 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
@@ -46,6 +61,10 @@
<Compile Include="IEditableDocument.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -39,30 +40,24 @@
</PropertyGroup>
<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>
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</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>
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</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 Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<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 Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.109.2\lib\net46\System.Data.SQLite.dll</HintPath>
</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 Include="System.Data.SQLite.EF6, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.109.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</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 Include="System.Data.SQLite.Linq, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.109.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
</ItemGroup>
<Choose>
@@ -115,13 +110,14 @@
</Choose>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.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'))" />
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
<Import Project="..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -6,6 +6,7 @@ using NUnit.Framework;
namespace Filtration.ItemFilterPreview.Data.Tests.Repositories
{
[Ignore("integration test")]
[TestFixture]
public class TestItemSetRepository
{

View File

@@ -1,9 +1,9 @@
<?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" />
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net461" />
<package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net461" />
</packages>

View File

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

View File

@@ -34,23 +34,22 @@
</PropertyGroup>
<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>
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<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 Include="System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Core.1.0.109.2\lib\net46\System.Data.SQLite.dll</HintPath>
</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 Include="System.Data.SQLite.EF6, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.109.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</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 Include="System.Data.SQLite.Linq, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.109.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
@@ -78,12 +77,12 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.102.0\build\net46\System.Data.SQLite.Core.targets')" />
<Import Project="..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<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'))" />
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.109.2\build\net46\System.Data.SQLite.Core.targets'))" />
</Target>
<!-- 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.

View File

@@ -1,8 +1,8 @@
<?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" />
<package id="EntityFramework" version="6.2.0" targetFramework="net461" />
<package id="System.Data.SQLite" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.109.2" targetFramework="net461" />
<package id="System.Data.SQLite.EF6" version="1.0.109.0" targetFramework="net461" />
<package id="System.Data.SQLite.Linq" version="1.0.109.0" targetFramework="net461" />
</packages>

View File

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

View File

@@ -6,6 +6,7 @@ using Filtration.ItemFilterPreview.Tests.Properties;
using Filtration.ObjectModel;
using Filtration.ObjectModel.BlockItemTypes;
using Filtration.ObjectModel.Enums;
using Filtration.ObjectModel.Factories;
using Filtration.Parser.Services;
using Moq;
using NUnit.Framework;
@@ -29,7 +30,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
//Arrange
var testInputItem = Mock.Of<IItem>();
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
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
@@ -50,7 +51,7 @@ namespace Filtration.ItemFilterPreview.Tests.Services
//Arrange
var testInputItem = Mock.Of<IItem>();
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
.Setup(b => b.ItemBlockMatch(testInputBlock, testInputItem))
@@ -66,12 +67,18 @@ namespace Filtration.ItemFilterPreview.Tests.Services
}
[Test]
[Ignore("Outdated item filter")]
public void ProcessItemsAgainstItemFilterScript_IntegrationTest()
{
//Arrange
var testInputScriptFile = Resources.MuldiniFilterScript;
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 testInputItem = new Item
@@ -96,12 +103,17 @@ namespace Filtration.ItemFilterPreview.Tests.Services
}
[Test]
[Ignore("Outdated item filter")]
public void ProcessItemsAgainstItemFilterScript_IntegrationTest_10Items()
{
//Arrange
var testInputScriptFile = Resources.MuldiniFilterScript;
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 testInputItems = new List<IItem>

View File

@@ -6,12 +6,12 @@ using System.Xml.Serialization;
using Filtration.ObjectModel;
using Filtration.ObjectModel.Enums;
using NUnit.Framework;
using YamlDotNet.Serialization;
namespace Filtration.ItemFilterPreview.Tests.Services
{
class serializationtest
{
[Ignore("")]
[Test]
public void test_serialization()
{
@@ -39,7 +39,6 @@ namespace Filtration.ItemFilterPreview.Tests.Services
output = textWriter.ToString();
}
var x = 2;
//Assert
}
}

View File

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

View File

@@ -1,8 +1,10 @@
<?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" />
<package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="FluentAssertions" version="5.5.3" targetFramework="net461" />
<package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="NUnit" version="3.11.0" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages>

View File

@@ -1,6 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</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>

View File

@@ -36,39 +36,43 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<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 Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
</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 Include="Castle.Windsor, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.4.1.1\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 Include="CommonServiceLocator, Version=2.0.4.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0, processorArchitecture=MSIL">
<HintPath>..\packages\CommonServiceLocator.2.0.4\lib\net46\CommonServiceLocator.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.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 Include="GalaSoft.MvvmLight, Version=5.4.1.0, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight.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 Include="GalaSoft.MvvmLight.Extras, Version=5.4.1.0, Culture=neutral, PublicKeyToken=669f0b5e8f868abf, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Extras.dll</HintPath>
</Reference>
<Reference Include="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 Include="GalaSoft.MvvmLight.Platform, Version=5.4.1.0, Culture=neutral, PublicKeyToken=5f873c45e98af8a1, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="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 Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.1\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MvvmLightLibs.5.3.0.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>
<HintPath>..\packages\MvvmLightLibs.5.4.1.1\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />

View File

@@ -31,7 +31,7 @@ namespace Filtration.ItemFilterPreview.Services
sw.Restart();
var matchedBlock = itemFilterScript.ItemFilterBlocks
.Where(b => !(b is ItemFilterSection))
.OfType<IItemFilterBlock>()
.FirstOrDefault(block => _blockItemMatcher.ItemBlockMatch(block, item));
filteredItems.Add(new FilteredItem(item, matchedBlock));

View File

@@ -1,8 +1,11 @@
<?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" />
<package id="Castle.Core" version="4.3.1" targetFramework="net461" />
<package id="Castle.Windsor" version="4.1.1" targetFramework="net461" />
<package id="CommonServiceLocator" version="2.0.4" targetFramework="net461" />
<package id="Moq" version="4.10.0" targetFramework="net461" />
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net461" />
<package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
</packages>

View File

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

View File

@@ -6,23 +6,6 @@ namespace Filtration.ObjectModel.Tests
[TestFixture]
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]
public void ItemFilterBlock_AddBlockItemAllowed_LessThanMaximum_ReturnsTrue()
{

View File

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

View File

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

View File

@@ -7,7 +7,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public sealed class ActionBlockItem : BlockItemBase
{
private BlockAction _action;
private bool _isDirty;
public ActionBlockItem(BlockAction action)
{
@@ -16,7 +15,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public BlockAction Action
{
get { return _action; }
get => _action;
set
{
_action = value;
@@ -24,7 +23,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
OnPropertyChanged();
OnPropertyChanged(nameof(SummaryText));
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 int SortOrder => 0;
public override bool IsDirty
{
get { return _isDirty; }
protected set
{
_isDirty = value;
OnPropertyChanged();
}
}
public override BlockItemOrdering SortOrder => BlockItemOrdering.Action;
public void ToggleAction()
{

View File

@@ -2,11 +2,14 @@
using System.Runtime.CompilerServices;
using System.Windows.Media;
using Filtration.ObjectModel.Annotations;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class BlockItemBase : IItemFilterBlockItem
{
private bool _isDirty;
public abstract string PrefixText { get; }
public abstract string OutputText { get; }
public abstract int MaximumAllowed { get; }
@@ -14,8 +17,18 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public abstract string SummaryText { get; }
public abstract Color SummaryBackgroundColor { get; }
public abstract Color SummaryTextColor { get; }
public abstract int SortOrder { get; }
public abstract bool IsDirty { get; protected set; }
public abstract BlockItemOrdering SortOrder { get; }
public string Comment { get; set; }
public bool IsDirty
{
get { return _isDirty; }
protected set
{
_isDirty = value;
OnPropertyChanged();
}
}
public event PropertyChangedEventHandler PropertyChanged;

View File

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

View File

@@ -4,7 +4,7 @@ using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class ColorBlockItem : BlockItemBase, IAudioVisualBlockItem
public abstract class ColorBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private Color _color;
private ThemeComponent _themeComponent;
@@ -19,13 +19,11 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
}
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);
public override string SummaryText => string.Empty;
public override bool IsDirty { get; protected set; }
public ThemeComponent ThemeComponent
{
get { return _themeComponent; }
@@ -65,7 +63,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Color = ((ThemeComponent) sender).Color;
Color = ((ColorThemeComponent) sender).Color;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)

View File

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

View File

@@ -23,8 +23,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public override Color SummaryBackgroundColor => Colors.Transparent;
public override Color SummaryTextColor => Colors.Transparent;
public override bool IsDirty { get; protected set; }
public int Value
{
get { return _value; }

View File

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

View File

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

View File

@@ -1,10 +1,13 @@
using System.Windows.Media;
using System;
using System.Windows.Media;
using Filtration.ObjectModel.ThemeEditor;
namespace Filtration.ObjectModel.BlockItemBaseTypes
{
public abstract class IntegerBlockItem : BlockItemBase, IAudioVisualBlockItem
public abstract class IntegerBlockItem : BlockItemBase, IAudioVisualBlockItem, IBlockItemWithTheme
{
private int _value;
private ThemeComponent _themeComponent;
protected IntegerBlockItem()
{
@@ -15,7 +18,7 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
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 Color SummaryBackgroundColor => Colors.Transparent;
@@ -24,7 +27,28 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public abstract int Minimum { 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
{
@@ -36,5 +60,15 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
OnPropertyChanged();
}
}
private void OnThemeComponentUpdated(object sender, EventArgs e)
{
Value = ((IntegerBlockItem)sender).Value;
}
private void OnThemeComponentDeleted(object sender, EventArgs e)
{
ThemeComponent = null;
}
}
}

View File

@@ -26,8 +26,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public abstract int Minimum { get; }
public abstract int Maximum { get; }
public override bool IsDirty { get; protected set; }
public NumericFilterPredicate FilterPredicate
{
get { return _filterPredicate; }

View File

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

View File

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

View File

@@ -30,8 +30,6 @@ namespace Filtration.ObjectModel.BlockItemBaseTypes
public ObservableCollection<string> Items { get; protected set; }
public override bool IsDirty { get; protected set; }
private void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
IsDirty = true;

View File

@@ -1,4 +1,5 @@
using System.Windows.Media;
using Filtration.ObjectModel.Enums;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
@@ -7,6 +8,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
public BackgroundColorBlockItem()
{
Color = new Color { A = 240, R = 0, G = 0, B = 0 };
}
public BackgroundColorBlockItem(Color color) : base(color)
@@ -16,6 +18,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBackgroundColor";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Background Color";
public override int SortOrder => 13;
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetBackgroundColor;
}
}

View File

@@ -1,6 +1,7 @@
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
@@ -16,23 +17,23 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Base Types: " +
return "Base Types: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
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 + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Base Types: (none)";
return "Base Types: (none)";
}
}
public override Color SummaryBackgroundColor => Colors.MediumTurquoise;
public override Color SummaryTextColor => Colors.Black;
public override int SortOrder => 11;
public override BlockItemOrdering SortOrder => BlockItemOrdering.BaseType;
}
}

View File

@@ -1,5 +1,6 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
@@ -7,6 +8,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
public BorderColorBlockItem()
{
Color = new Color {A = 240, R = 0, G = 0, B = 0};
}
public BorderColorBlockItem(Color color) : base(color)
@@ -16,6 +18,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBorderColor";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Border Color";
public override int SortOrder => 14;
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetBorderColor;
}
}

View File

@@ -1,6 +1,7 @@
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
@@ -16,23 +17,23 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
if (Items.Count > 0 && Items.Count < 4)
{
return "Item Classes: " +
return "Classes: " +
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
}
if (Items.Count >= 4)
{
var remaining = Items.Count - 3;
return "Item Classes: " + Items.Take(3)
return "Classes: " + Items.Take(3)
.Aggregate(string.Empty, (current, i) => current + i + ", ")
.TrimEnd(' ')
.TrimEnd(',') + " (+" + remaining + " more)";
}
return "Item Classes: (none)";
return "Classes: (none)";
}
}
public override Color SummaryBackgroundColor => Colors.MediumSeaGreen;
public override Color SummaryTextColor => Colors.White;
public override int SortOrder => 10;
public override BlockItemOrdering SortOrder => BlockItemOrdering.Class;
}
}

View 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;
}
}

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Drop Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DodgerBlue;
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 Maximum => 100;
}

View 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;
}
}

View 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;
}
}

View File

@@ -1,4 +1,5 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
@@ -16,7 +17,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetFontSize";
public override int MaximumAllowed => 1;
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 Maximum => 45;
}

View File

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

View 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 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;
}
}

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Height " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.LightBlue;
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 Maximum => 6;
}

View 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;
}
}

View File

@@ -20,7 +20,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Item Level " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkSlateGray;
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 Maximum => 100;
}

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Linked Sockets " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.Gold;
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 Maximum => 6;
}

View File

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

View File

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

View File

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

View File

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

View 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;
}
}

View File

@@ -21,8 +21,8 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Quality " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.DarkOrange;
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 Maximum => 20;
public override int Maximum => 30;
}
}

View File

@@ -30,7 +30,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
((ItemRarity) FilterPredicate.PredicateOperand).GetAttributeDescription();
public override Color SummaryBackgroundColor => Colors.LightCoral;
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 Maximum => (int)ItemRarity.Unique;
}

View 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;
}
}

View 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;
}
}

View File

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

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Sockets " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.LightGray;
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 Maximum => 6;
}

View File

@@ -1,22 +1,23 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
public class SoundBlockItem : DualIntegerBlockItem
public class SoundBlockItem : StrIntBlockItem
{
public SoundBlockItem()
{
Value = 1;
Value = "1";
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 int MaximumAllowed => 1;
public override string DisplayHeading => "Play Alert Sound";
public override int SortOrder => 16;
public override BlockItemOrdering SortOrder => BlockItemOrdering.PlayAlertSound;
}
}

View File

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

View File

@@ -1,5 +1,6 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
using Filtration.ObjectModel.Enums;
namespace Filtration.ObjectModel.BlockItemTypes
{
@@ -7,6 +8,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
{
public TextColorBlockItem()
{
Color = PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
}
public TextColorBlockItem(Color color) : base(color)
@@ -16,6 +18,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetTextColor";
public override int MaximumAllowed => 1;
public override string DisplayHeading => "Text Color";
public override int SortOrder => 12;
public override BlockItemOrdering SortOrder => BlockItemOrdering.SetTextColor;
}
}

View File

@@ -21,7 +21,7 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string SummaryText => "Width " + FilterPredicate;
public override Color SummaryBackgroundColor => Colors.MediumPurple;
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 Maximum => 2;
}

View 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);
}
}
}

View File

@@ -0,0 +1,7 @@
namespace Filtration.ObjectModel.Commands
{
public interface ICommand
{
void Execute();
}
}

View File

@@ -0,0 +1,8 @@
namespace Filtration.ObjectModel.Commands
{
internal interface IUndoableCommand : ICommand
{
void Undo();
void Redo();
}
}

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,30 @@
using System;
namespace Filtration.ObjectModel.Commands.ItemFilterScript
{
public class SetScriptDescriptionCommand : IUndoableCommand
{
private readonly IItemFilterScript _itemFilterScript;
private readonly string _newDescription;
private string _oldDescription;
public SetScriptDescriptionCommand(IItemFilterScript itemFilterScript, string newDescription)
{
_itemFilterScript = itemFilterScript;
_newDescription = newDescription;
}
public void Execute()
{
_oldDescription = _itemFilterScript.Description;
_itemFilterScript.Description = _newDescription;
}
public void Undo()
{
_itemFilterScript.Description = _oldDescription;
}
public void Redo() => Execute();
}
}

View File

@@ -0,0 +1,41 @@
using System.ComponentModel;
namespace Filtration.ObjectModel.Enums
{
public enum BlockItemOrdering
{
Action,
LinkedSockets,
Sockets,
Quality,
Identified,
Corrupted,
ElderItem,
ShaperItem,
MapTier,
ShapedMap,
ElderMap,
SocketGroup,
Height,
Width,
ItemLevel,
DropLevel,
GemLevel,
StackSize,
Rarity,
Class,
BaseType,
Prophecy,
HasExplicitMod,
SetTextColor,
SetBackgroundColor,
SetBorderColor,
SetFontSize,
PlayAlertSound,
PlayAlertSoundPositional,
DisableDropSound,
MinimapIcon,
PlayEffect,
CustomAlertSound
}
}

View File

@@ -8,6 +8,7 @@
Rarity,
Class,
BaseType,
Prophecy,
Sockets,
LinkedSockets,
SocketGroup,

View File

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

View File

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

View File

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

View File

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

View File

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

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