9 Commits
1.0.1 ... 1.0.3

Author SHA1 Message Date
Ben Wallis
c96aa472d9 Bumped version to 1.0.3 2018-10-01 17:23:38 +01:00
Ben Wallis
d4e8a72d47 Implemented Splat logging integration to enable Squirrel to write log files 2018-10-01 17:00:55 +01:00
Ben Wallis
4c826f42fd Bumped version to 1.0.3-beta2 2018-10-01 13:31:57 +01:00
azakhi
4022cf12a0 Fix crash caused by null selected blocks (#92)
* Fixed a crash caused by null selected blocks
2018-10-01 13:29:35 +01:00
Ben Wallis
8073948cfe Added missing AlertSound mp3 files to installer 2018-10-01 12:26:27 +01:00
Ben Wallis
f331bffee7 Update README.md 2018-09-30 14:04:44 +01:00
Ben Wallis
f238bbf856 Fixed a crash on exit caused by a null SelectedBlockViewModel 2018-09-30 14:02:47 +01:00
Ben Wallis
a0191576f0 Update README.md 2018-09-30 13:57:35 +01:00
Ben Wallis
1d96b69800 Update README.md 2018-09-30 12:51:47 +01:00
10 changed files with 87 additions and 11 deletions

View File

@@ -230,6 +230,7 @@
<Compile Include="UserControls\ThemeComponentSelectionControl.xaml.cs"> <Compile Include="UserControls\ThemeComponentSelectionControl.xaml.cs">
<DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon> <DependentUpon>ThemeComponentSelectionControl.xaml</DependentUpon>
</Compile> </Compile>
<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" />

View File

@@ -9,12 +9,13 @@
<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 2018</copyright>
<releaseNotes>* Fixed the Block Output Preview pane not working <releaseNotes>* Added missing AlertSound mp3 resources to installer
* The Block Output Preview pane now supports previewing multiple selected blocks * Fixed a crash related to performing certain commands with no blocks selected
* The Block Output Preview pane now supports selecting the text within it</releaseNotes> * Added extra logging to updater</releaseNotes>
<dependencies /> <dependencies />
</metadata> </metadata>
<files> <files>
<file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*;*.xml"/> <file src="*.*" target="lib\net45\" exclude="*.pdb;*.nupkg;*.vshost.*;*.xml"/>
<file src="Resources\AlertSounds\*.mp3" target="lib\net45\Resources\AlertSounds\" />
</files> </files>
</package> </package>

View File

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

View File

@@ -10,8 +10,8 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.1")] [assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyInformationalVersion("1.0.1")] [assembly: AssemblyInformationalVersion("1.0.3")]
[assembly: InternalsVisibleTo("Filtration.Tests")] [assembly: InternalsVisibleTo("Filtration.Tests")]
[assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")] [assembly: InternalsVisibleTo("Filtration.ItemFilterPreview.Tests")]

View File

@@ -4,6 +4,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;
@@ -76,11 +77,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;

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

View File

@@ -379,7 +379,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--);
} }
@@ -554,6 +554,8 @@ namespace Filtration.ViewModels
public bool CanModifySelectedBlocks() public bool CanModifySelectedBlocks()
{ {
ValidateSelectedBlocks();
if (SelectedBlockViewModels.Count < 1) if (SelectedBlockViewModels.Count < 1)
return false; return false;
@@ -570,6 +572,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;

View File

@@ -57,7 +57,8 @@ namespace Filtration.ViewModels.ToolPanes
private void OnLastSelectedBlockChanged(object sender, EventArgs e) private void OnLastSelectedBlockChanged(object sender, EventArgs e)
{ {
if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.SelectedBlockViewModels == null || if (AvalonDockWorkspaceViewModel.ActiveScriptViewModel?.SelectedBlockViewModels == null ||
AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.Count == 0) AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.Count == 0 ||
AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModels.FirstOrDefault() == null)
{ {
PreviewText = string.Empty; PreviewText = string.Empty;
return; return;

View File

@@ -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
{ {
@@ -43,6 +44,11 @@ namespace Filtration.WindsorInstallers
Component.For<ISettingsService>() Component.For<ISettingsService>()
.ImplementedBy<SettingsService>() .ImplementedBy<SettingsService>()
.LifeStyle.Singleton); .LifeStyle.Singleton);
container.Register(
Component.For<ISplatNLogAdapter>()
.ImplementedBy<SplatNLogAdapter>()
.LifeStyle.Singleton);
} }
} }
} }

View File

@@ -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.0/Setup.exe">Setup.exe</a> <a href="https://github.com/ben-wallis/Filtration/releases/download/1.0.2/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.
@@ -24,10 +24,10 @@ If you'd like to make your script fully compatible with Filtration, please take
## Screenshots ## Screenshots
##### Main Window ##### Main Window
<img src="http://i.imgur.com/eAsMoSo.png" /> <img src="https://i.imgur.com/d3tKEab.png" />
##### Theme Editor ##### Theme Editor
<img src="http://i.imgur.com/FJWJknO.png" /> <img src="https://i.imgur.com/Pi9wds1.png" />
## Contact ## Contact
You can find me on irc.freenode.net in #filtration You can find me on irc.freenode.net in #filtration