Merge pull request #49 from GlenCFL/master

Provide an update to fully support Path of Exile 3.1.
This commit is contained in:
Ben Wallis 2017-12-07 20:19:14 +00:00 committed by GitHub
commit b88730fb3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
70 changed files with 2080 additions and 1117 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files # User-specific files
/.vs/
*.suo *.suo
*.user *.user
*.userosscache *.userosscache

View File

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

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBackgroundColor"; public override string PrefixText => "SetBackgroundColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Background Color"; public override string DisplayHeading => "Background Color";
public override int SortOrder => 15; public override int SortOrder => 18;
} }
} }

View File

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

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetBorderColor"; public override string PrefixText => "SetBorderColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Border Color"; public override string DisplayHeading => "Border Color";
public override int SortOrder => 16; public override int SortOrder => 19;
} }
} }

View File

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

View File

@ -20,4 +20,4 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override int SortOrder => 5; public override int SortOrder => 5;
} }
} }

View File

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

View File

@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
namespace Filtration.ObjectModel.BlockItemTypes
{
public sealed class 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 int SortOrder => 6;
}
}

View File

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

View File

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

View File

@ -20,4 +20,4 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override int SortOrder => 4; public override int SortOrder => 4;
} }
} }

View File

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

View File

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

View File

@ -0,0 +1,22 @@
using Filtration.ObjectModel.BlockItemBaseTypes;
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 int SortOrder => 22;
}
}

View File

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

View File

@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
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 int SortOrder => 8;
}
}

View File

@ -0,0 +1,23 @@
using System.Windows.Media;
using Filtration.ObjectModel.BlockItemBaseTypes;
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 int SortOrder => 7;
}
}

View File

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

View File

@ -2,21 +2,21 @@
namespace Filtration.ObjectModel.BlockItemTypes namespace Filtration.ObjectModel.BlockItemTypes
{ {
public class SoundBlockItem : DualIntegerBlockItem public class SoundBlockItem : StrIntBlockItem
{ {
public SoundBlockItem() public SoundBlockItem()
{ {
Value = 1; Value = "1";
SecondValue = 79; SecondValue = 79;
} }
public SoundBlockItem(int value, int secondValue) : base(value, secondValue) public SoundBlockItem(string value, int secondValue) : base(value, secondValue)
{ {
} }
public override string PrefixText => "PlayAlertSound"; public override string PrefixText => "PlayAlertSound";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Play Alert Sound"; public override string DisplayHeading => "Play Alert Sound";
public override int SortOrder => 18; public override int SortOrder => 21;
} }
} }

View File

@ -16,6 +16,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
public override string PrefixText => "SetTextColor"; public override string PrefixText => "SetTextColor";
public override int MaximumAllowed => 1; public override int MaximumAllowed => 1;
public override string DisplayHeading => "Text Color"; public override string DisplayHeading => "Text Color";
public override int SortOrder => 14; public override int SortOrder => 17;
} }
} }

View File

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

View File

