Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e80295cb69 | ||
|
|
f3ed386845 | ||
|
|
89e0c717e8 | ||
|
|
8924637b98 | ||
|
|
b0b912c676 | ||
|
|
92ebc51e7b | ||
|
|
95e7581a5b | ||
|
|
9cb854b584 | ||
|
|
61c2902f0c | ||
|
|
dc157713f3 | ||
|
|
16fe837544 |
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace Filtration.Common.Services
|
namespace Filtration.Common.Services
|
||||||
{
|
{
|
||||||
@@ -20,7 +21,7 @@ namespace Filtration.Common.Services
|
|||||||
|
|
||||||
public void WriteFileFromString(string filePath, string inputString)
|
public void WriteFileFromString(string filePath, string inputString)
|
||||||
{
|
{
|
||||||
File.WriteAllText(filePath, inputString);
|
File.WriteAllText(filePath, inputString, Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool DirectoryExists(string directoryPath)
|
public bool DirectoryExists(string directoryPath)
|
||||||
|
|||||||
@@ -21,30 +21,29 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<DataTemplate x:Key="EditableComponentNameTemplate">
|
<DataTemplate x:Key="EditableComponentNameTemplate">
|
||||||
<TextBox Text="{Binding ComponentName}" />
|
<StackPanel>
|
||||||
|
<TextBlock Text="{Binding UsageCount, StringFormat='Usages: {0}'}"
|
||||||
|
FontSize="10"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Visibility="{Binding Path=DataContext.EditEnabled, RelativeSource={RelativeSource AncestorType={x:Type views:ThemeEditorView}}, Converter={StaticResource BooleanVisibilityConverter}}">
|
||||||
|
<TextBlock.Style>
|
||||||
|
<Style TargetType="TextBlock">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding UsageCount}" Value="0">
|
||||||
|
<Setter Property="Foreground" Value="Red" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
<Setter Property="Foreground" Value="SteelBlue" />
|
||||||
|
</Style>
|
||||||
|
</TextBlock.Style>
|
||||||
|
</TextBlock>
|
||||||
|
<TextBox Text="{Binding ComponentName}" />
|
||||||
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
||||||
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
<DockPanel LastChildFill="True">
|
|
||||||
<TextBlock DockPanel.Dock="Left"
|
|
||||||
Text="{Binding UsageCount, StringFormat='Usages: {0}'}"
|
|
||||||
FontSize="10"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Visibility="{Binding Path=DataContext.EditEnabled, RelativeSource={RelativeSource AncestorType={x:Type views:ThemeEditorView}}, Converter={StaticResource BooleanVisibilityConverter}}">
|
|
||||||
<TextBlock.Style>
|
|
||||||
<Style TargetType="TextBlock">
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding UsageCount}" Value="0">
|
|
||||||
<Setter Property="Foreground" Value="Red" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
<Setter Property="Foreground" Value="SteelBlue" />
|
|
||||||
</Style>
|
|
||||||
</TextBlock.Style>
|
|
||||||
</TextBlock>
|
|
||||||
</DockPanel>
|
|
||||||
<ContentControl Grid.Row="1" Content="{Binding}">
|
<ContentControl Grid.Row="1" Content="{Binding}">
|
||||||
<ContentControl.Style>
|
<ContentControl.Style>
|
||||||
<Style TargetType="ContentControl">
|
<Style TargetType="ContentControl">
|
||||||
@@ -59,7 +58,6 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</ContentControl.Style>
|
</ContentControl.Style>
|
||||||
</ContentControl>
|
</ContentControl>
|
||||||
|
|
||||||
<xctk:ColorPicker Grid.Row="2" SelectedColor="{Binding Color}" />
|
<xctk:ColorPicker Grid.Row="2" SelectedColor="{Binding Color}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using NLog;
|
|||||||
|
|
||||||
namespace Filtration
|
namespace Filtration
|
||||||
{
|
{
|
||||||
public partial class App
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
private IWindsorContainer _container;
|
private IWindsorContainer _container;
|
||||||
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger _logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ using System.Windows;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("0.8.*")]
|
[assembly: AssemblyVersion("0.9.*")]
|
||||||
|
|
||||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
||||||
@@ -8,7 +8,6 @@ Claws
|
|||||||
Daggers
|
Daggers
|
||||||
Wands
|
Wands
|
||||||
One Hand Swords
|
One Hand Swords
|
||||||
Thrusting One Hand Swords
|
|
||||||
One Hand Axes
|
One Hand Axes
|
||||||
One Hand Maces
|
One Hand Maces
|
||||||
Bows
|
Bows
|
||||||
@@ -25,7 +24,6 @@ Boots
|
|||||||
Body Armours
|
Body Armours
|
||||||
Helmets
|
Helmets
|
||||||
Shields
|
Shields
|
||||||
Stackable Currency
|
|
||||||
Quest Items
|
Quest Items
|
||||||
Sceptres
|
Sceptres
|
||||||
Utility Flasks
|
Utility Flasks
|
||||||
|
|||||||
@@ -317,6 +317,12 @@ namespace Filtration.ViewModels
|
|||||||
get { return Block.HasBlockItemOfType<SoundBlockItem>(); }
|
get { return Block.HasBlockItemOfType<SoundBlockItem>(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public bool HasAudioVisualBlockItems
|
||||||
|
{
|
||||||
|
get { return AudioVisualBlockItems.Any(); }
|
||||||
|
}
|
||||||
|
|
||||||
private void OnSwitchBlockItemsViewCommand()
|
private void OnSwitchBlockItemsViewCommand()
|
||||||
{
|
{
|
||||||
AudioVisualBlockItemsGridVisible = !AudioVisualBlockItemsGridVisible;
|
AudioVisualBlockItemsGridVisible = !AudioVisualBlockItemsGridVisible;
|
||||||
@@ -459,6 +465,7 @@ namespace Filtration.ViewModels
|
|||||||
RaisePropertyChanged("RegularBlockItems");
|
RaisePropertyChanged("RegularBlockItems");
|
||||||
RaisePropertyChanged("SummaryBlockItems");
|
RaisePropertyChanged("SummaryBlockItems");
|
||||||
RaisePropertyChanged("AudioVisualBlockItems");
|
RaisePropertyChanged("AudioVisualBlockItems");
|
||||||
|
RaisePropertyChanged("HasAudioVisualBlockItems");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ namespace Filtration.ViewModels
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var result = _messageBoxService.Show("Filtration",
|
var result = _messageBoxService.Show("Filtration",
|
||||||
"Want to save your changes to this script?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
"Save script \"" + Filename + "\"?", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
||||||
|
|
||||||
switch (result)
|
switch (result)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
@@ -33,6 +34,7 @@ namespace Filtration.ViewModels
|
|||||||
{
|
{
|
||||||
RelayCommand OpenScriptCommand { get; }
|
RelayCommand OpenScriptCommand { get; }
|
||||||
RelayCommand NewScriptCommand { get; }
|
RelayCommand NewScriptCommand { get; }
|
||||||
|
bool CloseAllDocuments();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class MainWindowViewModel : FiltrationViewModelBase, IMainWindowViewModel
|
internal class MainWindowViewModel : FiltrationViewModelBase, IMainWindowViewModel
|
||||||
@@ -110,7 +112,7 @@ namespace Filtration.ViewModels
|
|||||||
AddBorderColorThemeComponentCommand = new RelayCommand(OnAddBorderColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
AddBorderColorThemeComponentCommand = new RelayCommand(OnAddBorderColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
||||||
DeleteThemeComponentCommand = new RelayCommand(OnDeleteThemeComponentCommand,
|
DeleteThemeComponentCommand = new RelayCommand(OnDeleteThemeComponentCommand,
|
||||||
() =>
|
() =>
|
||||||
ActiveDocumentIsTheme && ActiveDocumentIsTheme &&
|
ActiveDocumentIsTheme && ActiveThemeIsEditable &&
|
||||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent != null);
|
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent != null);
|
||||||
|
|
||||||
ExpandAllBlocksCommand = new RelayCommand(OnExpandAllBlocksCommand, () => ActiveDocumentIsScript);
|
ExpandAllBlocksCommand = new RelayCommand(OnExpandAllBlocksCommand, () => ActiveDocumentIsScript);
|
||||||
@@ -216,11 +218,11 @@ namespace Filtration.ViewModels
|
|||||||
public async void CheckForUpdates()
|
public async void CheckForUpdates()
|
||||||
{
|
{
|
||||||
var assemblyVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
var assemblyVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
||||||
|
|
||||||
var result = await _updateCheckService.GetUpdateData();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var result = await _updateCheckService.GetUpdateData();
|
||||||
|
|
||||||
if (result.LatestVersionMajorPart >= assemblyVersion.FileMajorPart &&
|
if (result.LatestVersionMajorPart >= assemblyVersion.FileMajorPart &&
|
||||||
result.LatestVersionMinorPart > assemblyVersion.FileMinorPart)
|
result.LatestVersionMinorPart > assemblyVersion.FileMinorPart)
|
||||||
{
|
{
|
||||||
@@ -626,5 +628,22 @@ namespace Filtration.ViewModels
|
|||||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.DeleteThemeComponentCommand.Execute(
|
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.DeleteThemeComponentCommand.Execute(
|
||||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent);
|
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool CloseAllDocuments()
|
||||||
|
{
|
||||||
|
var openDocuments = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().ToList();
|
||||||
|
|
||||||
|
foreach (var document in openDocuments)
|
||||||
|
{
|
||||||
|
var docCount = _avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().Count();
|
||||||
|
document.Close();
|
||||||
|
if (_avalonDockWorkspaceViewModel.OpenDocuments.OfType<IEditableDocument>().Count() == docCount)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -271,7 +271,9 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" FontStyle="Italic" Visibility="{Binding HasAudioVisualBlockItems, Converter={StaticResource InverseBooleanVisibilityConverter}}">To change the appearance of this block, add a Text, Background or Border Block Item above.</TextBlock>
|
||||||
|
|
||||||
<!-- Block Items -->
|
<!-- Block Items -->
|
||||||
<WrapPanel Grid.Row="1" MaxHeight="200">
|
<WrapPanel Grid.Row="1" MaxHeight="200">
|
||||||
<WrapPanel.Resources>
|
<WrapPanel.Resources>
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
xmlns:views="clr-namespace:Filtration.Views"
|
xmlns:views="clr-namespace:Filtration.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DataContext="{d:DesignInstance Type=viewModels:MainWindowViewModel}"
|
d:DataContext="{d:DesignInstance Type=viewModels:MainWindowViewModel}"
|
||||||
Title="{Binding WindowTitle}" Height="762" Width="1126" IsIconVisible="True" >
|
Title="{Binding WindowTitle}" Height="762" Width="1126" IsIconVisible="True"
|
||||||
|
Closing="MainWindow_OnClosing">
|
||||||
<fluent:RibbonWindow.InputBindings>
|
<fluent:RibbonWindow.InputBindings>
|
||||||
<KeyBinding Command="{Binding SaveCommand}" Modifiers="Control" Key="S" />
|
<KeyBinding Command="{Binding SaveCommand}" Modifiers="Control" Key="S" />
|
||||||
<KeyBinding Command="{Binding OpenScriptCommand}" Modifiers="Control" Key="O" />
|
<KeyBinding Command="{Binding OpenScriptCommand}" Modifiers="Control" Key="O" />
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
using System.Windows;
|
using System;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows;
|
||||||
|
using Filtration.Annotations;
|
||||||
using Filtration.ViewModels;
|
using Filtration.ViewModels;
|
||||||
|
|
||||||
namespace Filtration.Views
|
namespace Filtration.Views
|
||||||
@@ -10,8 +13,11 @@ namespace Filtration.Views
|
|||||||
|
|
||||||
internal partial class MainWindow : IMainWindow
|
internal partial class MainWindow : IMainWindow
|
||||||
{
|
{
|
||||||
|
private IMainWindowViewModel _mainWindowViewModel;
|
||||||
|
|
||||||
public MainWindow(IMainWindowViewModel mainWindowViewModel)
|
public MainWindow(IMainWindowViewModel mainWindowViewModel)
|
||||||
{
|
{
|
||||||
|
_mainWindowViewModel = mainWindowViewModel;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = mainWindowViewModel;
|
DataContext = mainWindowViewModel;
|
||||||
}
|
}
|
||||||
@@ -31,5 +37,15 @@ namespace Filtration.Views
|
|||||||
RibbonRoot.SelectedTabItem = ThemeToolsTabItem;
|
RibbonRoot.SelectedTabItem = ThemeToolsTabItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MainWindow_OnClosing(object sender, CancelEventArgs e)
|
||||||
|
{
|
||||||
|
var allDocumentsClosed = _mainWindowViewModel.CloseAllDocuments();
|
||||||
|
|
||||||
|
if (!allDocumentsClosed)
|
||||||
|
{
|
||||||
|
e.Cancel = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Filtration is an editor for Path of Exile item filter scripts.
|
Filtration is an editor for Path of Exile item filter scripts.
|
||||||
|
|
||||||
## Current Release (Released 2015-07-06)
|
## Current Release (Released 2015-07-10)
|
||||||
<b>Installer (6.31mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.7/filtration_0.7_setup.exe">filtration_0.7_setup.exe</a>
|
<b>Installer (6.31mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.8/filtration_0.8_setup.exe">filtration_0.8_setup.exe</a>
|
||||||
|
|
||||||
<b>Zip File (7.91mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.7/filtration_0.7.zip">filtration_0.7.zip</a>
|
<b>Zip File (7.9mb)</b> <a href="https://github.com/ben-wallis/Filtration/releases/download/0.8/filtration_0.8.zip">filtration_0.8.zip</a>
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
Filtration requires .NET Framework 4.5.1 installed.
|
Filtration requires .NET Framework 4.5.1 installed.
|
||||||
|
|||||||
Reference in New Issue
Block a user