Compare commits
30 Commits
1.1.0-beta
...
1.2.0-beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c44d7b6095 | ||
|
|
717a0a83a9 | ||
|
|
1f9a1c5196 | ||
|
|
dea0378a16 | ||
|
|
4862452188 | ||
|
|
db258de11e | ||
|
|
444f09751a | ||
|
|
9356f55209 | ||
|
|
fb7bd8b81e | ||
|
|
72ed517929 | ||
|
|
290547cbba | ||
|
|
065e56e0a6 | ||
|
|
d686e6da39 | ||
|
|
79398667b4 | ||
|
|
2424ab9195 | ||
|
|
491f448f94 | ||
|
|
2f49e85227 | ||
|
|
dce0af7fd6 | ||
|
|
208aeb39f6 | ||
|
|
79274df0fb | ||
|
|
4052d6e020 | ||
|
|
7c0da57570 | ||
|
|
557767f4dc | ||
|
|
cde2d692c9 | ||
|
|
c96aa472d9 | ||
|
|
d4e8a72d47 | ||
|
|
4c826f42fd | ||
|
|
4022cf12a0 | ||
|
|
8073948cfe | ||
|
|
f331bffee7 |
@@ -8,7 +8,7 @@ namespace Filtration.Interface
|
|||||||
{
|
{
|
||||||
bool IsScript { get; }
|
bool IsScript { get; }
|
||||||
bool IsTheme { get; }
|
bool IsTheme { get; }
|
||||||
Task Close();
|
Task<bool> Close();
|
||||||
RelayCommand CloseCommand { get; }
|
RelayCommand CloseCommand { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class AnyEnchantmentBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public AnyEnchantmentBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public AnyEnchantmentBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "AnyEnchantment";
|
||||||
|
public override string DisplayHeading => "Any Enchantment";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.YellowGreen;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.AnyEnchantment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class FracturedItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public FracturedItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public FracturedItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "FracturedItem";
|
||||||
|
public override string DisplayHeading => "Fractured Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Salmon;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.FracturedItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public class HasEnchantmentBlockItem : StringListBlockItem
|
||||||
|
{
|
||||||
|
public override string PrefixText => "HasEnchantment";
|
||||||
|
public override int MaximumAllowed => 1;
|
||||||
|
public override string DisplayHeading => "Has Enchantment";
|
||||||
|
|
||||||
|
public override string SummaryText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Items.Count > 0 && Items.Count < 4)
|
||||||
|
{
|
||||||
|
return "Enchantments: " +
|
||||||
|
Items.Aggregate(string.Empty, (current, i) => current + i + ", ").TrimEnd(' ').TrimEnd(',');
|
||||||
|
}
|
||||||
|
if (Items.Count >= 4)
|
||||||
|
{
|
||||||
|
var remaining = Items.Count - 3;
|
||||||
|
return "Enchantments: " + Items.Take(3)
|
||||||
|
.Aggregate(string.Empty, (current, i) => current + i + ", ")
|
||||||
|
.TrimEnd(' ')
|
||||||
|
.TrimEnd(',') + " (+" + remaining + " more)";
|
||||||
|
}
|
||||||
|
return "Enchantments: (none)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Color SummaryBackgroundColor => Colors.PaleGreen;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.HasEnchantment;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,6 +23,6 @@ namespace Filtration.ObjectModel.BlockItemTypes
|
|||||||
public override Color SummaryTextColor => Colors.White;
|
public override Color SummaryTextColor => Colors.White;
|
||||||
public override BlockItemOrdering SortOrder => BlockItemOrdering.Quality;
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.Quality;
|
||||||
public override int Minimum => 0;
|
public override int Minimum => 0;
|
||||||
public override int Maximum => 30;
|
public override int Maximum => 99;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.Windows.Media;
|
||||||
|
using Filtration.ObjectModel.BlockItemBaseTypes;
|
||||||
|
using Filtration.ObjectModel.Enums;
|
||||||
|
|
||||||
|
namespace Filtration.ObjectModel.BlockItemTypes
|
||||||
|
{
|
||||||
|
public sealed class SynthesisedItemBlockItem : BooleanBlockItem
|
||||||
|
{
|
||||||
|
public SynthesisedItemBlockItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public SynthesisedItemBlockItem(bool booleanValue) : base(booleanValue)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string PrefixText => "SynthesisedItem";
|
||||||
|
public override string DisplayHeading => "Synthesised Item";
|
||||||
|
public override Color SummaryBackgroundColor => Colors.Salmon;
|
||||||
|
public override Color SummaryTextColor => Colors.Black;
|
||||||
|
public override BlockItemOrdering SortOrder => BlockItemOrdering.SynthesisedItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,9 @@ namespace Filtration.ObjectModel.Enums
|
|||||||
Corrupted,
|
Corrupted,
|
||||||
ElderItem,
|
ElderItem,
|
||||||
ShaperItem,
|
ShaperItem,
|
||||||
|
SynthesisedItem,
|
||||||
|
FracturedItem,
|
||||||
|
AnyEnchantment,
|
||||||
MapTier,
|
MapTier,
|
||||||
ShapedMap,
|
ShapedMap,
|
||||||
ElderMap,
|
ElderMap,
|
||||||
@@ -27,6 +30,7 @@ namespace Filtration.ObjectModel.Enums
|
|||||||
BaseType,
|
BaseType,
|
||||||
Prophecy,
|
Prophecy,
|
||||||
HasExplicitMod,
|
HasExplicitMod,
|
||||||
|
HasEnchantment,
|
||||||
SetTextColor,
|
SetTextColor,
|
||||||
SetBackgroundColor,
|
SetBackgroundColor,
|
||||||
SetBorderColor,
|
SetBorderColor,
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ namespace Filtration.ObjectModel.Enums
|
|||||||
{
|
{
|
||||||
public enum ItemRarity
|
public enum ItemRarity
|
||||||
{
|
{
|
||||||
[Description("Not Set")]
|
|
||||||
NotSet,
|
|
||||||
[Description("Normal")]
|
[Description("Normal")]
|
||||||
Normal,
|
Normal,
|
||||||
[Description("Magic")]
|
[Description("Magic")]
|
||||||
|
|||||||
@@ -16,23 +16,20 @@ namespace Filtration.ObjectModel.Extensions
|
|||||||
}
|
}
|
||||||
case ItemRarity.Normal:
|
case ItemRarity.Normal:
|
||||||
{
|
{
|
||||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
|
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
|
||||||
}
|
}
|
||||||
case ItemRarity.Rare:
|
case ItemRarity.Rare:
|
||||||
{
|
{
|
||||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.RareItem];
|
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.RareItem];
|
||||||
}
|
}
|
||||||
case ItemRarity.Unique:
|
case ItemRarity.Unique:
|
||||||
{
|
{
|
||||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.UniqueItem];
|
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.UniqueItem];
|
||||||
}
|
|
||||||
case ItemRarity.NotSet:
|
|
||||||
{
|
|
||||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.QuestItem];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
{
|
||||||
throw new ArgumentOutOfRangeException(nameof(itemRarity), itemRarity, null);
|
throw new ArgumentOutOfRangeException(nameof(itemRarity), itemRarity, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,8 +81,11 @@
|
|||||||
<Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" />
|
<Compile Include="BlockItemBaseTypes\IntegerBlockItem.cs" />
|
||||||
<Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" />
|
<Compile Include="BlockItemBaseTypes\NumericFilterPredicateBlockItem.cs" />
|
||||||
<Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" />
|
<Compile Include="BlockItemBaseTypes\StringListBlockItem.cs" />
|
||||||
|
<Compile Include="BlockItemTypes\AnyEnchantmentBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" />
|
<Compile Include="BlockItemTypes\BackgroundColorBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
|
<Compile Include="BlockItemTypes\BaseTypeBlockItem.cs" />
|
||||||
|
<Compile Include="BlockItemTypes\FracturedItemBlockItem.cs" />
|
||||||
|
<Compile Include="BlockItemTypes\HasEnchantmentBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\MapTierBlockItem.cs" />
|
<Compile Include="BlockItemTypes\MapTierBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\PlayEffectBlockItem.cs" />
|
<Compile Include="BlockItemTypes\PlayEffectBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
|
<Compile Include="BlockItemTypes\BorderColorBlockItem.cs" />
|
||||||
@@ -95,6 +98,7 @@
|
|||||||
<Compile Include="BlockItemTypes\MapIconBlockItem.cs" />
|
<Compile Include="BlockItemTypes\MapIconBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\ProphecyBlockItem.cs" />
|
<Compile Include="BlockItemTypes\ProphecyBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
|
<Compile Include="BlockItemTypes\ShapedMapBlockItem.cs" />
|
||||||
|
<Compile Include="BlockItemTypes\SynthesisedItemBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
|
<Compile Include="BlockItemTypes\ShaperItemBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
|
<Compile Include="BlockItemTypes\ElderItemBlockItem.cs" />
|
||||||
<Compile Include="BlockItemTypes\CorruptedBlockItem.cs" />
|
<Compile Include="BlockItemTypes\CorruptedBlockItem.cs" />
|
||||||
|
|||||||
@@ -121,10 +121,8 @@ namespace Filtration.ObjectModel
|
|||||||
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.QuestItem];
|
return PathOfExileNamedColors.Colors[PathOfExileNamedColor.QuestItem];
|
||||||
}
|
}
|
||||||
|
|
||||||
return ItemRarity != ItemRarity.NotSet ? ItemRarity.DefaultRarityTextColor() : PathOfExileNamedColors.Colors[PathOfExileNamedColor.WhiteItem];
|
return ItemRarity.DefaultRarityTextColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ namespace Filtration.ObjectModel
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
var borderColorBlockItem = BlockItems.OfType<BorderColorBlockItem>().FirstOrDefault();
|
var borderColorBlockItem = BlockItems.OfType<BorderColorBlockItem>().FirstOrDefault();
|
||||||
return borderColorBlockItem?.Color ?? new Color { A = 240, R = 0, G = 0, B = 0 };
|
return borderColorBlockItem?.Color ?? new Color { A = 0, R = 255, G = 255, B = 255 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -322,7 +322,13 @@ namespace Filtration.Parser.Tests.Services
|
|||||||
Environment.NewLine +
|
Environment.NewLine +
|
||||||
"Show" + Environment.NewLine +
|
"Show" + Environment.NewLine +
|
||||||
" ItemLevel > 20" + Environment.NewLine +
|
" ItemLevel > 20" + Environment.NewLine +
|
||||||
" SetTextColor 255 255 0";
|
" SetTextColor 255 255 0" + Environment.NewLine +
|
||||||
|
Environment.NewLine +
|
||||||
|
"#Show $Recipes->Glassblower->15% %D1" + Environment.NewLine +
|
||||||
|
"# SetTextColor 255 255 0" + Environment.NewLine +
|
||||||
|
Environment.NewLine +
|
||||||
|
"#Hide simple text without any special character" + Environment.NewLine +
|
||||||
|
"# SetTextColor 255 255 0";
|
||||||
|
|
||||||
|
|
||||||
var blockTranslator = new ItemFilterBlockTranslator(Mock.Of<IBlockGroupHierarchyBuilder>());
|
var blockTranslator = new ItemFilterBlockTranslator(Mock.Of<IBlockGroupHierarchyBuilder>());
|
||||||
@@ -332,15 +338,21 @@ namespace Filtration.Parser.Tests.Services
|
|||||||
var result = translator.TranslateStringToItemFilterScript(testInputScript);
|
var result = translator.TranslateStringToItemFilterScript(testInputScript);
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.AreEqual(3, result.ItemFilterBlocks.Count);
|
Assert.AreEqual(5, result.ItemFilterBlocks.Count);
|
||||||
|
|
||||||
var firstBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().First();
|
var firstBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().First();
|
||||||
var secondBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(1).First();
|
var secondBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(1).First();
|
||||||
var thirdBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(2).First();
|
var thirdBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(2).First();
|
||||||
|
var fourthBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(3).First();
|
||||||
|
var fifthBlock = result.ItemFilterBlocks.OfType<ItemFilterBlock>().Skip(4).First();
|
||||||
|
|
||||||
Assert.AreEqual(3, firstBlock.BlockItems.Count);
|
Assert.AreEqual(3, firstBlock.BlockItems.Count);
|
||||||
Assert.AreEqual(5, secondBlock.BlockItems.Count);
|
Assert.AreEqual(5, secondBlock.BlockItems.Count);
|
||||||
Assert.AreEqual(3, thirdBlock.BlockItems.Count);
|
Assert.AreEqual(3, thirdBlock.BlockItems.Count);
|
||||||
|
Assert.AreEqual(2, fourthBlock.BlockItems.Count);
|
||||||
|
Assert.AreEqual(2, fifthBlock.BlockItems.Count);
|
||||||
|
Assert.AreEqual(false, fourthBlock.Enabled);
|
||||||
|
Assert.AreEqual(false, fifthBlock.Enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|||||||
@@ -184,6 +184,21 @@ namespace Filtration.Parser.Services
|
|||||||
AddBooleanItemToBlockItems<ShaperItemBlockItem>(block, trimmedLine);
|
AddBooleanItemToBlockItems<ShaperItemBlockItem>(block, trimmedLine);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "SynthesisedItem":
|
||||||
|
{
|
||||||
|
AddBooleanItemToBlockItems<SynthesisedItemBlockItem>(block, trimmedLine);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "FracturedItem":
|
||||||
|
{
|
||||||
|
AddBooleanItemToBlockItems<FracturedItemBlockItem>(block, trimmedLine);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "AnyEnchantment":
|
||||||
|
{
|
||||||
|
AddBooleanItemToBlockItems<AnyEnchantmentBlockItem>(block, trimmedLine);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "ShapedMap":
|
case "ShapedMap":
|
||||||
{
|
{
|
||||||
AddBooleanItemToBlockItems<ShapedMapBlockItem>(block, trimmedLine);
|
AddBooleanItemToBlockItems<ShapedMapBlockItem>(block, trimmedLine);
|
||||||
@@ -317,6 +332,11 @@ namespace Filtration.Parser.Services
|
|||||||
AddStringListItemToBlockItems<HasExplicitModBlockItem>(block, trimmedLine);
|
AddStringListItemToBlockItems<HasExplicitModBlockItem>(block, trimmedLine);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "HasEnchantment":
|
||||||
|
{
|
||||||
|
AddStringListItemToBlockItems<HasEnchantmentBlockItem>(block, trimmedLine);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "ElderMap":
|
case "ElderMap":
|
||||||
{
|
{
|
||||||
AddBooleanItemToBlockItems<ElderMapBlockItem>(block, trimmedLine);
|
AddBooleanItemToBlockItems<ElderMapBlockItem>(block, trimmedLine);
|
||||||
@@ -349,12 +369,6 @@ namespace Filtration.Parser.Services
|
|||||||
Shape = EnumHelper.GetEnumValueFromDescription<IconShape>(match.Groups[3].Value)
|
Shape = EnumHelper.GetEnumValueFromDescription<IconShape>(match.Groups[3].Value)
|
||||||
};
|
};
|
||||||
|
|
||||||
var themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.Icon, match.Groups[5].Value.Trim(),
|
|
||||||
blockItemValue.Size, blockItemValue.Color, blockItemValue.Shape);
|
|
||||||
if(match.Groups[4].Value == "#" && !string.IsNullOrWhiteSpace(match.Groups[5].Value))
|
|
||||||
{
|
|
||||||
blockItemValue.ThemeComponent = themeComponent;
|
|
||||||
}
|
|
||||||
block.BlockItems.Add(blockItemValue);
|
block.BlockItems.Add(blockItemValue);
|
||||||
themeComponentType = (int)ThemeComponentType.Icon;
|
themeComponentType = (int)ThemeComponentType.Icon;
|
||||||
}
|
}
|
||||||
@@ -573,12 +587,17 @@ namespace Filtration.Parser.Services
|
|||||||
var trimmedLine = line.Trim();
|
var trimmedLine = line.Trim();
|
||||||
if (trimmedLine.IndexOf('#') > 0)
|
if (trimmedLine.IndexOf('#') > 0)
|
||||||
{
|
{
|
||||||
blockComment = trimmedLine.Substring(trimmedLine.IndexOf('#') + 1);
|
blockComment = trimmedLine.Substring(trimmedLine.IndexOf('#') + 1).Trim();
|
||||||
trimmedLine = trimmedLine.Substring(0, trimmedLine.IndexOf('#')).Trim();
|
trimmedLine = trimmedLine.Substring(0, trimmedLine.IndexOf('#')).Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (matches.Value)
|
switch (matches.Value)
|
||||||
{
|
{
|
||||||
|
case "DisableDropSound":
|
||||||
|
{
|
||||||
|
blockItems.Add(new DisableDropSoundBlockItem());
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "PlayAlertSound":
|
case "PlayAlertSound":
|
||||||
{
|
{
|
||||||
var match = Regex.Match(trimmedLine, @"\s+(\S+) (\d+)");
|
var match = Regex.Match(trimmedLine, @"\s+(\S+) (\d+)");
|
||||||
@@ -593,6 +612,20 @@ namespace Filtration.Parser.Services
|
|||||||
blockItems.Add(blockItem);
|
blockItems.Add(blockItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "PlayAlertSoundPositional":
|
||||||
|
{
|
||||||
|
var match = Regex.Match(trimmedLine, @"\s+(\S+) (\d+)");
|
||||||
|
if (!match.Success) break;
|
||||||
|
var blockItem = new PositionalSoundBlockItem(match.Groups[1].Value, Convert.ToInt16(match.Groups[2].Value));
|
||||||
|
if(_masterComponentCollection != null && !string.IsNullOrWhiteSpace(blockComment))
|
||||||
|
{
|
||||||
|
ThemeComponent themeComponent = _masterComponentCollection.AddComponent(ThemeComponentType.AlertSound,
|
||||||
|
blockComment, blockItem.Value, blockItem.SecondValue);
|
||||||
|
blockItem.ThemeComponent = themeComponent;
|
||||||
|
}
|
||||||
|
blockItems.Add(blockItem);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "SetTextColor":
|
case "SetTextColor":
|
||||||
{
|
{
|
||||||
var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
|
var result = Regex.Matches(trimmedLine, @"([\w\s]*)");
|
||||||
@@ -649,6 +682,56 @@ namespace Filtration.Parser.Services
|
|||||||
blockItems.Add(blockItem);
|
blockItems.Add(blockItem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "MinimapIcon":
|
||||||
|
{
|
||||||
|
// TODO: Get size, color, shape values programmatically
|
||||||
|
var match = Regex.Match(trimmedLine,
|
||||||
|
@"\S+\s+(0|1|2)\s+(Red|Green|Blue|Brown|White|Yellow)\s+(Circle|Diamond|Hexagon|Square|Star|Triangle)\s*([#]?)(.*)",
|
||||||
|
RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
var blockItemValue = new MapIconBlockItem
|
||||||
|
{
|
||||||
|
Size = (IconSize)short.Parse(match.Groups[1].Value),
|
||||||
|
Color = EnumHelper.GetEnumValueFromDescription<IconColor>(match.Groups[2].Value),
|
||||||
|
Shape = EnumHelper.GetEnumValueFromDescription<IconShape>(match.Groups[3].Value)
|
||||||
|
};
|
||||||
|
|
||||||
|
blockItems.Add(blockItemValue);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "PlayEffect":
|
||||||
|
{
|
||||||
|
// TODO: Get colors programmatically
|
||||||
|
var match = Regex.Match(trimmedLine, @"\S+\s+(Red|Green|Blue|Brown|White|Yellow)\s*(Temp)?", RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
var blockItemValue = new PlayEffectBlockItem
|
||||||
|
{
|
||||||
|
Color = EnumHelper.GetEnumValueFromDescription<EffectColor>(match.Groups[1].Value),
|
||||||
|
Temporary = match.Groups[2].Value.Trim().ToLower() == "temp"
|
||||||
|
};
|
||||||
|
blockItems.Add(blockItemValue);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "CustomAlertSound":
|
||||||
|
{
|
||||||
|
var match = Regex.Match(trimmedLine, @"\S+\s+""([^\*\<\>\?|]+)""");
|
||||||
|
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
var blockItemValue = new CustomSoundBlockItem
|
||||||
|
{
|
||||||
|
Value = match.Groups[1].Value
|
||||||
|
};
|
||||||
|
blockItems.Add(blockItemValue);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ namespace Filtration.Parser.Services
|
|||||||
lines[i] = lines[i].Trim();
|
lines[i] = lines[i].Trim();
|
||||||
if(!lines[i].StartsWith("#"))
|
if(!lines[i].StartsWith("#"))
|
||||||
{
|
{
|
||||||
string curLine = Regex.Replace(lines[i], @"\s+", "");
|
if ((lines[i].StartsWith("Show") || lines[i].StartsWith("Hide")) && (lines[i].Length == 4 || lines[i][4] == ' ')) // found
|
||||||
if ((curLine.StartsWith("Show") || curLine.StartsWith("Hide")) && (curLine.Length == 4 || curLine[4] == '#')) // found
|
|
||||||
{
|
{
|
||||||
inBlock[i] = true;
|
inBlock[i] = true;
|
||||||
break;
|
break;
|
||||||
@@ -98,8 +97,8 @@ namespace Filtration.Parser.Services
|
|||||||
{
|
{
|
||||||
if (!inDisabledBlock && lines[i].StartsWith("#"))
|
if (!inDisabledBlock && lines[i].StartsWith("#"))
|
||||||
{
|
{
|
||||||
string curLine = Regex.Replace(lines[i].Substring(1), @"\s+", "");
|
string curLine = lines[i].Substring(1).Trim();
|
||||||
if ((curLine.StartsWith("Show") || curLine.StartsWith("Hide")) && (curLine.Length == 4 || curLine[4] == '#') && !inBlock[i])
|
if ((curLine.StartsWith("Show") || curLine.StartsWith("Hide")) && (curLine.Length == 4 || curLine[4] == ' ') && !inBlock[i])
|
||||||
{
|
{
|
||||||
inDisabledBlock = true;
|
inDisabledBlock = true;
|
||||||
lines[i] = lines[i].Substring(1).TrimStart(' ');
|
lines[i] = lines[i].Substring(1).TrimStart(' ');
|
||||||
|
|||||||
@@ -186,10 +186,11 @@ namespace Filtration.ThemeEditor.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
#pragma warning disable 1998
|
#pragma warning disable 1998
|
||||||
public async Task Close()
|
public async Task<bool> Close()
|
||||||
#pragma warning restore 1998
|
#pragma warning restore 1998
|
||||||
{
|
{
|
||||||
Messenger.Default.Send(new ThemeClosedMessage {ClosedViewModel = this});
|
Messenger.Default.Send(new ThemeClosedMessage {ClosedViewModel = this});
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAddThemeComponentCommand(ThemeComponentType themeComponentType)
|
private void OnAddThemeComponentCommand(ThemeComponentType themeComponentType)
|
||||||
|
|||||||
@@ -29,50 +29,48 @@
|
|||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid Margin="10">
|
<Grid Margin="10">
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled">
|
<ListView ItemsSource="{Binding Source={StaticResource ComponentsViewSource}}"
|
||||||
<ListView ItemsSource="{Binding Source={StaticResource ComponentsViewSource}}"
|
|
||||||
SelectedItem="{Binding SelectedThemeComponent}"
|
SelectedItem="{Binding SelectedThemeComponent}"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||||
<ListView.Resources>
|
<ListView.Resources>
|
||||||
<Style TargetType="ListViewItem">
|
<Style TargetType="ListViewItem">
|
||||||
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ListViewItem">
|
<ControlTemplate TargetType="ListViewItem">
|
||||||
<Border Name="Border" BorderBrush="Black" Background="White" BorderThickness="1" CornerRadius="3" Margin="2" SnapsToDevicePixels="true">
|
<Border Name="Border" BorderBrush="Black" Background="White" BorderThickness="1" CornerRadius="3" Margin="2" SnapsToDevicePixels="true">
|
||||||
<ContentPresenter />
|
<ContentPresenter />
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsSelected" Value="true">
|
<Trigger Property="IsSelected" Value="true">
|
||||||
<Setter TargetName="Border" Property="Background" Value="#A9BDD8"/>
|
<Setter TargetName="Border" Property="Background" Value="#A9BDD8"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ListView.Resources>
|
</ListView.Resources>
|
||||||
<ListView.ItemsPanel>
|
<ListView.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<WrapPanel />
|
<WrapPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListView.ItemsPanel>
|
</ListView.ItemsPanel>
|
||||||
<ListView.GroupStyle>
|
<ListView.GroupStyle>
|
||||||
<GroupStyle>
|
<GroupStyle>
|
||||||
<GroupStyle.HeaderTemplate>
|
<GroupStyle.HeaderTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Margin="7,5,0,0" FontWeight="Bold" FontSize="15" Text="{Binding Path=Name, Converter={StaticResource ThemeComponentTypeToStringConverter}}"/>
|
<TextBlock Margin="7,5,0,0" FontWeight="Bold" FontSize="15" Text="{Binding Path=Name, Converter={StaticResource ThemeComponentTypeToStringConverter}}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</GroupStyle.HeaderTemplate>
|
</GroupStyle.HeaderTemplate>
|
||||||
</GroupStyle>
|
</GroupStyle>
|
||||||
</ListView.GroupStyle>
|
</ListView.GroupStyle>
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<views:ThemeComponentControl DataContext="{Binding}" Margin="10,5,10,5" />
|
<views:ThemeComponentControl DataContext="{Binding}" Margin="10,5,10,5" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
</ScrollViewer>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
31
Filtration/Converters/DisabledDefaultSoundConverter.cs
Normal file
31
Filtration/Converters/DisabledDefaultSoundConverter.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
|
namespace Filtration.Converters
|
||||||
|
{
|
||||||
|
public class DisabledDefaultSoundConverter : IValueConverter
|
||||||
|
{
|
||||||
|
private static readonly BitmapImage _soundIcon;
|
||||||
|
private static readonly BitmapImage _soundDDSIcon;
|
||||||
|
|
||||||
|
static DisabledDefaultSoundConverter()
|
||||||
|
{
|
||||||
|
var soundUri = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/sound.png", UriKind.Absolute);
|
||||||
|
var soundDDSUri = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/sound_dds.png", UriKind.Absolute);
|
||||||
|
_soundIcon = new BitmapImage(soundUri);
|
||||||
|
_soundDDSIcon = new BitmapImage(soundDDSUri);
|
||||||
|
}
|
||||||
|
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return (bool)value ? _soundDDSIcon : _soundIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return ReferenceEquals(value, _soundDDSIcon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace Filtration.Converters
|
||||||
|
{
|
||||||
|
class DisabledDefaultSoundTooltipConverter : IMultiValueConverter
|
||||||
|
{
|
||||||
|
private static readonly string appendage = "\nNote: the default drop sound is disabled for this block.";
|
||||||
|
|
||||||
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (values[0] == DependencyProperty.UnsetValue ||
|
||||||
|
values[1] == DependencyProperty.UnsetValue)
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
var baseText = (string)(values[0]);
|
||||||
|
var hasDisabledDefaultSound = (bool)(values[1]);
|
||||||
|
|
||||||
|
if (hasDisabledDefaultSound)
|
||||||
|
{
|
||||||
|
return $"{baseText}{appendage}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return baseText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -210,6 +210,8 @@
|
|||||||
<Compile Include="Converters\BooleanToBlockActionInverseConverter.cs" />
|
<Compile Include="Converters\BooleanToBlockActionInverseConverter.cs" />
|
||||||
<Compile Include="Converters\BooleanToBlockActionConverter.cs" />
|
<Compile Include="Converters\BooleanToBlockActionConverter.cs" />
|
||||||
<Compile Include="Converters\BlockItemToRemoveEnabledVisibilityConverter.cs" />
|
<Compile Include="Converters\BlockItemToRemoveEnabledVisibilityConverter.cs" />
|
||||||
|
<Compile Include="Converters\DisabledDefaultSoundConverter.cs" />
|
||||||
|
<Compile Include="Converters\DisabledDefaultSoundTooltipConverter.cs" />
|
||||||
<Compile Include="Converters\MinimapIconToCroppedBitmapConverter.cs" />
|
<Compile Include="Converters\MinimapIconToCroppedBitmapConverter.cs" />
|
||||||
<Compile Include="Converters\HashSignRemovalConverter.cs" />
|
<Compile Include="Converters\HashSignRemovalConverter.cs" />
|
||||||
<Compile Include="Converters\ItemRarityConverter.cs" />
|
<Compile Include="Converters\ItemRarityConverter.cs" />
|
||||||
@@ -248,6 +250,7 @@
|
|||||||
<DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon>
|
<DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="ViewModels\DesignTime\DesignTimeItemFilterBlockViewModel.cs" />
|
<Compile Include="ViewModels\DesignTime\DesignTimeItemFilterBlockViewModel.cs" />
|
||||||
|
<Compile Include="Utility\SplatNLogAdapter.cs" />
|
||||||
<Compile Include="ViewModels\DesignTime\DesignTimeSettingsPageViewModel.cs" />
|
<Compile Include="ViewModels\DesignTime\DesignTimeSettingsPageViewModel.cs" />
|
||||||
<Compile Include="Views\AttachedProperties\SelectedItemsAttachedProperty.cs" />
|
<Compile Include="Views\AttachedProperties\SelectedItemsAttachedProperty.cs" />
|
||||||
<Compile Include="Utility\RoutedCommandHandler.cs" />
|
<Compile Include="Utility\RoutedCommandHandler.cs" />
|
||||||
@@ -460,6 +463,11 @@
|
|||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<EmbeddedResource Include="Resources\Enchantments.txt" />
|
||||||
|
<Resource Include="Resources\Icons\no_sound_dds_light.png" />
|
||||||
|
<Resource Include="Resources\Icons\no_sound_dds.png" />
|
||||||
|
<Resource Include="Resources\Icons\speaker_icon.png" />
|
||||||
|
<Resource Include="Resources\Icons\sound_dds.png" />
|
||||||
<EmbeddedResource Include="Resources\Prophecies.txt" />
|
<EmbeddedResource Include="Resources\Prophecies.txt" />
|
||||||
<EmbeddedResource Include="Resources\ItemMods.txt" />
|
<EmbeddedResource Include="Resources\ItemMods.txt" />
|
||||||
<Resource Include="Resources\loading_spinner.gif" />
|
<Resource Include="Resources\loading_spinner.gif" />
|
||||||
@@ -504,7 +512,7 @@
|
|||||||
<Resource Include="Resources\Icons\open_icon.png" />
|
<Resource Include="Resources\Icons\open_icon.png" />
|
||||||
<Resource Include="Resources\Icons\arrow_down_large_icon.png" />
|
<Resource Include="Resources\Icons\arrow_down_large_icon.png" />
|
||||||
<Resource Include="Resources\Icons\arrow_up_large_icon.png" />
|
<Resource Include="Resources\Icons\arrow_up_large_icon.png" />
|
||||||
<Resource Include="Resources\Icons\speaker_icon.png" />
|
<Resource Include="Resources\Icons\sound.png" />
|
||||||
<Resource Include="Resources\Icons\play_icon.png" />
|
<Resource Include="Resources\Icons\play_icon.png" />
|
||||||
<Resource Include="Resources\Icons\arrow_top_icon.png" />
|
<Resource Include="Resources\Icons\arrow_top_icon.png" />
|
||||||
<Resource Include="Resources\Icons\arrow_bottom_icon.png" />
|
<Resource Include="Resources\Icons\arrow_bottom_icon.png" />
|
||||||
|
|||||||
@@ -8,24 +8,12 @@
|
|||||||
<authors>Ben Wallis</authors>
|
<authors>Ben Wallis</authors>
|
||||||
<description>A Path of Exile loot filter script editor</description>
|
<description>A Path of Exile loot filter script editor</description>
|
||||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||||
<copyright>Copyright 2018</copyright>
|
<copyright>Copyright 2019</copyright>
|
||||||
<releaseNotes>* Added support for new Prophecies block item type
|
<releaseNotes>* Added support for AnyEnchantment block item type
|
||||||
* Added Betrayal League Item Base Types and Item Classes to static data
|
* Added support for HasEnchantment block item type
|
||||||
* All open filter scripts are now remembered on exit and reopened when the application is started rather than just the last opened one (#95)
|
* Added support for FracturedItem block item type
|
||||||
* 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
|
* Added support for SynthesisedItem block item type
|
||||||
* A new Clear Styles button has been added which removes all styles from the selected block (#96)
|
* Fixed parsing of disabled Show/Hide blocks with extra information following the Show/Hide keyword (#133)</releaseNotes>
|
||||||
* 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
|
|
||||||
* When there are too many block items to fit horizontally in a block a horizontal scrollbar will now appear
|
|
||||||
* Fixed the Advanced tab in the Color Picker in the Theme Editor not being clickable (#115)
|
|
||||||
* Fixed the previously incorrect handling of DisableDropSound as a true/false value when in fact it is enabled/disabled purely by its presence or lack thereof in a block (#111)
|
|
||||||
* Fixed the application freezing for a long period of time when Ctrl+A (Select All) is performed
|
|
||||||
* Fixed the Switch to Appearance/Regular Block Items text overlapping block items
|
|
||||||
* Fixed theme saving (blank theme files were being saved) (#83)
|
|
||||||
* Fixed checkboxes in Block Group Browser (#97)
|
|
||||||
* Fixed the Select Path of Exile data directory dialog appearing after every upgrade (#94)
|
|
||||||
* Fixed an issue where custom sounds were only populated from the default Path of Exile data directory rather than the configured directory
|
|
||||||
* Clean installs no longer prompt to select the Path of Exile data directory if the default directory exists</releaseNotes>
|
|
||||||
<dependencies />
|
<dependencies />
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|||||||
@@ -10,15 +10,21 @@
|
|||||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||||
<target xsi:type="File" name="fDebug" fileName="${basedir}/Filtration_debug_${shortdate}.log"
|
<target xsi:type="File" name="fDebug" fileName="${basedir}/Filtration_debug_${shortdate}.log"
|
||||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||||
|
<target xsi:type="File" name="fUpdater" fileName="${basedir}/Filtration_updater_${shortdate}.log"
|
||||||
|
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||||
<target xsi:type="Debugger" name="cDebug" layout="${longdate} ${uppercase:${level}} ${message}"/>
|
<target xsi:type="Debugger" name="cDebug" layout="${longdate} ${uppercase:${level}} ${message}"/>
|
||||||
</targets>
|
</targets>
|
||||||
|
|
||||||
<rules>
|
<rules>
|
||||||
|
|
||||||
|
<!-- Squirrel Updater Log-->
|
||||||
|
<logger name="SquirrelLogger" minlevel="Trace" writeTo="fUpdater" />
|
||||||
|
|
||||||
<!-- Uncomment the Debug line to enable Debug logging -->
|
<!-- Uncomment the Debug line to enable Debug logging -->
|
||||||
<!--<logger name="*" minlevel="Debug" writeTo="fDebug" final="true" />-->
|
<!--<logger name="*" minlevel="Debug" writeTo="fDebug" final="true" />-->
|
||||||
<logger name="*" minlevel="Error" writeTo="fErrors" />
|
<logger name="*" minlevel="Error" writeTo="fErrors" />
|
||||||
<logger name="*" minlevel="Trace" writeTo="cDebug" />
|
<logger name="*" minlevel="Trace" writeTo="cDebug" />
|
||||||
|
|
||||||
|
|
||||||
</rules>
|
</rules>
|
||||||
</nlog>
|
</nlog>
|
||||||
@@ -10,8 +10,8 @@ using System.Runtime.CompilerServices;
|
|||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("1.1.0")]
|
[assembly: AssemblyVersion("1.2.0")]
|
||||||
[assembly: AssemblyInformationalVersion("1.1.0-beta7")]
|
[assembly: AssemblyInformationalVersion("1.2.0-beta1")]
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||||
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
|
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]
|
||||||
|
|||||||
13
Filtration/Properties/Resources.Designer.cs
generated
13
Filtration/Properties/Resources.Designer.cs
generated
@@ -388,7 +388,18 @@ namespace Filtration.Properties {
|
|||||||
return ResourceManager.GetString("Prophecies", resourceCulture);
|
return ResourceManager.GetString("Prophecies", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Enchantment Decree of Force.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Enchantments
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ResourceManager.GetString("Enchantments", 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>
|
||||||
|
|||||||
@@ -214,4 +214,7 @@
|
|||||||
<data name="Prophecies" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="Prophecies" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\Prophecies.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
<value>..\Resources\Prophecies.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Enchantments" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\Enchantments.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
1107
Filtration/Resources/Enchantments.txt
Normal file
1107
Filtration/Resources/Enchantments.txt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Filtration/Resources/Icons/no_sound_dds.png
Normal file
BIN
Filtration/Resources/Icons/no_sound_dds.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
Filtration/Resources/Icons/no_sound_dds_light.png
Normal file
BIN
Filtration/Resources/Icons/no_sound_dds_light.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
BIN
Filtration/Resources/Icons/sound.png
Normal file
BIN
Filtration/Resources/Icons/sound.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
BIN
Filtration/Resources/Icons/sound_dds.png
Normal file
BIN
Filtration/Resources/Icons/sound_dds.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@@ -22,6 +22,7 @@ Alira's Amulet
|
|||||||
Alleyways Map
|
Alleyways Map
|
||||||
Allflame
|
Allflame
|
||||||
Alloyed Spiked Shield
|
Alloyed Spiked Shield
|
||||||
|
Alone in the Darkness
|
||||||
Alteration Shard
|
Alteration Shard
|
||||||
Amber Amulet
|
Amber Amulet
|
||||||
Ambush Boots
|
Ambush Boots
|
||||||
@@ -76,6 +77,7 @@ Armageddon Brand
|
|||||||
Arming Axe
|
Arming Axe
|
||||||
Armourer's Scrap
|
Armourer's Scrap
|
||||||
Armoury Map
|
Armoury Map
|
||||||
|
Arrogance of the Vaal
|
||||||
Arsenal Map
|
Arsenal Map
|
||||||
Ashen Wood Map
|
Ashen Wood Map
|
||||||
Ashscale Talisman
|
Ashscale Talisman
|
||||||
@@ -96,6 +98,7 @@ Avian Twins Talisman
|
|||||||
Awl
|
Awl
|
||||||
Baleful Gem
|
Baleful Gem
|
||||||
Ball Lightning
|
Ball Lightning
|
||||||
|
Bane
|
||||||
Bane of the Loyal
|
Bane of the Loyal
|
||||||
Barbed Club
|
Barbed Club
|
||||||
Barbute Helmet
|
Barbute Helmet
|
||||||
@@ -172,6 +175,7 @@ Bone Offering
|
|||||||
Bone Spirit Shield
|
Bone Spirit Shield
|
||||||
Bonechill Support
|
Bonechill Support
|
||||||
Bonespire Talisman
|
Bonespire Talisman
|
||||||
|
Boon of Justice
|
||||||
Boon of the First Ones
|
Boon of the First Ones
|
||||||
Boot Blade
|
Boot Blade
|
||||||
Boot Knife
|
Boot Knife
|
||||||
@@ -389,6 +393,7 @@ Dagger Axe
|
|||||||
Damage on Full Life Support
|
Damage on Full Life Support
|
||||||
Dark Forest Map
|
Dark Forest Map
|
||||||
Dark Pact
|
Dark Pact
|
||||||
|
Dark Temptation
|
||||||
Darkwood Sceptre
|
Darkwood Sceptre
|
||||||
Deadhand Talisman
|
Deadhand Talisman
|
||||||
Deadly Ailments Support
|
Deadly Ailments Support
|
||||||
@@ -450,6 +455,7 @@ Diamond Ring
|
|||||||
Dig Map
|
Dig Map
|
||||||
Discharge
|
Discharge
|
||||||
Discipline
|
Discipline
|
||||||
|
Divine Ire
|
||||||
Divine Life Flask
|
Divine Life Flask
|
||||||
Divine Mana Flask
|
Divine Mana Flask
|
||||||
Divine Orb
|
Divine Orb
|
||||||
@@ -510,6 +516,7 @@ Enchanted Fossil
|
|||||||
Encrusted Fossil
|
Encrusted Fossil
|
||||||
Endurance Charge on Melee Stun Support
|
Endurance Charge on Melee Stun Support
|
||||||
Enduring Cry
|
Enduring Cry
|
||||||
|
Energy Leech Support
|
||||||
Enfeeble
|
Enfeeble
|
||||||
Engineer's Orb
|
Engineer's Orb
|
||||||
Engineer's Shard
|
Engineer's Shard
|
||||||
@@ -820,7 +827,9 @@ Infernal Axe
|
|||||||
Infernal Blow
|
Infernal Blow
|
||||||
Infernal Sword
|
Infernal Sword
|
||||||
Infested Valley Map
|
Infested Valley Map
|
||||||
|
Infused Channelling Support
|
||||||
Innervate Support
|
Innervate Support
|
||||||
|
Intensify Support
|
||||||
Invasion Leaguestone
|
Invasion Leaguestone
|
||||||
Inya's Key
|
Inya's Key
|
||||||
Iron Circlet
|
Iron Circlet
|
||||||
@@ -949,6 +958,7 @@ Majestic Plate
|
|||||||
Malachai's Entrails
|
Malachai's Entrails
|
||||||
Malachai's Heart
|
Malachai's Heart
|
||||||
Malachai's Lungs
|
Malachai's Lungs
|
||||||
|
Malevolence
|
||||||
Malformation Map
|
Malformation Map
|
||||||
Maligaro's Map
|
Maligaro's Map
|
||||||
Maligaro's Spike
|
Maligaro's Spike
|
||||||
@@ -1009,6 +1019,7 @@ Molten Shell
|
|||||||
Molten Strike
|
Molten Strike
|
||||||
Monkey Paw Talisman
|
Monkey Paw Talisman
|
||||||
Monkey Twins Talisman
|
Monkey Twins Talisman
|
||||||
|
Monochrome
|
||||||
Moon Orb
|
Moon Orb
|
||||||
Moon Staff
|
Moon Staff
|
||||||
Moon Temple Map
|
Moon Temple Map
|
||||||
@@ -1183,6 +1194,7 @@ Prophet Crown
|
|||||||
Prosperity
|
Prosperity
|
||||||
Puncture
|
Puncture
|
||||||
Punishment
|
Punishment
|
||||||
|
Purifying Flame
|
||||||
Purity of Elements
|
Purity of Elements
|
||||||
Purity of Fire
|
Purity of Fire
|
||||||
Purity of Ice
|
Purity of Ice
|
||||||
@@ -1295,6 +1307,7 @@ Saint's Hauberk
|
|||||||
Saintly Chainmail
|
Saintly Chainmail
|
||||||
Sallet
|
Sallet
|
||||||
Sambar Sceptre
|
Sambar Sceptre
|
||||||
|
Sambodhi's Vow
|
||||||
Samite Gloves
|
Samite Gloves
|
||||||
Samite Helmet
|
Samite Helmet
|
||||||
Samite Slippers
|
Samite Slippers
|
||||||
@@ -1357,6 +1370,7 @@ Serpentscale Gauntlets
|
|||||||
Serrated Arrow Quiver
|
Serrated Arrow Quiver
|
||||||
Serrated Foil
|
Serrated Foil
|
||||||
Serrated Fossil
|
Serrated Fossil
|
||||||
|
Seven Years Bad Luck
|
||||||
Shabby Jerkin
|
Shabby Jerkin
|
||||||
Shackled Boots
|
Shackled Boots
|
||||||
Shadow Axe
|
Shadow Axe
|
||||||
@@ -1457,6 +1471,7 @@ Soldier Helmet
|
|||||||
Soldier's Brigandine
|
Soldier's Brigandine
|
||||||
Sorcerer Boots
|
Sorcerer Boots
|
||||||
Sorcerer Gloves
|
Sorcerer Gloves
|
||||||
|
Soulrend
|
||||||
Sovereign Spiked Shield
|
Sovereign Spiked Shield
|
||||||
Spark
|
Spark
|
||||||
Sparkling Claw
|
Sparkling Claw
|
||||||
@@ -1628,6 +1643,7 @@ The Garish Power
|
|||||||
The Gemcutter
|
The Gemcutter
|
||||||
The Gentleman
|
The Gentleman
|
||||||
The Gladiator
|
The Gladiator
|
||||||
|
The Golden Era
|
||||||
The Hale Heart
|
The Hale Heart
|
||||||
The Harvester
|
The Harvester
|
||||||
The Hermit
|
The Hermit
|
||||||
@@ -1642,19 +1658,24 @@ The Inventor
|
|||||||
The Iron Bard
|
The Iron Bard
|
||||||
The Jester
|
The Jester
|
||||||
The Jeweller's Boon
|
The Jeweller's Boon
|
||||||
|
The Journey
|
||||||
The King's Blade
|
The King's Blade
|
||||||
The King's Heart
|
The King's Heart
|
||||||
|
The Landing
|
||||||
The Last One Standing
|
The Last One Standing
|
||||||
The Lich
|
The Lich
|
||||||
The Life Thief
|
The Life Thief
|
||||||
The Lion
|
The Lion
|
||||||
The Lord in Black
|
The Lord in Black
|
||||||
|
The Lord of Celebration
|
||||||
The Lover
|
The Lover
|
||||||
The Lunaris Priestess
|
The Lunaris Priestess
|
||||||
|
The Mad King
|
||||||
The Master
|
The Master
|
||||||
The Master Artisan
|
The Master Artisan
|
||||||
The Mayor
|
The Mayor
|
||||||
The Mercenary
|
The Mercenary
|
||||||
|
The Messenger
|
||||||
The Metalsmith's Gift
|
The Metalsmith's Gift
|
||||||
The Nurse
|
The Nurse
|
||||||
The Oath
|
The Oath
|
||||||
@@ -1684,6 +1705,7 @@ The Samurai's Eye
|
|||||||
The Scarred Meadow
|
The Scarred Meadow
|
||||||
The Scavenger
|
The Scavenger
|
||||||
The Scholar
|
The Scholar
|
||||||
|
The Seeker
|
||||||
The Sephirot
|
The Sephirot
|
||||||
The Shaper's Key
|
The Shaper's Key
|
||||||
The Shaper's Realm
|
The Shaper's Realm
|
||||||
@@ -1800,6 +1822,7 @@ Underground River Map
|
|||||||
Underground Sea Map
|
Underground Sea Map
|
||||||
Undying Flesh Talisman
|
Undying Flesh Talisman
|
||||||
Unearth
|
Unearth
|
||||||
|
Unleash Support
|
||||||
Unset Ring
|
Unset Ring
|
||||||
Unshaping Orb
|
Unshaping Orb
|
||||||
Ursine Pelt
|
Ursine Pelt
|
||||||
@@ -1924,6 +1947,7 @@ Warlord's Mark
|
|||||||
Waste Pool Map
|
Waste Pool Map
|
||||||
Wasteland Map
|
Wasteland Map
|
||||||
Waterways Map
|
Waterways Map
|
||||||
|
Wave of Conviction
|
||||||
Waxed Garb
|
Waxed Garb
|
||||||
Wealth and Power
|
Wealth and Power
|
||||||
Weeping Essence
|
Weeping Essence
|
||||||
@@ -1978,4 +2002,5 @@ Yriel's Key
|
|||||||
Zealot Boots
|
Zealot Boots
|
||||||
Zealot Gloves
|
Zealot Gloves
|
||||||
Zealot Helmet
|
Zealot Helmet
|
||||||
|
Zealotry
|
||||||
Zodiac Leather
|
Zodiac Leather
|
||||||
@@ -12,6 +12,7 @@ namespace Filtration.Services
|
|||||||
IEnumerable<string> ItemClasses { get; }
|
IEnumerable<string> ItemClasses { get; }
|
||||||
IEnumerable<string> ItemMods { get; }
|
IEnumerable<string> ItemMods { get; }
|
||||||
IEnumerable<string> Prophecies { get; }
|
IEnumerable<string> Prophecies { get; }
|
||||||
|
IEnumerable<string> Enchantments { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class StaticDataService : IStaticDataService
|
internal class StaticDataService : IStaticDataService
|
||||||
@@ -29,12 +30,15 @@ namespace Filtration.Services
|
|||||||
|
|
||||||
public IEnumerable<string> Prophecies { get; private set; }
|
public IEnumerable<string> Prophecies { get; private set; }
|
||||||
|
|
||||||
|
public IEnumerable<string> Enchantments { get; private set; }
|
||||||
|
|
||||||
private void PopulateStaticData()
|
private void PopulateStaticData()
|
||||||
{
|
{
|
||||||
ItemBaseTypes = new LineReader(() => new StringReader(Resources.ItemBaseTypes)).ToList();
|
ItemBaseTypes = new LineReader(() => new StringReader(Resources.ItemBaseTypes)).ToList();
|
||||||
ItemClasses = new LineReader(() => new StringReader(Resources.ItemClasses)).ToList();
|
ItemClasses = new LineReader(() => new StringReader(Resources.ItemClasses)).ToList();
|
||||||
ItemMods = new LineReader(() => new StringReader(Resources.ItemMods)).ToList();
|
ItemMods = new LineReader(() => new StringReader(Resources.ItemMods)).ToList();
|
||||||
Prophecies = new LineReader(() => new StringReader(Resources.Prophecies)).ToList();
|
Prophecies = new LineReader(() => new StringReader(Resources.Prophecies)).ToList();
|
||||||
|
Enchantments = new LineReader(() => new StringReader(Resources.Enchantments)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using System.Text.RegularExpressions;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Filtration.Enums;
|
using Filtration.Enums;
|
||||||
using Filtration.Properties;
|
using Filtration.Properties;
|
||||||
|
using Filtration.Utility;
|
||||||
using NLog;
|
using NLog;
|
||||||
using Squirrel;
|
using Squirrel;
|
||||||
|
|
||||||
@@ -78,11 +79,14 @@ namespace Filtration.Services
|
|||||||
private bool _downloadPrereleaseUpdates;
|
private bool _downloadPrereleaseUpdates;
|
||||||
private UpdateStatus _updateStatus;
|
private UpdateStatus _updateStatus;
|
||||||
|
|
||||||
public UpdateService(ISettingsService settingsService)
|
public UpdateService(ISettingsService settingsService,
|
||||||
|
ISplatNLogAdapter splatNLogAdapter)
|
||||||
{
|
{
|
||||||
_settingsService = settingsService;
|
_settingsService = settingsService;
|
||||||
|
|
||||||
UpdateStatus = UpdateStatus.NoUpdateAvailable;
|
UpdateStatus = UpdateStatus.NoUpdateAvailable;
|
||||||
|
|
||||||
|
Splat.Locator.CurrentMutable.Register(() => splatNLogAdapter, typeof(Splat.ILogger));
|
||||||
}
|
}
|
||||||
|
|
||||||
public event EventHandler<UpdateStatusChangedEventArgs> UpdateStatusChanged;
|
public event EventHandler<UpdateStatusChangedEventArgs> UpdateStatusChanged;
|
||||||
|
|||||||
@@ -87,6 +87,11 @@
|
|||||||
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutocompleteItemMods}" />
|
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutocompleteItemMods}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
|
<!-- Enchantments Template -->
|
||||||
|
<DataTemplate DataType="{x:Type blockItemTypes:HasEnchantmentBlockItem}">
|
||||||
|
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" AutoCompleteItemsSource="{Binding ElementName=TopLevelGrid, Path=DataContext.AutocompleteEnchantments}" />
|
||||||
|
</DataTemplate>
|
||||||
|
|
||||||
<!-- Socket Groups Template -->
|
<!-- Socket Groups Template -->
|
||||||
<DataTemplate DataType="{x:Type blockItemTypes:SocketGroupBlockItem}">
|
<DataTemplate DataType="{x:Type blockItemTypes:SocketGroupBlockItem}">
|
||||||
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" />
|
<userControls:EditableListBoxControl Margin="5,5,5,5" ItemsSource="{Binding Items}" />
|
||||||
|
|||||||
52
Filtration/Utility/SplatNLogAdapter.cs
Normal file
52
Filtration/Utility/SplatNLogAdapter.cs
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using NLog;
|
||||||
|
using ILogger = Splat.ILogger;
|
||||||
|
using LogLevel = Splat.LogLevel;
|
||||||
|
|
||||||
|
namespace Filtration.Utility
|
||||||
|
{
|
||||||
|
public interface ISplatNLogAdapter
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SplatNLogAdapter : ILogger, ISplatNLogAdapter
|
||||||
|
{
|
||||||
|
private static readonly Logger Logger = LogManager.GetLogger("SquirrelLogger");
|
||||||
|
|
||||||
|
public void Write(string message, LogLevel logLevel)
|
||||||
|
{
|
||||||
|
switch (logLevel)
|
||||||
|
{
|
||||||
|
case LogLevel.Debug:
|
||||||
|
{
|
||||||
|
Logger.Debug(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LogLevel.Info:
|
||||||
|
{
|
||||||
|
Logger.Info(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LogLevel.Error:
|
||||||
|
{
|
||||||
|
Logger.Error(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LogLevel.Fatal:
|
||||||
|
{
|
||||||
|
Logger.Fatal(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case LogLevel.Warn:
|
||||||
|
{
|
||||||
|
Logger.Warn(message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException(nameof(logLevel), logLevel, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public LogLevel Level { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -131,12 +131,16 @@ namespace Filtration.ViewModels.DesignTime
|
|||||||
typeof (CorruptedBlockItem),
|
typeof (CorruptedBlockItem),
|
||||||
typeof (ElderItemBlockItem),
|
typeof (ElderItemBlockItem),
|
||||||
typeof (ShaperItemBlockItem),
|
typeof (ShaperItemBlockItem),
|
||||||
|
typeof (SynthesisedItemBlockItem),
|
||||||
|
typeof (FracturedItemBlockItem),
|
||||||
|
typeof (AnyEnchantmentBlockItem),
|
||||||
typeof (MapTierBlockItem),
|
typeof (MapTierBlockItem),
|
||||||
typeof (ShapedMapBlockItem),
|
typeof (ShapedMapBlockItem),
|
||||||
typeof (ElderMapBlockItem),
|
typeof (ElderMapBlockItem),
|
||||||
typeof (GemLevelBlockItem),
|
typeof (GemLevelBlockItem),
|
||||||
typeof (StackSizeBlockItem),
|
typeof (StackSizeBlockItem),
|
||||||
typeof (HasExplicitModBlockItem)
|
typeof (HasExplicitModBlockItem),
|
||||||
|
typeof (HasEnchantmentBlockItem)
|
||||||
};
|
};
|
||||||
public List<Type> AudioVisualBlockItemTypesAvailable { get; }
|
public List<Type> AudioVisualBlockItemTypesAvailable { get; }
|
||||||
public Color DisplayTextColor => Colors.Red;
|
public Color DisplayTextColor => Colors.Red;
|
||||||
@@ -150,6 +154,7 @@ namespace Filtration.ViewModels.DesignTime
|
|||||||
public bool HasSound { get; }
|
public bool HasSound { get; }
|
||||||
public bool HasPositionalSound { get; }
|
public bool HasPositionalSound { get; }
|
||||||
public bool HasCustomSound { get; }
|
public bool HasCustomSound { get; }
|
||||||
|
public bool HasDisabledDefaultSound { get; }
|
||||||
public bool HasAudioVisualBlockItems { get; }
|
public bool HasAudioVisualBlockItems { get; }
|
||||||
public void RefreshBlockPreview()
|
public void RefreshBlockPreview()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Filtration.ViewModels.DesignTime
|
|||||||
|
|
||||||
public bool IsScript { get; }
|
public bool IsScript { get; }
|
||||||
public bool IsTheme { get; }
|
public bool IsTheme { get; }
|
||||||
public Task Close()
|
public Task<bool> Close()
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ namespace Filtration.ViewModels
|
|||||||
bool HasSound { get; }
|
bool HasSound { get; }
|
||||||
bool HasPositionalSound { get; }
|
bool HasPositionalSound { get; }
|
||||||
bool HasCustomSound { get; }
|
bool HasCustomSound { get; }
|
||||||
|
bool HasDisabledDefaultSound { get; }
|
||||||
bool HasAudioVisualBlockItems { get; }
|
bool HasAudioVisualBlockItems { get; }
|
||||||
void RefreshBlockPreview();
|
void RefreshBlockPreview();
|
||||||
}
|
}
|
||||||
@@ -207,6 +208,8 @@ namespace Filtration.ViewModels
|
|||||||
|
|
||||||
public IEnumerable<string> AutocompleteItemMods => _staticDataService.ItemMods;
|
public IEnumerable<string> AutocompleteItemMods => _staticDataService.ItemMods;
|
||||||
|
|
||||||
|
public IEnumerable<string> AutocompleteEnchantments => _staticDataService.Enchantments;
|
||||||
|
|
||||||
public List<Type> BlockItemTypesAvailable => new List<Type>
|
public List<Type> BlockItemTypesAvailable => new List<Type>
|
||||||
{
|
{
|
||||||
typeof (ItemLevelBlockItem),
|
typeof (ItemLevelBlockItem),
|
||||||
@@ -225,12 +228,16 @@ namespace Filtration.ViewModels
|
|||||||
typeof (CorruptedBlockItem),
|
typeof (CorruptedBlockItem),
|
||||||
typeof (ElderItemBlockItem),
|
typeof (ElderItemBlockItem),
|
||||||
typeof (ShaperItemBlockItem),
|
typeof (ShaperItemBlockItem),
|
||||||
|
typeof (SynthesisedItemBlockItem),
|
||||||
|
typeof (FracturedItemBlockItem),
|
||||||
|
typeof (AnyEnchantmentBlockItem),
|
||||||
typeof (MapTierBlockItem),
|
typeof (MapTierBlockItem),
|
||||||
typeof (ShapedMapBlockItem),
|
typeof (ShapedMapBlockItem),
|
||||||
typeof (ElderMapBlockItem),
|
typeof (ElderMapBlockItem),
|
||||||
typeof (GemLevelBlockItem),
|
typeof (GemLevelBlockItem),
|
||||||
typeof (StackSizeBlockItem),
|
typeof (StackSizeBlockItem),
|
||||||
typeof (HasExplicitModBlockItem)
|
typeof (HasExplicitModBlockItem),
|
||||||
|
typeof (HasEnchantmentBlockItem)
|
||||||
};
|
};
|
||||||
|
|
||||||
public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type>
|
public List<Type> AudioVisualBlockItemTypesAvailable => new List<Type>
|
||||||
@@ -287,6 +294,7 @@ namespace Filtration.ViewModels
|
|||||||
public bool HasSound => Block.HasBlockItemOfType<SoundBlockItem>();
|
public bool HasSound => Block.HasBlockItemOfType<SoundBlockItem>();
|
||||||
public bool HasPositionalSound => Block.HasBlockItemOfType<PositionalSoundBlockItem>();
|
public bool HasPositionalSound => Block.HasBlockItemOfType<PositionalSoundBlockItem>();
|
||||||
public bool HasCustomSound => Block.HasBlockItemOfType<CustomSoundBlockItem>();
|
public bool HasCustomSound => Block.HasBlockItemOfType<CustomSoundBlockItem>();
|
||||||
|
public bool HasDisabledDefaultSound => Block.HasBlockItemOfType<DisableDropSoundBlockItem>();
|
||||||
|
|
||||||
public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any();
|
public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any();
|
||||||
|
|
||||||
@@ -349,6 +357,10 @@ namespace Filtration.ViewModels
|
|||||||
private void OnPasteBlockStyleCommand()
|
private void OnPasteBlockStyleCommand()
|
||||||
{
|
{
|
||||||
_parentScriptViewModel.PasteBlockStyle(this);
|
_parentScriptViewModel.PasteBlockStyle(this);
|
||||||
|
foreach (var blockItem in Block.BlockItems.OfType<IAudioVisualBlockItem>())
|
||||||
|
{
|
||||||
|
blockItem.PropertyChanged += OnBlockItemChanged;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnAddBlockCommand()
|
private void OnAddBlockCommand()
|
||||||
@@ -526,6 +538,7 @@ namespace Filtration.ViewModels
|
|||||||
RaisePropertyChanged(nameof(HasSound));
|
RaisePropertyChanged(nameof(HasSound));
|
||||||
RaisePropertyChanged(nameof(HasPositionalSound));
|
RaisePropertyChanged(nameof(HasPositionalSound));
|
||||||
RaisePropertyChanged(nameof(HasCustomSound));
|
RaisePropertyChanged(nameof(HasCustomSound));
|
||||||
|
RaisePropertyChanged(nameof(HasDisabledDefaultSound));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnBlockItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
private void OnBlockItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
@@ -534,6 +547,7 @@ namespace Filtration.ViewModels
|
|||||||
RaisePropertyChanged(nameof(SummaryBlockItems));
|
RaisePropertyChanged(nameof(SummaryBlockItems));
|
||||||
RaisePropertyChanged(nameof(AudioVisualBlockItems));
|
RaisePropertyChanged(nameof(AudioVisualBlockItems));
|
||||||
RaisePropertyChanged(nameof(HasAudioVisualBlockItems));
|
RaisePropertyChanged(nameof(HasAudioVisualBlockItems));
|
||||||
|
RaisePropertyChanged(nameof(HasDisabledDefaultSound));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCustomSoundFileDialog()
|
private void OnCustomSoundFileDialog()
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ namespace Filtration.ViewModels
|
|||||||
{
|
{
|
||||||
for (var i = 0; i < SelectedBlockViewModels.Count; i++)
|
for (var i = 0; i < SelectedBlockViewModels.Count; i++)
|
||||||
{
|
{
|
||||||
if (!ViewItemFilterBlockViewModels.Contains(SelectedBlockViewModels[i]))
|
if (SelectedBlockViewModels[i] == null || !ViewItemFilterBlockViewModels.Contains(SelectedBlockViewModels[i]))
|
||||||
{
|
{
|
||||||
SelectedBlockViewModels.RemoveAt(i--);
|
SelectedBlockViewModels.RemoveAt(i--);
|
||||||
}
|
}
|
||||||
@@ -562,6 +562,8 @@ namespace Filtration.ViewModels
|
|||||||
|
|
||||||
public bool CanModifySelectedBlocks()
|
public bool CanModifySelectedBlocks()
|
||||||
{
|
{
|
||||||
|
ValidateSelectedBlocks();
|
||||||
|
|
||||||
if (SelectedBlockViewModels.Count < 1)
|
if (SelectedBlockViewModels.Count < 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -578,6 +580,9 @@ namespace Filtration.ViewModels
|
|||||||
|
|
||||||
public bool CanModifyBlock(IItemFilterBlockViewModelBase itemFilterBlock)
|
public bool CanModifyBlock(IItemFilterBlockViewModelBase itemFilterBlock)
|
||||||
{
|
{
|
||||||
|
if (itemFilterBlock == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (itemFilterBlock is IItemFilterBlockViewModel)
|
if (itemFilterBlock is IItemFilterBlockViewModel)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -796,34 +801,37 @@ namespace Filtration.ViewModels
|
|||||||
await Close();
|
await Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task Close()
|
public async Task<bool> Close()
|
||||||
{
|
{
|
||||||
if (!IsDirty)
|
if (!IsDirty)
|
||||||
{
|
{
|
||||||
CloseScript();
|
CloseScript();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
var result = _messageBoxService.Show("Filtration",
|
|
||||||
"Save script \"" + Filename + "\"?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
|
||||||
|
|
||||||
switch (result)
|
var result = _messageBoxService.Show("Filtration",
|
||||||
|
"Save script \"" + Filename + "\"?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
||||||
|
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
case MessageBoxResult.Yes:
|
||||||
{
|
{
|
||||||
case MessageBoxResult.Yes:
|
await SaveAsync();
|
||||||
{
|
CloseScript();
|
||||||
await SaveAsync();
|
return true;
|
||||||
CloseScript();
|
}
|
||||||
break;
|
case MessageBoxResult.No:
|
||||||
}
|
{
|
||||||
case MessageBoxResult.No:
|
CloseScript();
|
||||||
{
|
return true;
|
||||||
CloseScript();
|
}
|
||||||
break;
|
case MessageBoxResult.Cancel:
|
||||||
}
|
{
|
||||||
case MessageBoxResult.Cancel:
|
return false;
|
||||||
{
|
}
|
||||||
return;
|
default:
|
||||||
}
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -768,7 +768,10 @@ namespace Filtration.ViewModels
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await document.Close();
|
if (!await document.Close())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace Filtration.ViewModels
|
|||||||
public bool IsScript => false;
|
public bool IsScript => false;
|
||||||
public bool IsTheme => false;
|
public bool IsTheme => false;
|
||||||
|
|
||||||
public Task Close()
|
public Task<bool> Close()
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new System.NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,9 +65,10 @@ namespace Filtration.ViewModels
|
|||||||
|
|
||||||
public bool IsInErrorState => UpdateStatus == UpdateStatus.Error;
|
public bool IsInErrorState => UpdateStatus == UpdateStatus.Error;
|
||||||
|
|
||||||
public async Task Close()
|
public async Task<bool> Close()
|
||||||
{
|
{
|
||||||
await Task.FromResult(true);
|
await Task.FromResult(true);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RelayCommand CloseCommand { get; }
|
public RelayCommand CloseCommand { get; }
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
<Image Source="/Filtration;component/Resources/Icons/arrow_up_large_icon.png" x:Key="MoveUpIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/arrow_up_large_icon.png" x:Key="MoveUpIcon" x:Shared="false" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/arrow_bottom_icon.png" x:Key="MoveToBottomIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/arrow_bottom_icon.png" x:Key="MoveToBottomIcon" x:Shared="false" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/arrow_down_large_icon.png" x:Key="MoveDownIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/arrow_down_large_icon.png" x:Key="MoveDownIcon" x:Shared="false" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" x:Key="SpeakerIcon" x:Shared="false" />
|
|
||||||
<Image Source="/Filtration;component/Resources/Icons/play_icon.png" x:Key="PlayIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/play_icon.png" x:Key="PlayIcon" x:Shared="false" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/about_icon.png" x:Key="AboutIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/about_icon.png" x:Key="AboutIcon" x:Shared="false" />
|
||||||
<Image Source="/Filtration;component/Resources/Icons/ReplaceColors.ico" x:Key="ReplaceColorsIcon" x:Shared="false" />
|
<Image Source="/Filtration;component/Resources/Icons/ReplaceColors.ico" x:Key="ReplaceColorsIcon" x:Shared="false" />
|
||||||
@@ -37,4 +36,4 @@
|
|||||||
<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_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" />
|
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="DisableDropSoundsIcon" x:Shared="False" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<UserControl x:Class="Filtration.Views.ItemFilterBlockView"
|
<UserControl x:Class="Filtration.Views.ItemFilterBlockView"
|
||||||
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:userControls="clr-namespace:Filtration.UserControls"
|
xmlns:userControls="clr-namespace:Filtration.UserControls"
|
||||||
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
|
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
|
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
|
||||||
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||||
xmlns:designTime="clr-namespace:Filtration.ViewModels.DesignTime"
|
xmlns:designTime="clr-namespace:Filtration.ViewModels.DesignTime"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemFilterBlockViewModel, IsDesignTimeCreatable=True}"
|
d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemFilterBlockViewModel, IsDesignTimeCreatable=True}"
|
||||||
d:DesignHeight="400" d:DesignWidth="817">
|
d:DesignHeight="400" d:DesignWidth="817">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@@ -18,6 +18,8 @@
|
|||||||
<views:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
<views:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||||
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
|
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
|
||||||
<converters:MinimapIconToCroppedBitmapConverter x:Key="MinimapIconToCroppedBitmapConverter"/>
|
<converters:MinimapIconToCroppedBitmapConverter x:Key="MinimapIconToCroppedBitmapConverter"/>
|
||||||
|
<converters:DisabledDefaultSoundConverter x:Key="DisabledDefaultSoundConverter"/>
|
||||||
|
<converters:DisabledDefaultSoundTooltipConverter x:Key="DisabledDefaultSoundTooltipConverter"/>
|
||||||
<Style TargetType="{x:Type ContentPresenter}" x:Key="BlockItemFadeInStyle">
|
<Style TargetType="{x:Type ContentPresenter}" x:Key="BlockItemFadeInStyle">
|
||||||
<Setter Property="LayoutTransform">
|
<Setter Property="LayoutTransform">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
@@ -130,48 +132,90 @@
|
|||||||
<WrapPanel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center">
|
<WrapPanel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center">
|
||||||
<Image Height="40" Width="40" Margin="0,0,10,0" Stretch="Fill">
|
<Image Height="40" Width="40" Margin="0,0,10,0" Stretch="Fill">
|
||||||
<Image.Source>
|
<Image.Source>
|
||||||
<MultiBinding Converter="{StaticResource MinimapIconToCroppedBitmapConverter}">
|
<MultiBinding Converter="{StaticResource MinimapIconToCroppedBitmapConverter}">
|
||||||
<Binding Path="DisplayIconSize"/>
|
<Binding Path="DisplayIconSize"/>
|
||||||
<Binding Path="DisplayIconColor"/>
|
<Binding Path="DisplayIconColor"/>
|
||||||
<Binding Path="DisplayIconShape"/>
|
<Binding Path="DisplayIconShape"/>
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</Image.Source>
|
</Image.Source>
|
||||||
</Image>
|
</Image>
|
||||||
|
<Image Height="28" Width="28" Margin="0,0,5,0" Source="../Resources/Icons/no_sound_dds_light.png">
|
||||||
|
<Image.ToolTip>
|
||||||
|
<TextBlock>
|
||||||
|
The default drop sound is disabled for this block.
|
||||||
|
<LineBreak />
|
||||||
|
Drops matched by this block emit no sound whatsoever
|
||||||
|
</TextBlock>
|
||||||
|
</Image.ToolTip>
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="Image">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<MultiDataTrigger>
|
||||||
|
<MultiDataTrigger.Conditions>
|
||||||
|
<Condition Binding="{Binding HasCustomSound}" Value="False" />
|
||||||
|
<Condition Binding="{Binding HasSound}" Value="False" />
|
||||||
|
<Condition Binding="{Binding HasPositionalSound}" Value="False" />
|
||||||
|
<Condition Binding="{Binding HasDisabledDefaultSound}" Value="True" />
|
||||||
|
</MultiDataTrigger.Conditions>
|
||||||
|
<MultiDataTrigger.Setters>
|
||||||
|
<Setter Property="Visibility" Value="Visible" />
|
||||||
|
</MultiDataTrigger.Setters>
|
||||||
|
</MultiDataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
<Button Command="{Binding PlaySoundCommand}"
|
<Button Command="{Binding PlaySoundCommand}"
|
||||||
Width="25"
|
Width="32"
|
||||||
Height="25"
|
Height="32"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Margin="0,0,3,0"
|
Margin="0,0,3,0"
|
||||||
Visibility="{Binding HasSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
Visibility="{Binding HasSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent">
|
||||||
ToolTip="Click to preview drop sound">
|
<Button.ToolTip>
|
||||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<MultiBinding Converter="{StaticResource DisabledDefaultSoundTooltipConverter}">
|
||||||
|
<Binding Source="Click to preview drop sound."/>
|
||||||
|
<Binding Path="HasDisabledDefaultSound"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Button.ToolTip>
|
||||||
|
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding PlayPositionalSoundCommand}"
|
<Button Command="{Binding PlayPositionalSoundCommand}"
|
||||||
Width="25"
|
Width="32"
|
||||||
Height="25"
|
Height="32"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Margin="0,0,3,0"
|
Margin="0,0,3,0"
|
||||||
Visibility="{Binding HasPositionalSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
Visibility="{Binding HasPositionalSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent">
|
||||||
ToolTip="Click to preview positional drop sound">
|
<Button.ToolTip>
|
||||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<MultiBinding Converter="{StaticResource DisabledDefaultSoundTooltipConverter}">
|
||||||
|
<Binding Source="Click to preview positional drop sound."/>
|
||||||
|
<Binding Path="HasDisabledDefaultSound"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Button.ToolTip>
|
||||||
|
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding PlayCustomSoundCommand}"
|
<Button Command="{Binding PlayCustomSoundCommand}"
|
||||||
Width="25"
|
Width="32"
|
||||||
Height="25"
|
Height="32"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
Margin="0,0,3,0"
|
Margin="0,0,3,0"
|
||||||
Visibility="{Binding HasCustomSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
Visibility="{Binding HasCustomSound, Converter={StaticResource BooleanVisibilityConverter}}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent">
|
||||||
ToolTip="Click to preview custom drop sound">
|
<Button.ToolTip>
|
||||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<MultiBinding Converter="{StaticResource DisabledDefaultSoundTooltipConverter}">
|
||||||
|
<Binding Source="Click to preview custom drop sound."/>
|
||||||
|
<Binding Path="HasDisabledDefaultSound"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Button.ToolTip>
|
||||||
|
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Line Y1="5" Y2="38" StrokeThickness="2" Panel.ZIndex="999"
|
<Line Y1="5" Y2="38" StrokeThickness="2" Panel.ZIndex="999"
|
||||||
Stroke="{Binding DisplayEffectColor, Converter={StaticResource ColorToSolidColorBrushConverter}, Mode=OneWay}"
|
Stroke="{Binding DisplayEffectColor, Converter={StaticResource ColorToSolidColorBrushConverter}, Mode=OneWay}"
|
||||||
|
|||||||
@@ -44,8 +44,9 @@ namespace Filtration.Views
|
|||||||
if (sender is ScrollViewer viewer && !e.Handled)
|
if (sender is ScrollViewer viewer && !e.Handled)
|
||||||
{
|
{
|
||||||
// Don't handle events if they originated from a control within an EditableListBoxControl
|
// Don't handle events if they originated from a control within an EditableListBoxControl
|
||||||
// since we still want to allow scrolling within those with the mouse wheel
|
// or a ComboBox since we still want to allow scrolling within those with the mouse wheel
|
||||||
if (e.OriginalSource is DependencyObject dependencyObject && VisualTreeUtility.FindParent<EditableListBoxControl>(dependencyObject) != null)
|
if (e.OriginalSource is DependencyObject dependencyObject && (IsDropDownScrollViewer(dependencyObject) || ParentIsEditableListBoxControl(dependencyObject) ||
|
||||||
|
ParentIsDropDownScrollViewer(dependencyObject)))
|
||||||
{
|
{
|
||||||
e.Handled = false;
|
e.Handled = false;
|
||||||
return;
|
return;
|
||||||
@@ -60,5 +61,20 @@ namespace Filtration.Views
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool ParentIsEditableListBoxControl(DependencyObject dependencyObject)
|
||||||
|
{
|
||||||
|
return VisualTreeUtility.FindParent<EditableListBoxControl>(dependencyObject) != null;
|
||||||
|
}
|
||||||
|
private static bool ParentIsDropDownScrollViewer(DependencyObject dependencyObject)
|
||||||
|
{
|
||||||
|
var parent = VisualTreeUtility.FindParent<ScrollViewer>(dependencyObject);
|
||||||
|
return parent != null && parent.Name == "DropDownScrollViewer";
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool IsDropDownScrollViewer(DependencyObject dependencyObject)
|
||||||
|
{
|
||||||
|
return dependencyObject is ScrollViewer scrollViewer && scrollViewer.Name == "DropDownScrollViewer";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ namespace Filtration.Views
|
|||||||
if (!allDocumentsClosed)
|
if (!allDocumentsClosed)
|
||||||
{
|
{
|
||||||
e.Cancel = true;
|
e.Cancel = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Castle.MicroKernel.SubSystems.Configuration;
|
using Castle.MicroKernel.SubSystems.Configuration;
|
||||||
using Castle.Windsor;
|
using Castle.Windsor;
|
||||||
using Filtration.Services;
|
using Filtration.Services;
|
||||||
|
using Filtration.Utility;
|
||||||
|
|
||||||
namespace Filtration.WindsorInstallers
|
namespace Filtration.WindsorInstallers
|
||||||
{
|
{
|
||||||
@@ -58,6 +59,11 @@ namespace Filtration.WindsorInstallers
|
|||||||
Component.For<IDialogService>()
|
Component.For<IDialogService>()
|
||||||
.ImplementedBy<DialogService>()
|
.ImplementedBy<DialogService>()
|
||||||
.LifeStyle.Singleton);
|
.LifeStyle.Singleton);
|
||||||
|
|
||||||
|
container.Register(
|
||||||
|
Component.For<ISplatNLogAdapter>()
|
||||||
|
.ImplementedBy<SplatNLogAdapter>()
|
||||||
|
.LifeStyle.Singleton);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Filtration is an editor for Path of Exile item filter scripts.
|
|||||||
|
|
||||||
## Current Release (Released 2018-09-30)
|
## Current Release (Released 2018-09-30)
|
||||||
<b>Installer</b><br>
|
<b>Installer</b><br>
|
||||||
<a href="https://github.com/ben-wallis/Filtration/releases/download/1.0.1/Setup.exe">Setup.exe</a>
|
<a href="https://github.com/ben-wallis/Filtration/releases/download/1.0.3/Setup.exe">Setup.exe</a>
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
Filtration requires .NET Framework 4.6.1 installed.
|
Filtration requires .NET Framework 4.6.1 installed.
|
||||||
|
|||||||
Reference in New Issue
Block a user