@ -1,134 +1,135 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}</ProjectGuid> <ProjectGuid>{4AAC3BEB-1DC1-483E-9D11-0E9334E80227}</ProjectGuid>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Filtration.ObjectModel</RootNamespace> <RootNamespace>Filtration.ObjectModel</RootNamespace>
<AssemblyName>Filtration.ObjectModel</AssemblyName> <AssemblyName>Filtration.ObjectModel</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<Optimize>false</Optimize> <Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll</HintPath> <HintPath>..\packages\Castle.Core.3.3.0\lib\net45\Castle.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL"> <Reference Include="Castle.Windsor, Version=3.4.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath> <HintPath>..\packages\Castle.Windsor.3.4.0\lib\net45\Castle.Windsor.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="BlockItemBaseTypes\ActionBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\ActionBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\BlockItemBase.cs" /> <Compile Include="BlockItemBaseTypes\BlockItemBase.cs" />
<Compile Include="BlockItemBaseTypes\BooleanBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\BooleanBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\ColorBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\ColorBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\DualIntegerBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\DualIntegerBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\StringIntBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" />
<Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" />
<Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" /> <Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" />
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" /> <Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" />
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" /> <Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
<Compile Include="BlockItemTypes\ClassBlockItem.cs" /> <Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
<Compile Include="BlockItemTypes\CorruptedBlockItem.cs" /> <Compile Include="BlockItemTypes\ClassBlockItem.cs" />
<Compile Include="BlockItemTypes\DropLevelBlockItem.cs" /> <Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
<Compile Include="BlockItemTypes\FontSizeBlockItem.cs" /> <Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
<Compile Include="BlockItemTypes\HeightBlockItem.cs" /> <Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
<Compile Include="BlockItemTypes\IdentifiedBlockItem.cs" /> <Compile Include="BlockItemTypes\CorruptedBlockItem.cs" />
<Compile Include="BlockItemTypes\ItemLevelBlockItem.cs" /> <Compile Include="BlockItemTypes\DropLevelBlockItem.cs" />
<Compile Include="BlockItemTypes\LinkedSocketsBlockItem.cs" /> <Compile Include="BlockItemTypes\FontSizeBlockItem.cs" />
<Compile Include="BlockItemTypes\QualityBlockItem.cs" /> <Compile Include="BlockItemTypes\HeightBlockItem.cs" />
<Compile Include="BlockItemTypes\RarityBlockItem.cs" /> <Compile Include="BlockItemTypes\IdentifiedBlockItem.cs" />
<Compile Include="BlockItemTypes\SocketGroupBlockItem.cs" /> <Compile Include="BlockItemTypes\ItemLevelBlockItem.cs" />
<Compile Include="BlockItemTypes\SocketsBlockItem.cs" /> <Compile Include="BlockItemTypes\LinkedSocketsBlockItem.cs" />
<Compile Include="BlockItemTypes\SoundBlockItem.cs" /> <Compile Include="BlockItemTypes\QualityBlockItem.cs" />
<Compile Include="BlockItemTypes\TextColorBlockItem.cs" /> <Compile Include="BlockItemTypes\RarityBlockItem.cs" />
<Compile Include="BlockItemTypes\WidthBlockItem.cs" /> <Compile Include="BlockItemTypes\SocketGroupBlockItem.cs" />
<Compile Include="Commands\CommandManager.cs" /> <Compile Include="BlockItemTypes\SocketsBlockItem.cs" />
<Compile Include="Commands\ICommand.cs" /> <Compile Include="BlockItemTypes\PositionalSoundBlockItem.cs" />
<Compile Include="Commands\ItemFilterScript\PasteBlockCommand.cs" /> <Compile Include="BlockItemTypes\SoundBlockItem.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockToBottomCommand.cs" /> <Compile Include="BlockItemTypes\TextColorBlockItem.cs" />
<Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" /> <Compile Include="BlockItemTypes\WidthBlockItem.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockDownCommand.cs" /> <Compile Include="Commands\CommandManager.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockUpCommand.cs" /> <Compile Include="Commands\ICommand.cs" />
<Compile Include="Commands\ItemFilterScript\MoveBlockToTopCommand.cs" /> <Compile Include="Commands\ItemFilterScript\PasteBlockCommand.cs" />
<Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlockToBottomCommand.cs" />
<Compile Include="Commands\ItemFilterScript\RemoveBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\AddCommentBlockCommand.cs" />
<Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlockDownCommand.cs" />
<Compile Include="Commands\IUndoableCommand.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlockUpCommand.cs" />
<Compile Include="Enums\BlockAction.cs" /> <Compile Include="Commands\ItemFilterScript\MoveBlockToTopCommand.cs" />
<Compile Include="Enums\BlockItemType.cs" /> <Compile Include="Commands\ItemFilterScript\SetScriptDescriptionCommand.cs" />
<Compile Include="Enums\FilterPredicateOperator.cs" /> <Compile Include="Commands\ItemFilterScript\RemoveBlockCommand.cs" />
<Compile Include="Enums\FilterType.cs" /> <Compile Include="Commands\ItemFilterScript\AddBlockCommand.cs" />
<Compile Include="Enums\ItemRarity.cs" /> <Compile Include="Commands\IUndoableCommand.cs" />
<Compile Include="Enums\SocketColor.cs" /> <Compile Include="Enums\BlockAction.cs" />
<Compile Include="Enums\ThemeComponentType.cs" /> <Compile Include="Enums\BlockItemType.cs" />
<Compile Include="Extensions\EnumHelper.cs" /> <Compile Include="Enums\FilterPredicateOperator.cs" />
<Compile Include="Extensions\ItemRarityExtensions.cs" /> <Compile Include="Enums\FilterType.cs" />
<Compile Include="Factories\IItemFilterScriptFactory.cs" /> <Compile Include="Enums\ItemRarity.cs" />
<Compile Include="FilteredItem.cs" /> <Compile Include="Enums\SocketColor.cs" />
<Compile Include="IAudioVisualBlockItem.cs" /> <Compile Include="Enums\ThemeComponentType.cs" />
<Compile Include="IItemFilterBlockItem.cs" /> <Compile Include="Extensions\EnumHelper.cs" />
<Compile Include="Item.cs" /> <Compile Include="Extensions\ItemRarityExtensions.cs" />
<Compile Include="ItemFilterBlock.cs" /> <Compile Include="Factories\IItemFilterScriptFactory.cs" />
<Compile Include="ItemFilterBlockGroup.cs" /> <Compile Include="FilteredItem.cs" />
<Compile Include="ItemFilterScript.cs" /> <Compile Include="IAudioVisualBlockItem.cs" />
<Compile Include="ItemFilterScriptSettings.cs" /> <Compile Include="IItemFilterBlockItem.cs" />
<Compile Include="ItemSet.cs" /> <Compile Include="Item.cs" />
<Compile Include="NumericFilterPredicate.cs" /> <Compile Include="ItemFilterBlock.cs" />
<Compile Include="PathOfExileNamedColors.cs" /> <Compile Include="ItemFilterBlockGroup.cs" />
<Compile Include="Enums\PathOfExileNamedColor.cs" /> <Compile Include="ItemFilterScript.cs" />
<Compile Include="Properties\Annotations.cs" /> <Compile Include="ItemFilterScriptSettings.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="ItemSet.cs" />
<Compile Include="ReplaceColorsParameterSet.cs" /> <Compile Include="NumericFilterPredicate.cs" />
<Compile Include="Socket.cs" /> <Compile Include="PathOfExileNamedColors.cs" />
<Compile Include="SocketGroup.cs" /> <Compile Include="Enums\PathOfExileNamedColor.cs" />
<Compile Include="ThemeEditor\Theme.cs" /> <Compile Include="Properties\Annotations.cs" />
<Compile Include="ThemeEditor\ThemeComponent.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ThemeEditor\ThemeComponentCollection.cs" /> <Compile Include="ReplaceColorsParameterSet.cs" />
<Compile Include="WindsorInstallers\CommandsInstaller.cs" /> <Compile Include="Socket.cs" />
<Compile Include="WindsorInstallers\ModelsInstaller.cs" /> <Compile Include="SocketGroup.cs" />
</ItemGroup> <Compile Include="ThemeEditor\Theme.cs" />
<ItemGroup /> <Compile Include="ThemeEditor\ThemeComponent.cs" />
<ItemGroup> <Compile Include="ThemeEditor\ThemeComponentCollection.cs" />
<None Include="packages.config" /> <Compile Include="WindsorInstallers\CommandsInstaller.cs" />
</ItemGroup> <Compile Include="WindsorInstallers\ModelsInstaller.cs" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
</Target> </Target>
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View File

