Compare commits
6 Commits
1.1.0-beta
...
1.1.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
892b2f15f2 | ||
|
|
042e5b41f9 | ||
|
|
5fc260dbb2 | ||
|
|
3de33e9447 | ||
|
|
37ad9ac42e | ||
|
|
fbd02702b0 |
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class AddBlockItemToBlocksCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> _input;
|
||||||
|
|
||||||
|
public AddBlockItemToBlocksCommand(List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> input)
|
||||||
|
{
|
||||||
|
_input = input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
foreach (var v in _input)
|
||||||
|
{
|
||||||
|
var blockItems = v.Item1;
|
||||||
|
var item = v.Item2;
|
||||||
|
|
||||||
|
blockItems.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
foreach (var v in _input)
|
||||||
|
{
|
||||||
|
var blockItems = v.Item1;
|
||||||
|
var item = v.Item2;
|
||||||
|
blockItems.Remove(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.Commands.ItemFilterScript
|
||||||
|
{
|
||||||
|
public class RemoveBlockItemFromBlocksCommand : IUndoableCommand
|
||||||
|
{
|
||||||
|
private readonly List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> _input;
|
||||||
|
|
||||||
|
public RemoveBlockItemFromBlocksCommand(List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>> input)
|
||||||
|
{
|
||||||
|
_input = input;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Execute()
|
||||||
|
{
|
||||||
|
foreach (var pair in _input)
|
||||||
|
{
|
||||||
|
var blockItems = pair.Item1;
|
||||||
|
var blockItem = pair.Item2;
|
||||||
|
|
||||||
|
for (var i = 0; i < blockItems.Count; i++)
|
||||||
|
{
|
||||||
|
if (blockItems[i] == blockItem)
|
||||||
|
{
|
||||||
|
blockItems.RemoveAt(i--);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Undo()
|
||||||
|
{
|
||||||
|
foreach (var pair in _input)
|
||||||
|
{
|
||||||
|
var blockItems = pair.Item1;
|
||||||
|
var blockItem = pair.Item2;
|
||||||
|
blockItems.Add(blockItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Redo() => Execute();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -114,11 +114,13 @@
|
|||||||
<Compile Include="BlockItemTypes\WidthBlockItem.cs" />
|
<Compile Include="BlockItemTypes\WidthBlockItem.cs" />
|
||||||
<Compile Include="Commands\CommandManager.cs" />
|
<Compile Include="Commands\CommandManager.cs" />
|
||||||
<Compile Include="Commands\ICommand.cs" />
|
<Compile Include="Commands\ICommand.cs" />
|
||||||
|
<Compile Include="Commands\ItemFilterScript\AddBlockItemToBlocksCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\MoveBlocksToIndexCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\MoveBlocksToIndexCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\MoveBlocksToBottomCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\MoveBlocksToBottomCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\MoveBlocksToTopCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\MoveBlocksToTopCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\PasteBlocksCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\PasteBlocksCommand.cs" />
|
||||||
|
<Compile Include="Commands\ItemFilterScript\RemoveBlockItemFromBlocksCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\RemoveBlocksCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\RemoveBlocksCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" />
|
||||||
<Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" />
|
<Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" />
|
||||||
|
|||||||
@@ -40,7 +40,12 @@
|
|||||||
<Reference Include="FluentAssertions, Version=5.5.3.0, Culture=neutral, PublicKeyToken=33f2691a05b67b6a, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\FluentAssertions.5.5.3\lib\net45\FluentAssertions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null" />
|
<Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\WindowsAPICodePack-Core.1.1.2\lib\Microsoft.WindowsAPICodePack.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\WindowsAPICodePack-Shell.1.1.1\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.10.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
|
<HintPath>..\packages\Moq.4.10.0\lib\net45\Moq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
using System;
|
using Filtration.Common.Services;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Filtration.Common.Services;
|
|
||||||
using Filtration.Services;
|
using Filtration.Services;
|
||||||
using Microsoft.WindowsAPICodePack.Dialogs;
|
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||||
using Moq;
|
using Moq;
|
||||||
|
|||||||
@@ -7,4 +7,6 @@
|
|||||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" 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.Threading.Tasks.Extensions" version="4.5.1" targetFramework="net461" />
|
||||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
<package id="System.ValueTuple" version="4.5.0" targetFramework="net461" />
|
||||||
|
<package id="WindowsAPICodePack-Core" version="1.1.2" targetFramework="net461" />
|
||||||
|
<package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net461" />
|
||||||
</packages>
|
</packages>
|
||||||
@@ -92,7 +92,6 @@ Global
|
|||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.ActiveCfg = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.Build.0 = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{E0693972-72C5-4E05-A9C5-A5943E4015C6}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -140,7 +139,6 @@ Global
|
|||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.ActiveCfg = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.Build.0 = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{537BE676-2FF6-4995-B05B-9CFACE852EC9}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -188,7 +186,6 @@ Global
|
|||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.ActiveCfg = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.Build.0 = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{450AC313-BF25-4BFD-A066-9F39F026FDCF}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -260,7 +257,6 @@ Global
|
|||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.ActiveCfg = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.Build.0 = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{1E42A658-45C4-4DD9-83C5-2A10728DBDFA}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -308,7 +304,6 @@ Global
|
|||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.ActiveCfg = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.Build.0 = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{58CD3B9C-EBBA-4527-A81C-78B7EA9CA298}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -380,7 +375,6 @@ Global
|
|||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.ActiveCfg = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.Build.0 = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{1F30CF6D-A5BF-4777-B8BA-E34F439FE8E5}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
@@ -428,7 +422,6 @@ Global
|
|||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.Release|x86.ActiveCfg = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.Release|x86.Build.0 = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|ARM.ActiveCfg = Release|Any CPU
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|ARM.Build.0 = Release|Any CPU
|
||||||
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
{7A5720DE-A41B-47EA-AAAB-7C5608FF0C1F}.SquirrelReleasify|x64.ActiveCfg = Release|Any CPU
|
||||||
|
|||||||
@@ -4,11 +4,8 @@
|
|||||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<section name="Filtration.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
<section name="Filtration.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
</sectionGroup>
|
</sectionGroup>
|
||||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
|
||||||
<section name="Filtration.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
|
||||||
</sectionGroup>
|
|
||||||
</configSections>
|
</configSections>
|
||||||
<startup>
|
<startup>
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||||
</startup>
|
</startup>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
@@ -19,18 +16,6 @@
|
|||||||
<setting name="ExtraLineBetweenBlocks" serializeAs="String">
|
<setting name="ExtraLineBetweenBlocks" serializeAs="String">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</setting>
|
</setting>
|
||||||
<setting name="SuppressUpdatesUpToVersionMajorPart" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="SuppressUpdates" serializeAs="String">
|
|
||||||
<value>False</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="SuppressUpdatesUpToVersionMinorPart" serializeAs="String">
|
|
||||||
<value>0</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="StaticDataLastUpdated" serializeAs="String">
|
|
||||||
<value>2016-01-01</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="DownloadPrereleaseUpdates" serializeAs="String">
|
<setting name="DownloadPrereleaseUpdates" serializeAs="String">
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</setting>
|
</setting>
|
||||||
@@ -79,17 +64,4 @@
|
|||||||
</dependentAssembly>
|
</dependentAssembly>
|
||||||
</assemblyBinding>
|
</assemblyBinding>
|
||||||
</runtime>
|
</runtime>
|
||||||
<applicationSettings>
|
|
||||||
<Filtration.Properties.Settings>
|
|
||||||
<setting name="ItemBaseTypesStaticDataUrl" serializeAs="String">
|
|
||||||
<value>http://ben-wallis.github.io/Filtration/ItemBaseTypes.txt</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="ItemClassesStaticDataUrl" serializeAs="String">
|
|
||||||
<value>http://ben-wallis.github.io/Filtration/ItemClasses.txt</value>
|
|
||||||
</setting>
|
|
||||||
<setting name="UpdateDataUrl" serializeAs="String">
|
|
||||||
<value>http://ben-wallis.github.io/Filtration/filtration_version.xml</value>
|
|
||||||
</setting>
|
|
||||||
</Filtration.Properties.Settings>
|
|
||||||
</applicationSettings>
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95)
|
* All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95)
|
||||||
* Filter sections are once again now expanded by default when scripts are opened, unless the new "Auto-expand all sections when opening scripts" setting is disabled
|
* Filter sections are once again now expanded by default when scripts are opened, unless the new "Auto-expand all sections when opening scripts" setting is disabled
|
||||||
* A new Clear Styles button has been added which removes all styles from the selected block (#96)
|
* A new Clear Styles button has been added which removes all styles from the selected block (#96)
|
||||||
|
* New buttons for adding/removing DisableDropSound from selected blocks have been added (#110)
|
||||||
* The Enable/Disable Block toggle button is now visible on both the Regular Block Items and Appearance Block Items views
|
* The Enable/Disable Block toggle button is now visible on both the Regular Block Items and Appearance Block Items views
|
||||||
* When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear
|
* When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear
|
||||||
* Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed
|
* Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
<dependencies />
|
<dependencies />
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*;*.xml"/>
|
<file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*;*.xml;*.log"/>
|
||||||
|
<file src="Resources\AlertSounds\*.mp3" target="lib\net45\Resources\AlertSounds\" />
|
||||||
</files>
|
</files>
|
||||||
</package>
|
</package>
|
||||||
@@ -11,7 +11,7 @@ using System.Runtime.CompilerServices;
|
|||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.1.0")]
|
[assembly: AssemblyVersion("1.1.0")]
|
||||||
[assembly: AssemblyInformationalVersion("1.1.0-beta4")]
|
[assembly: AssemblyInformationalVersion("1.1.0-beta6")]
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||||
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
|
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
|
||||||
|
|||||||
75
Filtration/Properties/Settings.Designer.cs
generated
75
Filtration/Properties/Settings.Designer.cs
generated
@@ -47,81 +47,6 @@ namespace Filtration.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public int SuppressUpdatesUpToVersionMajorPart {
|
|
||||||
get {
|
|
||||||
return ((int)(this["SuppressUpdatesUpToVersionMajorPart"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["SuppressUpdatesUpToVersionMajorPart"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
|
||||||
public bool SuppressUpdates {
|
|
||||||
get {
|
|
||||||
return ((bool)(this["SuppressUpdates"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["SuppressUpdates"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("0")]
|
|
||||||
public int SuppressUpdatesUpToVersionMinorPart {
|
|
||||||
get {
|
|
||||||
return ((int)(this["SuppressUpdatesUpToVersionMinorPart"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["SuppressUpdatesUpToVersionMinorPart"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("2016-01-01")]
|
|
||||||
public global::System.DateTime StaticDataLastUpdated {
|
|
||||||
get {
|
|
||||||
return ((global::System.DateTime)(this["StaticDataLastUpdated"]));
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
this["StaticDataLastUpdated"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("http://ben-wallis.github.io/Filtration/ItemBaseTypes.txt")]
|
|
||||||
public string ItemBaseTypesStaticDataUrl {
|
|
||||||
get {
|
|
||||||
return ((string)(this["ItemBaseTypesStaticDataUrl"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("http://ben-wallis.github.io/Filtration/ItemClasses.txt")]
|
|
||||||
public string ItemClassesStaticDataUrl {
|
|
||||||
get {
|
|
||||||
return ((string)(this["ItemClassesStaticDataUrl"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("http://ben-wallis.github.io/Filtration/filtration_version.xml")]
|
|
||||||
public string UpdateDataUrl {
|
|
||||||
get {
|
|
||||||
return ((string)(this["UpdateDataUrl"]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
[global::System.Configuration.DefaultSettingValueAttribute("False")]
|
||||||
|
|||||||
@@ -8,27 +8,6 @@
|
|||||||
<Setting Name="ExtraLineBetweenBlocks" Type="System.Boolean" Scope="User">
|
<Setting Name="ExtraLineBetweenBlocks" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">True</Value>
|
<Value Profile="(Default)">True</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
<Setting Name="SuppressUpdatesUpToVersionMajorPart" Type="System.Int32" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="SuppressUpdates" Type="System.Boolean" Scope="User">
|
|
||||||
<Value Profile="(Default)">False</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="SuppressUpdatesUpToVersionMinorPart" Type="System.Int32" Scope="User">
|
|
||||||
<Value Profile="(Default)">0</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="StaticDataLastUpdated" Type="System.DateTime" Scope="User">
|
|
||||||
<Value Profile="(Default)">2016-01-01</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="ItemBaseTypesStaticDataUrl" Type="System.String" Scope="Application">
|
|
||||||
<Value Profile="(Default)">http://ben-wallis.github.io/Filtration/ItemBaseTypes.txt</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="ItemClassesStaticDataUrl" Type="System.String" Scope="Application">
|
|
||||||
<Value Profile="(Default)">http://ben-wallis.github.io/Filtration/ItemClasses.txt</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="UpdateDataUrl" Type="System.String" Scope="Application">
|
|
||||||
<Value Profile="(Default)">http://ben-wallis.github.io/Filtration/filtration_version.xml</Value>
|
|
||||||
</Setting>
|
|
||||||
<Setting Name="DownloadPrereleaseUpdates" Type="System.Boolean" Scope="User">
|
<Setting Name="DownloadPrereleaseUpdates" Type="System.Boolean" Scope="User">
|
||||||
<Value Profile="(Default)">False</Value>
|
<Value Profile="(Default)">False</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ namespace Filtration.Services
|
|||||||
{
|
{
|
||||||
_fileSystemService = fileSystemService;
|
_fileSystemService = fileSystemService;
|
||||||
_itemFilterScriptTranslator = itemFilterScriptTranslator;
|
_itemFilterScriptTranslator = itemFilterScriptTranslator;
|
||||||
|
|
||||||
|
ItemFilterScriptDirectory = Settings.Default.DefaultFilterDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ItemFilterScriptDirectory { get; private set; }
|
public string ItemFilterScriptDirectory { get; private set; }
|
||||||
@@ -47,6 +49,7 @@ namespace Filtration.Services
|
|||||||
|
|
||||||
ItemFilterScriptDirectory = path;
|
ItemFilterScriptDirectory = path;
|
||||||
Settings.Default.DefaultFilterDirectory = path;
|
Settings.Default.DefaultFilterDirectory = path;
|
||||||
|
Settings.Default.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IItemFilterScript> LoadItemFilterScriptAsync(string filePath)
|
public async Task<IItemFilterScript> LoadItemFilterScriptAsync(string filePath)
|
||||||
@@ -62,7 +65,7 @@ namespace Filtration.Services
|
|||||||
{
|
{
|
||||||
loadedScript.FilePath = filePath;
|
loadedScript.FilePath = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
return loadedScript;
|
return loadedScript;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ namespace Filtration.ViewModels
|
|||||||
RelayCommand<bool> ToggleShowAdvancedCommand { get; }
|
RelayCommand<bool> ToggleShowAdvancedCommand { get; }
|
||||||
RelayCommand ClearFilterCommand { get; }
|
RelayCommand ClearFilterCommand { get; }
|
||||||
RelayCommand ClearStylesCommand { get; }
|
RelayCommand ClearStylesCommand { get; }
|
||||||
|
RelayCommand EnableDropSoundsCommand { get; }
|
||||||
|
RelayCommand DisableDropSoundsCommand { get; }
|
||||||
|
|
||||||
void AddCommentBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
|
void AddCommentBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
|
||||||
void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
|
void AddBlock(IItemFilterBlockViewModelBase targetBlockViewModelBase);
|
||||||
@@ -180,6 +182,8 @@ namespace Filtration.ViewModels
|
|||||||
CollapseAllBlocksCommand = new RelayCommand(OnCollapseAllBlocksCommand);
|
CollapseAllBlocksCommand = new RelayCommand(OnCollapseAllBlocksCommand);
|
||||||
ExpandAllSectionsCommand = new RelayCommand(ExpandAllSections);
|
ExpandAllSectionsCommand = new RelayCommand(ExpandAllSections);
|
||||||
CollapseAllSectionsCommand = new RelayCommand(CollapseAllSections);
|
CollapseAllSectionsCommand = new RelayCommand(CollapseAllSections);
|
||||||
|
EnableDropSoundsCommand = new RelayCommand(OnEnableDropSoundsCommand, CanModifySelectedBlocks);
|
||||||
|
DisableDropSoundsCommand = new RelayCommand(OnDisableDropSoundsCommand, CanModifySelectedBlocks);
|
||||||
|
|
||||||
var icon = new BitmapImage();
|
var icon = new BitmapImage();
|
||||||
icon.BeginInit();
|
icon.BeginInit();
|
||||||
@@ -421,6 +425,8 @@ namespace Filtration.ViewModels
|
|||||||
public RelayCommand CollapseAllBlocksCommand { get; }
|
public RelayCommand CollapseAllBlocksCommand { get; }
|
||||||
public RelayCommand ExpandAllSectionsCommand { get; }
|
public RelayCommand ExpandAllSectionsCommand { get; }
|
||||||
public RelayCommand CollapseAllSectionsCommand { get; }
|
public RelayCommand CollapseAllSectionsCommand { get; }
|
||||||
|
public RelayCommand EnableDropSoundsCommand { get; }
|
||||||
|
public RelayCommand DisableDropSoundsCommand { get; }
|
||||||
|
|
||||||
public bool IsActiveDocument
|
public bool IsActiveDocument
|
||||||
{
|
{
|
||||||
@@ -1284,6 +1290,63 @@ namespace Filtration.ViewModels
|
|||||||
SetDirtyFlag();
|
SetDirtyFlag();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void OnEnableDropSoundsCommand()
|
||||||
|
{
|
||||||
|
ValidateSelectedBlocks();
|
||||||
|
|
||||||
|
var input = new List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>>();
|
||||||
|
|
||||||
|
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterBlockViewModel>())
|
||||||
|
{
|
||||||
|
var blockItems = block.Block.BlockItems;
|
||||||
|
for (var i = 0; i < blockItems.Count; i++)
|
||||||
|
{
|
||||||
|
var blockItem = blockItems[i];
|
||||||
|
if (blockItem is DisableDropSoundBlockItem)
|
||||||
|
{
|
||||||
|
input.Add(new Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>(blockItems, blockItem));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.Count > 0)
|
||||||
|
{
|
||||||
|
_scriptCommandManager.ExecuteCommand(new RemoveBlockItemFromBlocksCommand(input));
|
||||||
|
SetDirtyFlag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDisableDropSoundsCommand()
|
||||||
|
{
|
||||||
|
ValidateSelectedBlocks();
|
||||||
|
|
||||||
|
var input = new List<Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>>();
|
||||||
|
|
||||||
|
foreach (var block in SelectedBlockViewModels.OfType<IItemFilterBlockViewModel>())
|
||||||
|
{
|
||||||
|
var blockItems = block.Block.BlockItems;
|
||||||
|
var found = false;
|
||||||
|
foreach (var item in blockItems)
|
||||||
|
{
|
||||||
|
if (item is DisableDropSoundBlockItem)
|
||||||
|
{
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
var item = new DisableDropSoundBlockItem(true);
|
||||||
|
input.Add(new Tuple<ObservableCollection<IItemFilterBlockItem>, IItemFilterBlockItem>(blockItems, item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.Count > 0)
|
||||||
|
{
|
||||||
|
_scriptCommandManager.ExecuteCommand(new AddBlockItemToBlocksCommand(input));
|
||||||
|
SetDirtyFlag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnBlockBecameDirty(object sender, EventArgs e)
|
private void OnBlockBecameDirty(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
SetDirtyFlag();
|
SetDirtyFlag();
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ namespace Filtration.ViewModels
|
|||||||
ApplyThemeToScriptCommand = new RelayCommand(async () => await OnApplyThemeToScriptCommandAsync(), () => ActiveDocumentIsScript);
|
ApplyThemeToScriptCommand = new RelayCommand(async () => await OnApplyThemeToScriptCommandAsync(), () => ActiveDocumentIsScript);
|
||||||
EditMasterThemeCommand = new RelayCommand(OnEditMasterThemeCommand, () => ActiveDocumentIsScript);
|
EditMasterThemeCommand = new RelayCommand(OnEditMasterThemeCommand, () => ActiveDocumentIsScript);
|
||||||
|
|
||||||
|
EnableDropSoundsCommand = new RelayCommand(OnEnableDropSoundsCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock && ActiveScriptCanModifySelectedBlocks);
|
||||||
|
DisableDropSoundsCommand = new RelayCommand(OnDisableDropSoundsCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock && ActiveScriptCanModifySelectedBlocks);
|
||||||
|
|
||||||
AddTextColorThemeComponentCommand = new RelayCommand(OnAddTextColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
AddTextColorThemeComponentCommand = new RelayCommand(OnAddTextColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
||||||
AddBackgroundColorThemeComponentCommand = new RelayCommand(OnAddBackgroundColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
AddBackgroundColorThemeComponentCommand = new RelayCommand(OnAddBackgroundColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
||||||
AddBorderColorThemeComponentCommand = new RelayCommand(OnAddBorderColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
AddBorderColorThemeComponentCommand = new RelayCommand(OnAddBorderColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
||||||
@@ -230,6 +233,9 @@ namespace Filtration.ViewModels
|
|||||||
public RelayCommand CreateThemeCommand { get; }
|
public RelayCommand CreateThemeCommand { get; }
|
||||||
public RelayCommand ApplyThemeToScriptCommand { get; }
|
public RelayCommand ApplyThemeToScriptCommand { get; }
|
||||||
|
|
||||||
|
public RelayCommand EnableDropSoundsCommand { get; }
|
||||||
|
public RelayCommand DisableDropSoundsCommand { get; }
|
||||||
|
|
||||||
public RelayCommand AddTextColorThemeComponentCommand { get; }
|
public RelayCommand AddTextColorThemeComponentCommand { get; }
|
||||||
public RelayCommand AddBackgroundColorThemeComponentCommand { get; }
|
public RelayCommand AddBackgroundColorThemeComponentCommand { get; }
|
||||||
public RelayCommand AddBorderColorThemeComponentCommand { get; }
|
public RelayCommand AddBorderColorThemeComponentCommand { get; }
|
||||||
@@ -402,7 +408,7 @@ namespace Filtration.ViewModels
|
|||||||
OpenTheme(themeViewModel);
|
OpenTheme(themeViewModel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OpenTheme(IThemeEditorViewModel themeEditorViewModel)
|
private void OpenTheme(IThemeEditorViewModel themeEditorViewModel)
|
||||||
{
|
{
|
||||||
if (AvalonDockWorkspaceViewModel.OpenDocuments.Contains(themeEditorViewModel))
|
if (AvalonDockWorkspaceViewModel.OpenDocuments.Contains(themeEditorViewModel))
|
||||||
@@ -724,11 +730,37 @@ namespace Filtration.ViewModels
|
|||||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent);
|
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnEnableDropSoundsCommand()
|
||||||
|
{
|
||||||
|
var result = _messageBoxService.Show("Confirm",
|
||||||
|
"Are you sure you wish to enable drop sounds on all selected blocks?",
|
||||||
|
MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
|
if (result == MessageBoxResult.No)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.EnableDropSoundsCommand.Execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisableDropSoundsCommand()
|
||||||
|
{
|
||||||
|
var result = _messageBoxService.Show("Confirm",
|
||||||
|
"Are you sure you wish to disable drop sounds on all selected blocks?",
|
||||||
|
MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||||
|
if (result == MessageBoxResult.No)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.DisableDropSoundsCommand.Execute(null);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<bool> CloseAllDocumentsAsync()
|
public async Task<bool> CloseAllDocumentsAsync()
|
||||||
{
|
{
|
||||||
Settings.Default.LastOpenScripts = string.Join("|", _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IItemFilterScriptViewModel>().Select(sc => sc.Script.FilePath));
|
Settings.Default.LastOpenScripts = string.Join("|", _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IItemFilterScriptViewModel>().Select(sc => sc.Script.FilePath));
|
||||||
var openDocuments = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().ToList();
|
var openDocuments = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().ToList();
|
||||||
|
|
||||||
foreach (var document in openDocuments)
|
foreach (var document in openDocuments)
|
||||||
{
|
{
|
||||||
if (!_avalonDockWorkspaceViewModel.OpenDocuments.Contains(document))
|
if (!_avalonDockWorkspaceViewModel.OpenDocuments.Contains(document))
|
||||||
|
|||||||
@@ -35,4 +35,6 @@
|
|||||||
<Image Source="/Filtration;component/Resources/Icons/ThemeComponentDelete.ico" x:Key="ThemeComponentDeleteIcon" x:Shared="False" />
|
<Image Source="/Filtration;component/Resources/Icons/ThemeComponentDelete.ico" x:Key="ThemeComponentDeleteIcon" x:Shared="False" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/standby_enabled_icon.png" x:Key="StandbyEnabledIcon" x:Shared="False" />
|
<Image Source="/Filtration;component/Resources/Icons/standby_enabled_icon.png" x:Key="StandbyEnabledIcon" x:Shared="False" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="StandbyDisabledIcon" x:Shared="False" />
|
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="StandbyDisabledIcon" x:Shared="False" />
|
||||||
|
<Image Source="/Filtration;component/Resources/Icons/standby_enabled_icon.png" x:Key="EnableDropSoundsIcon" x:Shared="False" />
|
||||||
|
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="DisableDropSoundsIcon" x:Shared="False" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
x:ClassModifier="internal"
|
x:ClassModifier="internal"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
|
xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
|
||||||
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
|
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
|
||||||
@@ -64,12 +64,12 @@
|
|||||||
Background="ForestGreen"
|
Background="ForestGreen"
|
||||||
BorderBrush="ForestGreen"
|
BorderBrush="ForestGreen"
|
||||||
x:Name="ScriptToolsGroup"
|
x:Name="ScriptToolsGroup"
|
||||||
IsVisibleChanged="ScriptToolsGroup_OnIsVisibleChanged"
|
IsVisibleChanged="ScriptToolsGroup_OnIsVisibleChanged"
|
||||||
Visibility="{Binding ActiveDocumentIsScript, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}" />
|
Visibility="{Binding ActiveDocumentIsScript, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}" />
|
||||||
<fluent:RibbonContextualTabGroup Header="Theme"
|
<fluent:RibbonContextualTabGroup Header="Theme"
|
||||||
Background="DodgerBlue"
|
Background="DodgerBlue"
|
||||||
BorderBrush="DodgerBlue"
|
BorderBrush="DodgerBlue"
|
||||||
x:Name="ThemeToolsGroup"
|
x:Name="ThemeToolsGroup"
|
||||||
IsVisibleChanged="ThemeToolsGroup_OnIsVisibleChanged"
|
IsVisibleChanged="ThemeToolsGroup_OnIsVisibleChanged"
|
||||||
Visibility="{Binding ActiveDocumentIsTheme, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}" />
|
Visibility="{Binding ActiveDocumentIsTheme, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}" />
|
||||||
</fluent:Ribbon.ContextualGroups>
|
</fluent:Ribbon.ContextualGroups>
|
||||||
@@ -125,6 +125,10 @@
|
|||||||
<fluent:Button Header="Create Theme" Command="{Binding CreateThemeCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
|
<fluent:Button Header="Create Theme" Command="{Binding CreateThemeCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
|
||||||
<fluent:Button Header="Replace Colours" Command="{Binding ReplaceColorsCommand}" Icon="{StaticResource ReplaceColorsIcon}" LargeIcon="{StaticResource ReplaceColorsIcon}" />
|
<fluent:Button Header="Replace Colours" Command="{Binding ReplaceColorsCommand}" Icon="{StaticResource ReplaceColorsIcon}" LargeIcon="{StaticResource ReplaceColorsIcon}" />
|
||||||
</fluent:RibbonGroupBox>
|
</fluent:RibbonGroupBox>
|
||||||
|
<fluent:RibbonGroupBox Header="Helpers">
|
||||||
|
<fluent:Button Header="Enable Drop Sounds" Command="{Binding EnableDropSoundsCommand}" SizeDefinition="Middle" Icon="{StaticResource EnableDropSoundsIcon}" LargeIcon="{StaticResource EnableDropSoundsIcon}" />
|
||||||
|
<fluent:Button Header="Disable Drop Sounds" Command="{Binding DisableDropSoundsCommand}" SizeDefinition="Middle" Icon="{StaticResource DisableDropSoundsIcon}" LargeIcon="{StaticResource DisableDropSoundsIcon}" />
|
||||||
|
</fluent:RibbonGroupBox>
|
||||||
</fluent:RibbonTabItem>
|
</fluent:RibbonTabItem>
|
||||||
<fluent:RibbonTabItem x:Name="ThemeToolsTabItem" Header="Theme Tools" Group="{Binding ElementName=ThemeToolsGroup}" Visibility="{Binding ActiveDocumentIsTheme, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}">
|
<fluent:RibbonTabItem x:Name="ThemeToolsTabItem" Header="Theme Tools" Group="{Binding ElementName=ThemeToolsGroup}" Visibility="{Binding ActiveDocumentIsTheme, Converter={StaticResource BooleanVisibilityConverter}, Mode=OneWay}">
|
||||||
<fluent:RibbonGroupBox Header="Add Components">
|
<fluent:RibbonGroupBox Header="Add Components">
|
||||||
@@ -172,5 +176,4 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</fluent:RibbonWindow>
|
</fluent:RibbonWindow>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user