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.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Filtration.Common.Services
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace Filtration.Common.Services
|
||||
|
||||
public void WriteFileFromString(string filePath, string inputString)
|
||||
{
|
||||
File.WriteAllText(filePath, inputString);
|
||||
File.WriteAllText(filePath, inputString, Encoding.UTF8);
|
||||
}
|
||||
|
||||
public bool DirectoryExists(string directoryPath)
|
||||
|
||||
@@ -21,15 +21,8 @@
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.Resources>
|
||||
<DataTemplate x:Key="EditableComponentNameTemplate">
|
||||
<TextBox Text="{Binding ComponentName}" />
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
||||
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
||||
</DataTemplate>
|
||||
</Grid.Resources>
|
||||
<DockPanel LastChildFill="True">
|
||||
<TextBlock DockPanel.Dock="Left"
|
||||
Text="{Binding UsageCount, StringFormat='Usages: {0}'}"
|
||||
<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}}">
|
||||
@@ -44,7 +37,13 @@
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DockPanel>
|
||||
<TextBox Text="{Binding ComponentName}" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
<DataTemplate x:Key="ViewOnlyComponentNameTemplate">
|
||||
<TextBlock Text="{Binding ComponentName}" ToolTip="{Binding ComponentName}" />
|
||||
</DataTemplate>
|
||||
</Grid.Resources>
|
||||
<ContentControl Grid.Row="1" Content="{Binding}">
|
||||
<ContentControl.Style>
|
||||
<Style TargetType="ContentControl">
|
||||
@@ -59,7 +58,6 @@
|
||||
</Style>
|
||||
</ContentControl.Style>
|
||||
</ContentControl>
|
||||
|
||||
<xctk:ColorPicker Grid.Row="2" SelectedColor="{Binding Color}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -17,7 +17,7 @@ using NLog;
|
||||
|
||||
namespace Filtration
|
||||
{
|
||||
public partial class App
|
||||
public partial class App : Application
|
||||
{
|
||||
private IWindsorContainer _container;
|
||||
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
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("0.8.*")]
|
||||
[assembly: AssemblyVersion("0.9.*")]
|
||||
|
||||
[assembly: InternalsVisibleTo("Filtration.Tests")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
|
||||
@@ -8,7 +8,6 @@ Claws
|
||||
Daggers
|
||||
Wands
|
||||
One Hand Swords
|
||||
Thrusting One Hand Swords
|
||||
One Hand Axes
|
||||
One Hand Maces
|
||||
Bows
|
||||
@@ -25,7 +24,6 @@ Boots
|
||||
Body Armours
|
||||
Helmets
|
||||
Shields
|
||||
Stackable Currency
|
||||
Quest Items
|
||||
Sceptres
|
||||
Utility Flasks
|
||||
|
||||
@@ -317,6 +317,12 @@ namespace Filtration.ViewModels
|
||||
get { return Block.HasBlockItemOfType<SoundBlockItem>(); }
|
||||
}
|
||||
|
||||
|
||||
public bool HasAudioVisualBlockItems
|
||||
{
|
||||
get { return AudioVisualBlockItems.Any(); }
|
||||
}
|
||||
|
||||
private void OnSwitchBlockItemsViewCommand()
|
||||
{
|
||||
AudioVisualBlockItemsGridVisible = !AudioVisualBlockItemsGridVisible;
|
||||
@@ -459,6 +465,7 @@ namespace Filtration.ViewModels
|
||||
RaisePropertyChanged("RegularBlockItems");
|
||||
RaisePropertyChanged("SummaryBlockItems");
|
||||
RaisePropertyChanged("AudioVisualBlockItems");
|
||||
RaisePropertyChanged("HasAudioVisualBlockItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace Filtration.ViewModels
|
||||
else
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
@@ -33,6 +34,7 @@ namespace Filtration.ViewModels
|
||||
{
|
||||
RelayCommand OpenScriptCommand { get; }
|
||||
RelayCommand NewScriptCommand { get; }
|
||||
bool CloseAllDocuments();
|
||||
}
|
||||
|
||||
internal class MainWindowViewModel : FiltrationViewModelBase, IMainWindowViewModel
|
||||
@@ -110,7 +112,7 @@ namespace Filtration.ViewModels
|
||||
AddBorderColorThemeComponentCommand = new RelayCommand(OnAddBorderColorThemeComponentCommand, () => ActiveDocumentIsTheme && ActiveThemeIsEditable);
|
||||
DeleteThemeComponentCommand = new RelayCommand(OnDeleteThemeComponentCommand,
|
||||
() =>
|
||||
ActiveDocumentIsTheme && ActiveDocumentIsTheme &&
|
||||
ActiveDocumentIsTheme && ActiveThemeIsEditable &&
|
||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.SelectedThemeComponent != null);
|
||||
|
||||
ExpandAllBlocksCommand = new RelayCommand(OnExpandAllBlocksCommand, () => ActiveDocumentIsScript);
|
||||
@@ -217,10 +219,10 @@ namespace Filtration.ViewModels
|
||||
{
|
||||
var assemblyVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
var result = await _updateCheckService.GetUpdateData();
|
||||
|
||||
try
|
||||
{
|
||||
var result = await _updateCheckService.GetUpdateData();
|
||||
|
||||
if (result.LatestVersionMajorPart >= assemblyVersion.FileMajorPart &&
|
||||
result.LatestVersionMinorPart > assemblyVersion.FileMinorPart)
|
||||
{
|
||||
@@ -626,5 +628,22 @@ namespace Filtration.ViewModels
|
||||
_avalonDockWorkspaceViewModel.ActiveThemeViewModel.DeleteThemeComponentCommand.Execute(
|
||||
_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,6 +272,8 @@
|
||||
</ItemsControl.ItemTemplate>
|
||||
</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 -->
|
||||
<WrapPanel Grid.Row="1" MaxHeight="200">
|
||||
<WrapPanel.Resources>
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
xmlns:views="clr-namespace:Filtration.Views"
|
||||
mc:Ignorable="d"
|
||||
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>
|
||||
<KeyBinding Command="{Binding SaveCommand}" Modifiers="Control" Key="S" />
|
||||
<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;
|
||||
|
||||
namespace Filtration.Views
|
||||
@@ -10,8 +13,11 @@ namespace Filtration.Views
|
||||
|
||||
internal partial class MainWindow : IMainWindow
|
||||
{
|
||||
private IMainWindowViewModel _mainWindowViewModel;
|
||||
|
||||
public MainWindow(IMainWindowViewModel mainWindowViewModel)
|
||||
{
|
||||
_mainWindowViewModel = mainWindowViewModel;
|
||||
InitializeComponent();
|
||||
DataContext = mainWindowViewModel;
|
||||
}
|
||||
@@ -31,5 +37,15 @@ namespace Filtration.Views
|
||||
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.
|
||||
|
||||
## Current Release (Released 2015-07-06)
|
||||
<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>
|
||||
## Current Release (Released 2015-07-10)
|
||||
<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
|
||||
Filtration requires .NET Framework 4.5.1 installed.
|
||||
|
||||
Reference in New Issue
Block a user