@ -335,6 +335,57 @@ namespace Filtration.Parser.Tests.Services
Assert.IsTrue(blockItem.BooleanValue); Assert.IsTrue(blockItem.BooleanValue);
} }
[Test]
public void TranslateStringToItemFilterBlock_ElderItem_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" ElderItem False";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is ElderItemBlockItem));
var blockItem = result.BlockItems.OfType<ElderItemBlockItem>().First();
Assert.IsFalse(blockItem.BooleanValue);
}
[Test]
public void TranslateStringToItemFilterBlock_ShaperItem_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" ShaperItem True";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is ShaperItemBlockItem));
var blockItem = result.BlockItems.OfType<ShaperItemBlockItem>().First();
Assert.IsTrue(blockItem.BooleanValue);
}
[Test]
public void TranslateStringToItemFilterBlock_ShapedMap_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" ShapedMap false";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is ShapedMapBlockItem));
var blockItem = result.BlockItems.OfType<ShapedMapBlockItem>().First();
Assert.IsFalse(blockItem.BooleanValue);
}
[Test] [Test]
public void TranslateStringToItemFilterBlock_Identified_ReturnsCorrectObject() public void TranslateStringToItemFilterBlock_Identified_ReturnsCorrectObject()
{ {
@ -694,7 +745,7 @@ namespace Filtration.Parser.Tests.Services
// Assert // Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem)); Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem));
var blockItem = result.BlockItems.OfType<SoundBlockItem>().First(); var blockItem = result.BlockItems.OfType<SoundBlockItem>().First();
Assert.AreEqual(4, blockItem.Value); Assert.AreEqual("4", blockItem.Value);
Assert.AreEqual(79, blockItem.SecondValue); Assert.AreEqual(79, blockItem.SecondValue);
} }
@ -712,7 +763,43 @@ namespace Filtration.Parser.Tests.Services
// Assert // Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem)); Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem));
var blockItem = result.BlockItems.OfType<SoundBlockItem>().First(); var blockItem = result.BlockItems.OfType<SoundBlockItem>().First();
Assert.AreEqual(2, blockItem.Value); Assert.AreEqual("2", blockItem.Value);
Assert.AreEqual(95, blockItem.SecondValue);
}
[Test]
public void TranslateStringToItemFilterBlock_PlayAlertSoundPositionalWithoutVolume_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" PlayAlertSoundPositional 12";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is PositionalSoundBlockItem));
var blockItem = result.BlockItems.OfType<PositionalSoundBlockItem>().First();
Assert.AreEqual("12", blockItem.Value);
Assert.AreEqual(79, blockItem.SecondValue);
}
[Test]
public void TranslateStringToItemFilterBlock_PlayAlertSoundPositionalWithVolume_ReturnsCorrectObject()
{
// Arrange
var inputString = "Show" + Environment.NewLine +
" PlayAlertSoundPositional 7 95";
// Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
// Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is PositionalSoundBlockItem));
var blockItem = result.BlockItems.OfType<PositionalSoundBlockItem>().First();
Assert.AreEqual("7", blockItem.Value);
Assert.AreEqual(95, blockItem.SecondValue); Assert.AreEqual(95, blockItem.SecondValue);
} }
@ -730,6 +817,9 @@ namespace Filtration.Parser.Tests.Services
" Rarity <= Unique" + Environment.NewLine + " Rarity <= Unique" + Environment.NewLine +
" Identified True" + Environment.NewLine + " Identified True" + Environment.NewLine +
" Corrupted false" + Environment.NewLine + " Corrupted false" + Environment.NewLine +
" ElderItem true" + Environment.NewLine +
" ShaperItem False" + Environment.NewLine +
" ShapedMap TRUE" + Environment.NewLine +
@" Class ""My Item Class"" AnotherClass ""AndAnotherClass""" + Environment.NewLine + @" Class ""My Item Class"" AnotherClass ""AndAnotherClass""" + Environment.NewLine +
@" BaseType MyBaseType ""Another BaseType""" + Environment.NewLine + @" BaseType MyBaseType ""Another BaseType""" + Environment.NewLine +
" JunkLine Let's ignore this one!" + Environment.NewLine + " JunkLine Let's ignore this one!" + Environment.NewLine +
@ -741,7 +831,7 @@ namespace Filtration.Parser.Tests.Services
" SetBackgroundColor 255 100 5" + Environment.NewLine + " SetBackgroundColor 255 100 5" + Environment.NewLine +
" SetBorderColor 0 0 0" + Environment.NewLine + " SetBorderColor 0 0 0" + Environment.NewLine +
" SetFontSize 50" + Environment.NewLine + " SetFontSize 50" + Environment.NewLine +
" PlayAlertSound 3"; " PlayAlertSound 3" + Environment.NewLine;
// Act // Act
var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript); var result = _testUtility.Translator.TranslateStringToItemFilterBlock(inputString, _testUtility.MockItemFilterScript);
@ -758,6 +848,15 @@ namespace Filtration.Parser.Tests.Services
var identifiedBlockItem = result.BlockItems.OfType<IdentifiedBlockItem>().First(); var identifiedBlockItem = result.BlockItems.OfType<IdentifiedBlockItem>().First();
Assert.IsTrue(identifiedBlockItem.BooleanValue); Assert.IsTrue(identifiedBlockItem.BooleanValue);
var elderItemBlockItem = result.BlockItems.OfType<ElderItemBlockItem>().First();
Assert.IsTrue(elderItemBlockItem.BooleanValue);
var shaperItemBlockItem = result.BlockItems.OfType<ShaperItemBlockItem>().First();
Assert.IsFalse(shaperItemBlockItem.BooleanValue);
var shapedMapBlockItem = result.BlockItems.OfType<ShapedMapBlockItem>().First();
Assert.IsTrue(shapedMapBlockItem.BooleanValue);
var dropLevelblockItem = result.BlockItems.OfType<DropLevelBlockItem>().First(); var dropLevelblockItem = result.BlockItems.OfType<DropLevelBlockItem>().First();
Assert.AreEqual(FilterPredicateOperator.LessThan, dropLevelblockItem.FilterPredicate.PredicateOperator); Assert.AreEqual(FilterPredicateOperator.LessThan, dropLevelblockItem.FilterPredicate.PredicateOperator);
Assert.AreEqual(70, dropLevelblockItem.FilterPredicate.PredicateOperand); Assert.AreEqual(70, dropLevelblockItem.FilterPredicate.PredicateOperand);
@ -816,7 +915,7 @@ namespace Filtration.Parser.Tests.Services
Assert.AreEqual(50, fontSizeblockItem.Value); Assert.AreEqual(50, fontSizeblockItem.Value);
var soundblockItem = result.BlockItems.OfType<SoundBlockItem>().First(); var soundblockItem = result.BlockItems.OfType<SoundBlockItem>().First();
Assert.AreEqual(3, soundblockItem.Value); Assert.AreEqual("3", soundblockItem.Value);
Assert.AreEqual(79, soundblockItem.SecondValue); Assert.AreEqual(79, soundblockItem.SecondValue);
} }
@ -906,7 +1005,7 @@ namespace Filtration.Parser.Tests.Services
// Assert // Assert
Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem)); Assert.AreEqual(1, result.BlockItems.Count(b => b is SoundBlockItem));
var blockItem = result.BlockItems.OfType<SoundBlockItem>().First(); var blockItem = result.BlockItems.OfType<SoundBlockItem>().First();
Assert.AreEqual(2, blockItem.Value); Assert.AreEqual("2", blockItem.Value);
Assert.AreEqual(79, blockItem.SecondValue); Assert.AreEqual(79, blockItem.SecondValue);
} }
@ -1518,7 +1617,7 @@ namespace Filtration.Parser.Tests.Services
var expectedResult = "Show" + Environment.NewLine + var expectedResult = "Show" + Environment.NewLine +
" PlayAlertSound 2 50"; " PlayAlertSound 2 50";
_testUtility.TestBlock.BlockItems.Add(new SoundBlockItem(2, 50)); _testUtility.TestBlock.BlockItems.Add(new SoundBlockItem("2", 50));
// Act // Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock); var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
@ -1593,21 +1692,23 @@ namespace Filtration.Parser.Tests.Services
{ {
// Arrange // Arrange
var expectedResult = "Show" + Environment.NewLine + var expectedResult = "Show" + Environment.NewLine +
" LinkedSockets >= 4" + Environment.NewLine + " LinkedSockets >= 4" + Environment.NewLine +
" Sockets <= 6" + Environment.NewLine + " Sockets <= 6" + Environment.NewLine +
" Quality > 2" + Environment.NewLine + " Quality > 2" + Environment.NewLine +
" Identified True" + Environment.NewLine + " Identified True" + Environment.NewLine +
" Corrupted False" + Environment.NewLine + " Corrupted False" + Environment.NewLine +
" ElderItem True" + Environment.NewLine +
" ShaperItem False" + Environment.NewLine +
" ShapedMap True" + Environment.NewLine +
" Height <= 6" + Environment.NewLine + " Height <= 6" + Environment.NewLine +
" Height >= 2" + Environment.NewLine + " Height >= 2" + Environment.NewLine +
" Width = 3" + Environment.NewLine + " Width = 3" + Environment.NewLine +
" DropLevel > 56" + Environment.NewLine +
" Class \"Body Armour\" \"Gloves\" \"Belt\" \"Two Hand Axes\"" + Environment.NewLine +
" BaseType \"Greater Life Flask\" \"Simple Robe\" \"Full Wyrmscale\"" + Environment.NewLine +
" Rarity = Unique" + Environment.NewLine +
" ItemLevel > 70" + Environment.NewLine + " ItemLevel > 70" + Environment.NewLine +
" ItemLevel <= 85" + Environment.NewLine + " ItemLevel <= 85" + Environment.NewLine +
" DropLevel > 56" + Environment.NewLine +
" Rarity = Unique" + Environment.NewLine +
" Class \"Body Armour\" \"Gloves\" \"Belt\" \"Two Hand Axes\"" + Environment.NewLine +
" BaseType \"Greater Life Flask\" \"Simple Robe\" \"Full Wyrmscale\"" + Environment.NewLine +
" SetTextColor 255 89 0 56" + Environment.NewLine + " SetTextColor 255 89 0 56" + Environment.NewLine +
" SetBackgroundColor 0 0 0" + Environment.NewLine + " SetBackgroundColor 0 0 0" + Environment.NewLine +
" SetBorderColor 255 1 254" + Environment.NewLine + " SetBorderColor 255 1 254" + Environment.NewLine +
@ -1643,7 +1744,10 @@ namespace Filtration.Parser.Tests.Services
_testUtility.TestBlock.BlockItems.Add(new BackgroundColorBlockItem(new Color { A = 255, R = 0, G = 0, B = 0 })); _testUtility.TestBlock.BlockItems.Add(new BackgroundColorBlockItem(new Color { A = 255, R = 0, G = 0, B = 0 }));
_testUtility.TestBlock.BlockItems.Add(new BorderColorBlockItem(new Color { A = 255, R = 255, G = 1, B = 254 })); _testUtility.TestBlock.BlockItems.Add(new BorderColorBlockItem(new Color { A = 255, R = 255, G = 1, B = 254 }));
_testUtility.TestBlock.BlockItems.Add(new FontSizeBlockItem(50)); _testUtility.TestBlock.BlockItems.Add(new FontSizeBlockItem(50));
_testUtility.TestBlock.BlockItems.Add(new SoundBlockItem(6, 90)); _testUtility.TestBlock.BlockItems.Add(new SoundBlockItem("6", 90));
_testUtility.TestBlock.BlockItems.Add(new ElderItemBlockItem(true));
_testUtility.TestBlock.BlockItems.Add(new ShaperItemBlockItem(false));
_testUtility.TestBlock.BlockItems.Add(new ShapedMapBlockItem(true));
// Act // Act
var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock); var result = _testUtility.Translator.TranslateItemFilterBlockToString(_testUtility.TestBlock);
@ -1679,7 +1783,7 @@ namespace Filtration.Parser.Tests.Services
var testInputString = "PlayAlertSound 7 280"; var testInputString = "PlayAlertSound 7 280";
var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>(); var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>();
var testInputBlockItem = new SoundBlockItem(12,30); var testInputBlockItem = new SoundBlockItem("12",30);
testInputBlockItems.Add(testInputBlockItem); testInputBlockItems.Add(testInputBlockItem);
// Act // Act
@ -1689,7 +1793,7 @@ namespace Filtration.Parser.Tests.Services
var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem; var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem;
Assert.IsNotNull(soundBlockItem); Assert.IsNotNull(soundBlockItem);
Assert.AreNotSame(testInputBlockItem, soundBlockItem); Assert.AreNotSame(testInputBlockItem, soundBlockItem);
Assert.AreEqual(7, soundBlockItem.Value); Assert.AreEqual("7", soundBlockItem.Value);
Assert.AreEqual(280, soundBlockItem.SecondValue); Assert.AreEqual(280, soundBlockItem.SecondValue);
} }
@ -1746,7 +1850,7 @@ namespace Filtration.Parser.Tests.Services
var testInputTextColorBlockItem = new TextColorBlockItem(Colors.Red); var testInputTextColorBlockItem = new TextColorBlockItem(Colors.Red);
var testInputBackgroundColorBlockItem = new BackgroundColorBlockItem(Colors.Blue); var testInputBackgroundColorBlockItem = new BackgroundColorBlockItem(Colors.Blue);
var testInputBorderColorBlockItem = new BorderColorBlockItem(Colors.Yellow); var testInputBorderColorBlockItem = new BorderColorBlockItem(Colors.Yellow);
var testInputSoundBlockItem = new SoundBlockItem(1, 1); var testInputSoundBlockItem = new SoundBlockItem("1", 1);
testInputBlockItems.Add(testInputTextColorBlockItem); testInputBlockItems.Add(testInputTextColorBlockItem);
testInputBlockItems.Add(testInputBackgroundColorBlockItem); testInputBlockItems.Add(testInputBackgroundColorBlockItem);
@ -1775,7 +1879,7 @@ namespace Filtration.Parser.Tests.Services
var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem; var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem;
Assert.IsNotNull(soundBlockItem); Assert.IsNotNull(soundBlockItem);
Assert.AreNotSame(testInputSoundBlockItem, soundBlockItem); Assert.AreNotSame(testInputSoundBlockItem, soundBlockItem);
Assert.AreEqual(7, soundBlockItem.Value); Assert.AreEqual("7", soundBlockItem.Value);
Assert.AreEqual(280, soundBlockItem.SecondValue); Assert.AreEqual(280, soundBlockItem.SecondValue);
} }
@ -1808,7 +1912,7 @@ namespace Filtration.Parser.Tests.Services
var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem; var soundBlockItem = testInputBlockItems.First(b => b is SoundBlockItem) as SoundBlockItem;
Assert.IsNotNull(soundBlockItem); Assert.IsNotNull(soundBlockItem);
Assert.AreEqual(7, soundBlockItem.Value); Assert.AreEqual("7", soundBlockItem.Value);
Assert.AreEqual(280, soundBlockItem.SecondValue); Assert.AreEqual(280, soundBlockItem.SecondValue);
} }

View File

@ -145,6 +145,21 @@ namespace Filtration.Parser.Services
AddBooleanItemToBlockItems<IdentifiedBlockItem>(block, trimmedLine); AddBooleanItemToBlockItems<IdentifiedBlockItem>(block, trimmedLine);
break; break;
} }
case "ElderItem":
{
AddBooleanItemToBlockItems<ElderItemBlockItem>(block, trimmedLine);
break;
}
case "ShaperItem":
{
AddBooleanItemToBlockItems<ShaperItemBlockItem>(block, trimmedLine);
break;
}
case "ShapedMap":
{
AddBooleanItemToBlockItems<ShapedMapBlockItem>(block, trimmedLine);
break;
}
case "Sockets": case "Sockets":
{ {
AddNumericFilterPredicateItemToBlockItems<SocketsBlockItem>(block, trimmedLine); AddNumericFilterPredicateItemToBlockItems<SocketsBlockItem>(block, trimmedLine);
@ -208,40 +223,47 @@ namespace Filtration.Parser.Services
break; break;
} }
case "PlayAlertSound": case "PlayAlertSound":
case "PlayAlertSoundPositional":
{ {
// Only ever use the last PlayAlertSound item encountered as multiples aren't valid. // Only ever use the last PlayAlertSound item encountered as multiples aren't valid.
RemoveExistingBlockItemsOfType<SoundBlockItem>(block); RemoveExistingBlockItemsOfType<SoundBlockItem>(block);
RemoveExistingBlockItemsOfType<PositionalSoundBlockItem>(block);
var matches = Regex.Matches(trimmedLine, @"\s+(\d+)"); var match = Regex.Match(trimmedLine, @"\S+\s+(\S+)\s?(\d+)?");
switch (matches.Count)
{ if (match.Success)
case 1: {
{ string firstValue = match.Groups[1].Value;
if (matches[0].Success) int secondValue;
{
var blockItemValue = new SoundBlockItem if (match.Groups[2].Success)
{ {
Value = Convert.ToInt16(matches[0].Value), secondValue = Convert.ToInt16(match.Groups[2].Value);
SecondValue = 79 }
}; else
block.BlockItems.Add(blockItemValue); {
} secondValue = 79;
break; }
}
case 2: if (lineOption == "PlayAlertSound")
{ {
if (matches[0].Success && matches[1].Success) var blockItemValue = new SoundBlockItem
{ {
var blockItemValue = new SoundBlockItem Value = firstValue,
{ SecondValue = secondValue
Value = Convert.ToInt16(matches[0].Value), };
SecondValue = Convert.ToInt16(matches[1].Value) block.BlockItems.Add(blockItemValue);
}; }
block.BlockItems.Add(blockItemValue); else
} {
break; var blockItemValue = new PositionalSoundBlockItem
} {
} Value = firstValue,
SecondValue = secondValue
};
block.BlockItems.Add(blockItemValue);
}
}
break; break;
} }
} }
@ -368,9 +390,9 @@ namespace Filtration.Parser.Services
{ {
case "PlayAlertSound": case "PlayAlertSound":
{ {
var match = Regex.Match(line, @"\s+(\d+) (\d+)"); var match = Regex.Match(line, @"\s+(\S+) (\d+)");
if (!match.Success) break; if (!match.Success) break;
blockItems.Add(new SoundBlockItem(Convert.ToInt16(match.Groups[1].Value), Convert.ToInt16(match.Groups[2].Value))); blockItems.Add(new SoundBlockItem(match.Groups[1].Value, Convert.ToInt16(match.Groups[2].Value)));
break; break;
} }
case "SetTextColor": case "SetTextColor":

File diff suppressed because it is too large Load Diff

View File

@ -1,164 +1,317 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.42000 // Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Filtration.Properties { namespace Filtration.Properties {
using System; using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder // This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources() {
} }
/// <summary> /// <summary>
/// Returns the cached ResourceManager instance used by this class. /// Returns the cached ResourceManager instance used by this class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Filtration.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Filtration.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;
} }
} }
/// <summary> /// <summary>
/// Overrides the current thread's CurrentUICulture property for all /// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class. /// resource lookups using this strongly typed resource class.
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture {
get { get {
return resourceCulture; return resourceCulture;
} }
set { set {
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound1 { internal static System.IO.UnmanagedMemoryStream AlertSound_01 {
get { get {
return ResourceManager.GetStream("AlertSound1", resourceCulture); return ResourceManager.GetStream("AlertSound_01", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound2 { internal static System.IO.UnmanagedMemoryStream AlertSound_02 {
get { get {
return ResourceManager.GetStream("AlertSound2", resourceCulture); return ResourceManager.GetStream("AlertSound_02", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound3 { internal static System.IO.UnmanagedMemoryStream AlertSound_03 {
get { get {
return ResourceManager.GetStream("AlertSound3", resourceCulture); return ResourceManager.GetStream("AlertSound_03", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound4 { internal static System.IO.UnmanagedMemoryStream AlertSound_04 {
get { get {
return ResourceManager.GetStream("AlertSound4", resourceCulture); return ResourceManager.GetStream("AlertSound_04", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound5 { internal static System.IO.UnmanagedMemoryStream AlertSound_05 {
get { get {
return ResourceManager.GetStream("AlertSound5", resourceCulture); return ResourceManager.GetStream("AlertSound_05", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound6 { internal static System.IO.UnmanagedMemoryStream AlertSound_06 {
get { get {
return ResourceManager.GetStream("AlertSound6", resourceCulture); return ResourceManager.GetStream("AlertSound_06", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound7 { internal static System.IO.UnmanagedMemoryStream AlertSound_07 {
get { get {
return ResourceManager.GetStream("AlertSound7", resourceCulture); return ResourceManager.GetStream("AlertSound_07", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound8 { internal static System.IO.UnmanagedMemoryStream AlertSound_08 {
get { get {
return ResourceManager.GetStream("AlertSound8", resourceCulture); return ResourceManager.GetStream("AlertSound_08", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound9 { internal static System.IO.UnmanagedMemoryStream AlertSound_09 {
get { get {
return ResourceManager.GetStream("AlertSound9", resourceCulture); return ResourceManager.GetStream("AlertSound_09", resourceCulture);
} }
} }
/// <summary> /// <summary>
/// Looks up a localized resource of type System.Byte[]. /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary> /// </summary>
internal static byte[] Fontin_SmallCaps { internal static System.IO.UnmanagedMemoryStream AlertSound_10 {
get { get {
object obj = ResourceManager.GetObject("Fontin_SmallCaps", resourceCulture); return ResourceManager.GetStream("AlertSound_10", resourceCulture);
return ((byte[])(obj)); }
} }
}
/// <summary>
/// <summary> /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary>
/// </summary> internal static System.IO.UnmanagedMemoryStream AlertSound_11 {
internal static System.Drawing.Bitmap groundtile { get {
get { return ResourceManager.GetStream("AlertSound_11", resourceCulture);
object obj = ResourceManager.GetObject("groundtile", resourceCulture); }
return ((System.Drawing.Bitmap)(obj)); }
}
} /// <summary>
} /// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
} /// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound_12 {
get {
return ResourceManager.GetStream("AlertSound_12", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound_13 {
get {
return ResourceManager.GetStream("AlertSound_13", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound_14 {
get {
return ResourceManager.GetStream("AlertSound_14", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound_15 {
get {
return ResourceManager.GetStream("AlertSound_15", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream AlertSound_16 {
get {
return ResourceManager.GetStream("AlertSound_16", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Byte[].
/// </summary>
internal static byte[] Fontin_SmallCaps {
get {
object obj = ResourceManager.GetObject("Fontin_SmallCaps", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap groundtile {
get {
object obj = ResourceManager.GetObject("groundtile", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Alchemy {
get {
return ResourceManager.GetStream("SH22Alchemy", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Blessed {
get {
return ResourceManager.GetStream("SH22Blessed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Chaos {
get {
return ResourceManager.GetStream("SH22Chaos", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Divine {
get {
return ResourceManager.GetStream("SH22Divine", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Exalted {
get {
return ResourceManager.GetStream("SH22Exalted", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Fusing {
get {
return ResourceManager.GetStream("SH22Fusing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22General {
get {
return ResourceManager.GetStream("SH22General", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Mirror {
get {
return ResourceManager.GetStream("SH22Mirror", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Regal {
get {
return ResourceManager.GetStream("SH22Regal", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.IO.UnmanagedMemoryStream similar to System.IO.MemoryStream.
/// </summary>
internal static System.IO.UnmanagedMemoryStream SH22Vaal {
get {
return ResourceManager.GetStream("SH22Vaal", resourceCulture);
}
}
}
}

View File

@ -1,154 +1,205 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
Version 2.0 Version 2.0
The primary goals of this format is to allow a simple XML format The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes various data types are done through the TypeConverter classes
associated with the data types. associated with the data types.
Example: Example:
... ado.net/XML headers & schema ... ... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader> <resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader> <resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value> <value>[base64 mime encoded serialized .NET Framework object]</value>
</data> </data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment> <comment>This is a comment</comment>
</data> </data>
There are any number of "resheader" rows that contain simple There are any number of "resheader" rows that contain simple
name/value pairs. name/value pairs.
Each data row contains a name, and value. The row also contains a Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture. text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the Classes that don't support this are serialized and stored with the
mimetype set. mimetype set.
The mimetype is used for serialized objects, and tells the The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly: extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below. read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64 mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter : using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata"> <xsd:element name="metadata">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
<xsd:complexType> <xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" /> <xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="data"> <xsd:element name="data">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" /> <xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" /> <xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:choice> </xsd:choice>
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
</xsd:schema> </xsd:schema>
<resheader name="resmimetype"> <resheader name="resmimetype">
<value>text/microsoft-resx</value> <value>text/microsoft-resx</value>
</resheader> </resheader>
<resheader name="version"> <resheader name="version">
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="AlertSound1" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_01" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound1.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_01.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound2" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_02" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound2.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_02.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound3" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_03" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound3.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_03.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound4" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_04" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound4.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_04.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound5" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_05" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound5.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_05.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound6" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_06" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound6.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_06.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound7" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound7.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_07.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound8" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_08" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound8.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_08.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound9" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_09" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound9.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_09.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="Fontin_SmallCaps" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_10" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Fontin-SmallCaps.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>..\Resources\AlertSounds\AlertSound_10.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="groundtile" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="AlertSound_11" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\groundtile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\AlertSounds\AlertSound_11.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="AlertSound_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound_12.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="AlertSound_13" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound_13.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="AlertSound_14" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound_14.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="AlertSound_15" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound_15.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="AlertSound_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\AlertSound_16.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Fontin_SmallCaps" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Fontin-SmallCaps.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="groundtile" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\groundtile.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="SH22Alchemy" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Alchemy.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Blessed" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Blessed.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Chaos" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Chaos.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Divine" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Divine.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Exalted" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Exalted.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Fusing" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Fusing.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22General" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22General.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Mirror" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Mirror.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Regal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Regal.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="SH22Vaal" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\AlertSounds\SH22Vaal.wav;System.IO.MemoryStream, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root> </root>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,18 @@
Abyss Jewel
Active Skill Gems Active Skill Gems
Amulets Amulets
Axe
Belts Belts
Body Armours Body Armours
Boots Boots
Bows Bows
Claws Claws
Critical Utility Flasks
Currency Currency
Daggers Daggers
Divination Card Divination Card
Fishing Rods Fishing Rods
Flasks
Gems
Gloves Gloves
Helmets Helmets
Hybrid Flasks Hybrid Flasks
@ -18,23 +21,27 @@ Labyrinth Item
Labyrinth Map Item Labyrinth Map Item
Labyrinth Trinket Labyrinth Trinket
Large Relics Large Relics
Leaguestone
Life Flasks Life Flasks
Mace
Mana Flasks Mana Flasks
Map Fragments Map Fragments
Maps Maps
Medium Relics Misc Map Items
One Hand Axes One Hand Axes
One Hand Maces One Hand Maces
One Hand Swords One Hand Swords
Pantheon Soul
Piece
Quest Items Quest Items
Quivers Quivers
Rings Rings
Sceptres Sceptres
Shields Shields
Small Relics
Stackable Currency Stackable Currency
Staves Staves
Support Skill Gems Support Skill Gems
Sword
Thrusting One Hand Swords Thrusting One Hand Swords
Two Hand Axes Two Hand Axes
Two Hand Maces Two Hand Maces

View File

@ -13,11 +13,11 @@
xmlns:views="clr-namespace:Filtration.Views" xmlns:views="clr-namespace:Filtration.Views"
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=userControls:BlockItemControl}" d:DataContext="{d:DesignInstance Type=userControls:BlockItemControl}"
d:DesignHeight="200" d:DesignWidth="160"> d:DesignHeight="200" d:DesignWidth="190">
<UserControl.Resources> <UserControl.Resources>
<commonConverters:BooleanInverterConverter x:Key="BooleanInverterConverter"></commonConverters:BooleanInverterConverter> <commonConverters:BooleanInverterConverter x:Key="BooleanInverterConverter"></commonConverters:BooleanInverterConverter>
</UserControl.Resources> </UserControl.Resources>
<Border Style="{StaticResource BlockItemBorder}" Width="150"> <Border Style="{StaticResource BlockItemBorder}" Width="180">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -115,6 +115,17 @@
<xctk:ShortUpDown Value="{Binding Path=SecondValue}" Minimum="1" Maximum="300" HorizontalAlignment="Right" ToolTip="Volume"/> <xctk:ShortUpDown Value="{Binding Path=SecondValue}" Minimum="1" Maximum="300" HorizontalAlignment="Right" ToolTip="Volume"/>
</WrapPanel> </WrapPanel>
</DataTemplate> </DataTemplate>
<!-- Positional Sound Template -->
<DataTemplate DataType="{x:Type blockItemTypes:PositionalSoundBlockItem}">
<WrapPanel HorizontalAlignment="Left">
<Button Command="{Binding Path=DataContext.PlayPositionalSoundCommand, RelativeSource={RelativeSource AncestorType={x:Type views:ItemFilterBlockView}}}" Width="20" Height="20" Background="Transparent" BorderBrush="Transparent">
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
<ComboBox ItemsSource="{Binding ElementName=BlockItemContentControl, Path=DataContext.SoundsAvailable}" SelectedValue="{Binding Value}" Style="{StaticResource MetroComboBox}" />
<xctk:ShortUpDown Value="{Binding Path=SecondValue}" Minimum="1" Maximum="300" HorizontalAlignment="Right" ToolTip="Volume"/>
</WrapPanel>
</DataTemplate>
</ContentControl.Resources> </ContentControl.Resources>
</ContentControl> </ContentControl>
</Grid> </Grid>

View File

@ -82,7 +82,11 @@ namespace Filtration.UserControls
public ObservableCollection<ColorItem> AvailableColors => PathOfExileColors.DefaultColors; public ObservableCollection<ColorItem> AvailableColors => PathOfExileColors.DefaultColors;
public List<int> SoundsAvailable => new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; public List<string> SoundsAvailable => new List<string> {
"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16",
"ShGeneral", "ShBlessed", "ShChaos", "ShDivine", "ShExalted", "ShMirror", "ShAlchemy",
"ShFusing", "ShRegal", "ShVaal"
};
private void OnSetBlockColorCommmand() private void OnSetBlockColorCommmand()
{ {

View File

@ -56,6 +56,7 @@ namespace Filtration.ViewModels
RemoveFilterBlockItemCommand = new RelayCommand<IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand); RemoveFilterBlockItemCommand = new RelayCommand<IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand);
SwitchBlockItemsViewCommand = new RelayCommand(OnSwitchBlockItemsViewCommand); SwitchBlockItemsViewCommand = new RelayCommand(OnSwitchBlockItemsViewCommand);
PlaySoundCommand = new RelayCommand(OnPlaySoundCommand, () => HasSound); PlaySoundCommand = new RelayCommand(OnPlaySoundCommand, () => HasSound);
PlayPositionalSoundCommand = new RelayCommand(OnPlayPositionalSoundCommand, () => HasPositionalSound);
} }
public override void Initialise(IItemFilterBlockBase itemFilterBlockBase, IItemFilterScriptViewModel parentScriptViewModel) public override void Initialise(IItemFilterBlockBase itemFilterBlockBase, IItemFilterScriptViewModel parentScriptViewModel)
@ -97,6 +98,7 @@ namespace Filtration.ViewModels
public RelayCommand<Type> AddFilterBlockItemCommand { get; } public RelayCommand<Type> AddFilterBlockItemCommand { get; }
public RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; } public RelayCommand<IItemFilterBlockItem> RemoveFilterBlockItemCommand { get; }
public RelayCommand PlaySoundCommand { get; } public RelayCommand PlaySoundCommand { get; }
public RelayCommand PlayPositionalSoundCommand { get; }
public RelayCommand SwitchBlockItemsViewCommand { get; } public RelayCommand SwitchBlockItemsViewCommand { get; }
public IItemFilterBlock Block { get; private set; } public IItemFilterBlock Block { get; private set; }
@ -173,7 +175,10 @@ namespace Filtration.ViewModels
typeof (ClassBlockItem), typeof (ClassBlockItem),
typeof (BaseTypeBlockItem), typeof (BaseTypeBlockItem),
typeof (IdentifiedBlockItem), typeof (IdentifiedBlockItem),
typeof (CorruptedBlockItem) typeof (CorruptedBlockItem),
typeof (ElderItemBlockItem),
typeof (ShaperItemBlockItem),
typeof (ShapedMapBlockItem)
}; };
public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type> public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type>
@ -182,7 +187,8 @@ namespace Filtration.ViewModels
typeof (BackgroundColorBlockItem), typeof (BackgroundColorBlockItem),
typeof (BorderColorBlockItem), typeof (BorderColorBlockItem),
typeof (FontSizeBlockItem), typeof (FontSizeBlockItem),
typeof (SoundBlockItem) typeof (SoundBlockItem),
typeof (PositionalSoundBlockItem)
}; };
public bool BlockEnabled public bool BlockEnabled
@ -224,7 +230,8 @@ namespace Filtration.ViewModels
public double DisplayFontSize => Block.DisplayFontSize/1.8; public double DisplayFontSize => Block.DisplayFontSize/1.8;
public bool HasSound => Block.HasBlockItemOfType<SoundBlockItem>(); public bool HasSound => Block.HasBlockItemOfType<SoundBlockItem>();
public bool HasPositionalSound => Block.HasBlockItemOfType<PositionalSoundBlockItem>();
public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any(); public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any();
private void OnSwitchBlockItemsViewCommand() private void OnSwitchBlockItemsViewCommand()
@ -331,11 +338,97 @@ namespace Filtration.ViewModels
return blockCount < blockItem.MaximumAllowed; return blockCount < blockItem.MaximumAllowed;
} }
private string ComputeFilePartFromNumber(string identifier)
{
if (Int32.TryParse(identifier, out int x))
{
if (x <= 9)
{
return "AlertSound_0" + x + ".wav";
}
else
{
return "AlertSound_" + x + ".wav";
}
}
return "";
}
private string ComputeFilePartFromID(string identifier)
{
string filePart;
switch (identifier) {
case "ShGeneral":
filePart = "SH22General.wav";
break;
case "ShBlessed":
filePart = "SH22Blessed.wav";
break;
case "SH22Chaos":
filePart = "SH22Chaos.wav";
break;
case "ShDivine":
filePart = "SH22Divine.wav";
break;
case "ShExalted":
filePart = "SH22Exalted.wav";
break;
case "ShMirror":
filePart = "SH22Mirror.wav";
break;
case "ShAlchemy":
filePart = "SH22Alchemy.wav";
break;
case "ShFusing":
filePart = "SH22Fusing.wav";
break;
case "ShRegal":
filePart = "SH22Regal.wav";
break;
case "ShVaal":
filePart = "SH22Vaal.wav";
break;
default:
filePart = ComputeFilePartFromNumber(identifier);
break;
}
return filePart;
}
private void OnPlaySoundCommand() private void OnPlaySoundCommand()
{ {
var soundUri = "Resources/AlertSounds/AlertSound" + BlockItems.OfType<SoundBlockItem>().First().Value + ".wav"; var identifier = BlockItems.OfType<SoundBlockItem>().First().Value;
_mediaPlayer.Open(new Uri(soundUri, UriKind.Relative)); var prefix = "Resources/AlertSounds/";
_mediaPlayer.Play(); var filePart = ComputeFilePartFromID(identifier);
if (filePart == "")
{
return;
}
else
{
_mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative));
_mediaPlayer.Play();
}
}
private void OnPlayPositionalSoundCommand()
{
var identifier = BlockItems.OfType<PositionalSoundBlockItem>().First().Value;
var prefix = "Resources/AlertSounds/";
var filePart = ComputeFilePartFromID(identifier);
if (filePart == "")
{
return;
}
else
{
_mediaPlayer.Open(new Uri(prefix + filePart, UriKind.Relative));
_mediaPlayer.Play();
}
} }
private void OnBlockItemChanged(object sender, EventArgs e) private void OnBlockItemChanged(object sender, EventArgs e)

View File

@ -129,7 +129,7 @@
<!-- Item Preview Box --> <!-- Item Preview Box -->
<WrapPanel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center"> <WrapPanel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center">
<Button Command="{Binding PlaySoundCommand}" <Button Command="{Binding PlaySoundCommand}"
Width="25" Width="25"
Height="25" Height="25"
VerticalAlignment="Center" VerticalAlignment="Center"
@ -141,6 +141,18 @@
ToolTip="Click to preview drop sound"> ToolTip="Click to preview drop sound">
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" /> <Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button> </Button>
<Button Command="{Binding PlayPositionalSoundCommand}"
Width="25"
Height="25"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Margin="0,0,3,0"
Visibility="{Binding HasPositionalSound, Converter={StaticResource BooleanVisibilityConverter}}"
Background="Transparent"
BorderBrush="Transparent"
ToolTip="Click to preview drop sound">
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
</Button>
<ToggleButton Margin="0,2,2,2" <ToggleButton Margin="0,2,2,2"
Style="{StaticResource ChromelessToggleButton}" Style="{StaticResource ChromelessToggleButton}"
x:Name="ItemPreviewButton" x:Name="ItemPreviewButton"

View File

@ -38,9 +38,9 @@ namespace Filtration.Views
} }
} }
private void MainWindow_OnClosing(object sender, CancelEventArgs e) private async void MainWindow_OnClosing(object sender, CancelEventArgs e)
{ {
var allDocumentsClosed = _mainWindowViewModel.CloseAllDocumentsAsync().Result; var allDocumentsClosed = await _mainWindowViewModel.CloseAllDocumentsAsync();
if (!allDocumentsClosed) if (!allDocumentsClosed)
{ {
e.Cancel = true; e.Cancel = true;