Major UI overhaul, implemented FluentRibbon

This commit is contained in:
Ben 2015-06-27 18:08:06 +01:00
parent 5b4c622345
commit dce21d84b3
33 changed files with 712 additions and 185 deletions

View File

@ -1,6 +1,4 @@
using System.Windows.Media;
namespace Filtration.Interface
namespace Filtration.Interface
{
public interface IDocument
{

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows.Media;
using Filtration.ObjectModel;
@ -1325,6 +1326,108 @@ namespace Filtration.Tests.Translators
Assert.AreEqual(expectedResult, result);
}
[Test]
public void ReplaceColorBlockItemsFromString_SingleLine_ReplacesColorBlock()
{
// Arrange
var testInputString = "SetTextColor 240 200 150 # Rarest Currency";
var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>();
var testInputBlockItem = new TextColorBlockItem(Colors.Red);
testInputBlockItems.Add(testInputBlockItem);
// Act
_testUtility.Translator.ReplaceColorBlockItemsFromString(testInputBlockItems, testInputString);
// Assert
var textColorBlockItem = testInputBlockItems.First(b => b is TextColorBlockItem) as TextColorBlockItem;
Assert.IsNotNull(textColorBlockItem);
Assert.AreNotSame(testInputBlockItem, textColorBlockItem);
Assert.AreEqual(new Color { R = 240, G = 200, B = 150, A = 255}, textColorBlockItem.Color);
}
[Test]
public void ReplaceColorBlockItemsFromString_MalformedLine_DoesNothing()
{
// Arrange
var testInputString = "SetTextCsaolor 240 200 150 # Rarest Currency";
var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>();
var testInputBlockItem = new TextColorBlockItem(Colors.Red);
testInputBlockItems.Add(testInputBlockItem);
// Act
_testUtility.Translator.ReplaceColorBlockItemsFromString(testInputBlockItems, testInputString);
// Assert
var textColorBlockItem = testInputBlockItems.First(b => b is TextColorBlockItem) as TextColorBlockItem;
Assert.IsNotNull(textColorBlockItem);
Assert.AreSame(testInputBlockItem, textColorBlockItem);
}
[Test]
public void ReplaceColorBlockItemsFromString_MultipleLines_ExistingBlockItems()
{
// Arrange
var testInputString = "SetTextColor 240 200 150 # Rarest Currency" + Environment.NewLine +
"SetBackgroundColor 0 0 0 # Rarest Currency Background" + Environment.NewLine +
"SetBorderColor 255 255 255 # Rarest Currency Border";
var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>();
var testInputTextColorBlockItem = new TextColorBlockItem(Colors.Red);
var testInputBackgroundColorBlockItem = new BackgroundColorBlockItem(Colors.Blue);
var testInpuBorderColorBlockItem = new BorderColorBlockItem(Colors.Yellow);
testInputBlockItems.Add(testInputTextColorBlockItem);
testInputBlockItems.Add(testInputBackgroundColorBlockItem);
testInputBlockItems.Add(testInpuBorderColorBlockItem);
// Act
_testUtility.Translator.ReplaceColorBlockItemsFromString(testInputBlockItems, testInputString);
// Assert
var textColorBlockItem = testInputBlockItems.First(b => b is TextColorBlockItem) as TextColorBlockItem;
Assert.IsNotNull(textColorBlockItem);
Assert.AreNotSame(testInputTextColorBlockItem, textColorBlockItem);
Assert.AreEqual(new Color {A = 255, R = 240, G = 200, B = 150}, textColorBlockItem.Color);
var backgroundColorBlockItem = testInputBlockItems.First(b => b is BackgroundColorBlockItem) as BackgroundColorBlockItem;
Assert.IsNotNull(backgroundColorBlockItem);
Assert.AreNotSame(testInputBackgroundColorBlockItem, backgroundColorBlockItem);
Assert.AreEqual(new Color { A = 255, R = 0, G = 0, B = 0 }, backgroundColorBlockItem.Color);
var borderColorBlockItem = testInputBlockItems.First(b => b is BorderColorBlockItem) as BorderColorBlockItem;
Assert.IsNotNull(borderColorBlockItem);
Assert.AreNotSame(testInpuBorderColorBlockItem, borderColorBlockItem);
Assert.AreEqual(new Color { A = 255, R = 255, G = 255, B = 255 }, borderColorBlockItem.Color);
}
[Test]
public void ReplaceColorBlockItemsFromString_MultipleLines_NoExistingBlockItems()
{
// Arrange
var testInputString = "SetTextColor 240 200 150 # Rarest Currency" + Environment.NewLine +
"SetBackgroundColor 0 0 0 # Rarest Currency Background" + Environment.NewLine +
"SetBorderColor 255 255 255 # Rarest Currency Border";
var testInputBlockItems = new ObservableCollection<IItemFilterBlockItem>();
// Act
_testUtility.Translator.ReplaceColorBlockItemsFromString(testInputBlockItems, testInputString);
// Assert
var textColorBlockItem = testInputBlockItems.First(b => b is TextColorBlockItem) as TextColorBlockItem;
Assert.IsNotNull(textColorBlockItem);
Assert.AreEqual(new Color { A = 255, R = 240, G = 200, B = 150 }, textColorBlockItem.Color);
var backgroundColorBlockItem = testInputBlockItems.First(b => b is BackgroundColorBlockItem) as BackgroundColorBlockItem;
Assert.IsNotNull(backgroundColorBlockItem);
Assert.AreEqual(new Color { A = 255, R = 0, G = 0, B = 0 }, backgroundColorBlockItem.Color);
var borderColorBlockItem = testInputBlockItems.First(b => b is BorderColorBlockItem) as BorderColorBlockItem;
Assert.IsNotNull(borderColorBlockItem);
Assert.AreEqual(new Color { A = 255, R = 255, G = 255, B = 255 }, borderColorBlockItem.Color);
}
private class ItemFilterBlockTranslatorTestUtility
{
public ItemFilterBlockTranslatorTestUtility()

View File

@ -36,7 +36,7 @@ namespace Filtration.ThemeEditor.ViewModels
var icon = new BitmapImage();
icon.BeginInit();
icon.UriSource = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/theme_icon.png");
icon.UriSource = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/Theme.ico");
icon.EndInit();
IconSource = icon;
}

View File

@ -5,14 +5,18 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Steel.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
<ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Generic.xaml" />
<ResourceDictionary Source="pack://application:,,,/Fluent;component/Themes/windows8/silver.xaml" />
<ResourceDictionary Source="Views/CrossButton.xaml" />
<ResourceDictionary Source="Views/IconsDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<!--<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Steel.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />-->

View File

@ -9,7 +9,30 @@ namespace Filtration.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (bool)value ? Visibility.Visible : Visibility.Collapsed;
if (value is bool && targetType == typeof (Visibility))
{
var val = (bool) value;
if (val)
{
return Visibility.Visible;
}
if (parameter is Visibility)
{
return parameter;
}
return Visibility.Collapsed;
}
if (value != null)
{
return Visibility.Visible;
}
if (parameter is Visibility)
{
return parameter;
}
return Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

View File

@ -0,0 +1,43 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace Filtration.Converters
{
internal class BooleanVisibilityConverterCopy : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is bool && targetType == typeof (Visibility))
{
var val = (bool) value;
if (val)
{
return Visibility.Visible;
}
if (parameter is Visibility)
{
return parameter;
}
return Visibility.Collapsed;
}
if (value != null)
{
return Visibility.Visible;
}
if (parameter is Visibility)
{
return parameter;
}
return Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@ -53,6 +53,12 @@
<Reference Include="Castle.Windsor">
<HintPath>..\packages\Castle.Windsor.3.3.0\lib\net45\Castle.Windsor.dll</HintPath>
</Reference>
<Reference Include="Fluent">
<HintPath>..\packages\Fluent.Ribbon.3.4.0\lib\net45\Fluent.dll</HintPath>
</Reference>
<Reference Include="FontAwesome.WPF">
<HintPath>..\packages\FontAwesome.WPF.4.3.0.3\lib\FontAwesome.WPF.dll</HintPath>
</Reference>
<Reference Include="GalaSoft.MvvmLight, Version=5.1.1.35049, Culture=neutral, PublicKeyToken=e7570ab207bcb616, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MvvmLightLibs.5.1.1.0\lib\net45\GalaSoft.MvvmLight.dll</HintPath>
@ -61,9 +67,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MvvmLightLibs.5.1.1.0\lib\net45\GalaSoft.MvvmLight.Platform.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro">
<HintPath>..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.ObjectModel" />
@ -75,7 +78,9 @@
<HintPath>..\packages\WPFToolkit.3.5.50211.1\lib\System.Windows.Controls.Layout.Toolkit.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Fluent.Ribbon.3.4.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xaml">
@ -124,6 +129,7 @@
<Compile Include="Converters\BooleanInverterConverter.cs" />
<Compile Include="Converters\BooleanToBlockActionInverseConverter.cs" />
<Compile Include="Converters\BooleanToBlockActionConverter.cs" />
<Compile Include="Converters\BooleanVisibilityConverterCopy.cs" />
<Compile Include="Converters\ColorToSolidColorBrushConverter.cs" />
<Compile Include="Converters\HashSignRemovalConverter.cs" />
<Compile Include="Converters\ItemRarityConverter.cs" />
@ -346,10 +352,8 @@
<Resource Include="Resources\logo.png" />
<Resource Include="Resources\Icons\add_block_icon.png" />
<Resource Include="Resources\Icons\add_section_icon.png" />
<Resource Include="Resources\Icons\copy_icon.png" />
<Resource Include="Resources\Icons\delete_icon.png" />
<Resource Include="Resources\Icons\new_icon.png" />
<Resource Include="Resources\Icons\paste_icon.png" />
<Resource Include="Resources\Icons\save_all_icon.png" />
<Resource Include="Resources\Icons\save_icon.png" />
<Resource Include="Resources\Icons\open_icon.png" />
@ -361,7 +365,6 @@
<Resource Include="Resources\Icons\arrow_bottom_icon.png" />
<Resource Include="Resources\Icons\about_icon.png" />
<Resource Include="Resources\filtration.ico" />
<Resource Include="Resources\Icons\replace_colors_icon.png" />
<Resource Include="Resources\Icons\block_group_browser_icon.png" />
<Resource Include="Resources\Icons\clear_filter_icon.png" />
<Resource Include="Resources\Icons\filter_icon.png" />
@ -369,8 +372,13 @@
<Resource Include="Resources\Icons\block_output_preview_icon.png" />
<Resource Include="Resources\Icons\collapse_icon.png" />
<Resource Include="Resources\Icons\expand_icon.png" />
<Resource Include="Resources\Icons\theme_icon.png" />
<Resource Include="Resources\Icons\script_icon.png" />
<Resource Include="Resources\Icons\settings_icon.png" />
<Resource Include="Resources\Icons\Copy.ico" />
<Resource Include="Resources\Icons\Paste.ico" />
<Resource Include="Resources\Icons\PasteStyle.ico" />
<Resource Include="Resources\Icons\ReplaceColors.ico" />
<Resource Include="Resources\Icons\Theme.ico" />
<Content Include="Resources\ItemBaseTypes.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
@ -17,6 +18,7 @@ namespace Filtration.Translators
{
ItemFilterBlock TranslateStringToItemFilterBlock(string inputString);
string TranslateItemFilterBlockToString(ItemFilterBlock block);
void ReplaceColorBlockItemsFromString(ObservableCollection<IItemFilterBlockItem> blockItems, string inputString);
}
internal class ItemFilterBlockTranslator : IItemFilterBlockTranslator
@ -260,26 +262,30 @@ namespace Filtration.Translators
}
private void AddColorItemToBlockItems<T>(ItemFilterBlock block, string inputString) where T : ColorBlockItem
{
block.BlockItems.Add(GetColorBlockItemFromString<T>(inputString));
}
private T GetColorBlockItemFromString<T>(string inputString) where T: ColorBlockItem
{
var blockItem = Activator.CreateInstance<T>();
var result = Regex.Matches(inputString, @"([\w\s]*)[#]?(.*)");
// When Theme support is added result[0].Groups[2].Value will contain the ColorGroup in the comment if it exists.
blockItem.Color = GetColorFromString(result[0].Groups[1].Value);
var componentName = result[0].Groups[2].Value.Trim();
if (!string.IsNullOrEmpty(componentName))
{
ThemeComponentType componentType;
if (typeof (T) == typeof (TextColorBlockItem))
if (typeof(T) == typeof(TextColorBlockItem))
{
componentType = ThemeComponentType.TextColor;
}
else if (typeof (T) == typeof (BackgroundColorBlockItem))
else if (typeof(T) == typeof(BackgroundColorBlockItem))
{
componentType = ThemeComponentType.BackgroundColor;
}
else if (typeof (T) == typeof (BorderColorBlockItem))
else if (typeof(T) == typeof(BorderColorBlockItem))
{
componentType = ThemeComponentType.BorderColor;
}
@ -291,7 +297,58 @@ namespace Filtration.Translators
blockItem.ThemeComponent = _themeComponentListBuilder.AddComponent(componentType, componentName, blockItem.Color);
}
block.BlockItems.Add(blockItem);
return blockItem;
}
public void ReplaceColorBlockItemsFromString(ObservableCollection<IItemFilterBlockItem> blockItems , string inputString)
{
foreach (var line in new LineReader(() => new StringReader(inputString)))
{
var matches = Regex.Match(line, @"(\w+)");
switch (matches.Value)
{
case "SetTextColor":
{
ReplaceColorBlockItem<TextColorBlockItem>(blockItems, line);
break;
}
case "SetBackgroundColor":
{
ReplaceColorBlockItem<BackgroundColorBlockItem>(blockItems, line);
break;
}
case "SetBorderColor":
{
ReplaceColorBlockItem<BorderColorBlockItem>(blockItems, line);
break;
}
case "SetFontSize":
{
ReplaceFontSizeBlockItem(blockItems, line);
break;
}
}
}
}
private void ReplaceColorBlockItem<T>(ObservableCollection<IItemFilterBlockItem> blockItems, string inputString) where T : ColorBlockItem
{
var newBlockItem = GetColorBlockItemFromString<T>(inputString);
var existingBlockItem = blockItems.OfType<T>().FirstOrDefault();
blockItems.Remove(existingBlockItem);
blockItems.Add(newBlockItem);
}
private void ReplaceFontSizeBlockItem(ObservableCollection<IItemFilterBlockItem> blockItems, string inputString)
{
var match = Regex.Match(inputString, @"\s+(\d+)");
if (!match.Success) return;
var newBlockItem = new FontSizeBlockItem(Convert.ToInt16(match.Value));
var existingBlockItem = blockItems.OfType<FontSizeBlockItem>().FirstOrDefault();
blockItems.Remove(existingBlockItem);
blockItems.Add(newBlockItem);
}
private void AddBlockGroupToBlock(ItemFilterBlock block, string inputString)

View File

@ -10,17 +10,31 @@
<UserControl.Resources>
<ResourceDictionary Source="../Views/SharedResourcesDictionary.xaml" />
</UserControl.Resources>
<Grid Width="143" Height="28">
<Border BorderBrush="Black" BorderThickness="1">
<Grid Width="154" Height="35">
<Image Source="pack://application:,,,/resources/groundtile.png" Stretch="Fill" />
<Border Margin="3" Padding="4,0,4,2" BorderThickness="2" BorderBrush="{Binding BorderColor, Converter={StaticResource ColorToSolidColorBrushConverter}}">
<Border.Background>
<SolidColorBrush Color="{Binding BackgroundColor}" />
</Border.Background>
<TextBlock TextAlignment="Center" Text="Test Item Preview" Style="{StaticResource PathOfExileFont}">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding TextColor}" />
</TextBlock.Foreground>
</TextBlock>
</Border>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Row="1" Grid.Column="1" Margin="3" Padding="4,0,4,0" BorderThickness="1" BorderBrush="{Binding BorderColor, Converter={StaticResource ColorToSolidColorBrushConverter}}">
<Border.Background>
<SolidColorBrush Color="{Binding BackgroundColor}" />
</Border.Background>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Item Preview" Style="{StaticResource PathOfExileFont}" FontSize="{Binding BlockFontSize}">
<TextBlock.Foreground>
<SolidColorBrush Color="{Binding TextColor}" />
</TextBlock.Foreground>
</TextBlock>
</Border>
</Grid>
</Grid>
</Border>
</UserControl>

View File

@ -33,6 +33,13 @@ namespace Filtration.UserControls
new FrameworkPropertyMetadata()
);
public static readonly DependencyProperty BlockFontSizeProperty = DependencyProperty.Register(
"BlockFontSize",
typeof(int),
typeof(ItemPreviewControl),
new FrameworkPropertyMetadata()
);
public Color TextColor
{
get { return (Color) GetValue(TextColorProperty); }
@ -51,24 +58,10 @@ namespace Filtration.UserControls
set { SetValue(BorderColorProperty, value); }
}
//private static void OnItemPreviewControlPropertyChanged(DependencyObject source,
// DependencyPropertyChangedEventArgs e)
//{
// var control = source as ItemPreviewControl;
// if (control == null) return;
// control.OnPropertyChanged("TextColor");
// control.OnPropertyChanged("BackgroundColor");
// control.OnPropertyChanged("BorderColor");
//}
//public event PropertyChangedEventHandler PropertyChanged;
//[NotifyPropertyChangedInvocator]
//protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
//{
// var handler = PropertyChanged;
// if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
//}
public int BlockFontSize
{
get { return (int)GetValue(BlockFontSizeProperty); }
set { SetValue(BlockFontSizeProperty, value); }
}
}
}

View File

@ -19,7 +19,9 @@ namespace Filtration.ViewModels
{
void Initialise(ItemFilterBlock itemFilterBlock, ItemFilterScriptViewModel parentScriptViewModel);
bool IsDirty { get; set; }
bool IsExpanded { get; set; }
ItemFilterBlock Block { get; }
void RefreshBlockPreview();
}
internal class ItemFilterBlockViewModel : FiltrationViewModelBase, IItemFilterBlockViewModel
@ -38,6 +40,8 @@ namespace Filtration.ViewModels
CopyBlockCommand = new RelayCommand(OnCopyBlockCommand);
PasteBlockCommand = new RelayCommand(OnPasteBlockCommand);
CopyBlockStyleCommand = new RelayCommand(OnCopyBlockStyleCommand);
PasteBlockStyleCommand = new RelayCommand(OnPasteBlockStyleCommand);
AddBlockCommand = new RelayCommand(OnAddBlockCommand);
AddSectionCommand = new RelayCommand(OnAddSectionCommand);
DeleteBlockCommand = new RelayCommand(OnDeleteBlockCommand);
@ -74,6 +78,8 @@ namespace Filtration.ViewModels
public RelayCommand CopyBlockCommand { get; private set; }
public RelayCommand PasteBlockCommand { get; private set; }
public RelayCommand CopyBlockStyleCommand { get; private set; }
public RelayCommand PasteBlockStyleCommand { get; private set; }
public RelayCommand AddBlockCommand { get; private set; }
public RelayCommand AddSectionCommand { get; private set; }
public RelayCommand DeleteBlockCommand { get; private set; }
@ -90,7 +96,9 @@ namespace Filtration.ViewModels
public RelayCommand PlaySoundCommand { get; private set; }
public ItemFilterBlock Block { get; private set; }
public bool IsDirty { get; set; }
public bool IsExpanded { get; set; }
public ObservableCollection<IItemFilterBlockItem> BlockItems
{
@ -228,7 +236,7 @@ namespace Filtration.ViewModels
{
return HasTextColor
? BlockItems.OfType<TextColorBlockItem>().First().Color
: new Color { A = 255, R = 255, G = 255, B = 255 };
: new Color { A = 255, R = 200, G = 200, B = 200 };
}
}
@ -267,6 +275,12 @@ namespace Filtration.ViewModels
get { return Block.HasBlockItemOfType<FontSizeBlockItem>(); }
}
public int DisplayFontSize
{
// Dividing by 1.8 roughly scales in-game font sizes down to WPF sizes
get { return HasFontSize ? (int)(BlockItems.OfType<FontSizeBlockItem>().First().Value / 1.8) : 19; }
}
public bool HasSound
{
get { return Block.HasBlockItemOfType<SoundBlockItem>(); }
@ -325,6 +339,15 @@ namespace Filtration.ViewModels
_parentScriptViewModel.PasteBlock(this);
}
private void OnCopyBlockStyleCommand()
{
_parentScriptViewModel.CopyBlockStyle(this);
}
private void OnPasteBlockStyleCommand()
{
_parentScriptViewModel.PasteBlockStyle(this);
}
private void OnAddBlockCommand()
{
@ -383,10 +406,16 @@ namespace Filtration.ViewModels
}
private void OnAudioVisualBlockItemChanged(object sender, EventArgs e)
{
RefreshBlockPreview();
}
public void RefreshBlockPreview()
{
RaisePropertyChanged("DisplayTextColor");
RaisePropertyChanged("DisplayBackgroundColor");
RaisePropertyChanged("DisplayBorderColor");
RaisePropertyChanged("DisplayFontSize");
RaisePropertyChanged("HasSound");
}

View File

@ -37,10 +37,28 @@ namespace Filtration.ViewModels
void RemoveDirtyFlag();
void SetDirtyFlag();
RelayCommand AddBlockCommand { get; }
RelayCommand AddSectionCommand { get; }
RelayCommand DeleteBlockCommand { get; }
RelayCommand MoveBlockUpCommand { get; }
RelayCommand MoveBlockDownCommand { get; }
RelayCommand MoveBlockToTopCommand { get; }
RelayCommand MoveBlockToBottomCommand { get;}
RelayCommand CopyBlockCommand { get; }
RelayCommand PasteBlockCommand { get; }
RelayCommand CopyBlockStyleCommand { get; }
RelayCommand PasteBlockStyleCommand { get; }
RelayCommand ExpandAllBlocksCommand { get; }
RelayCommand CollapseAllBlocksCommand { get; }
RelayCommand<bool> ToggleShowAdvancedCommand { get; }
RelayCommand ClearFilterCommand { get; }
void AddSection(IItemFilterBlockViewModel targetBlockViewModel);
void AddBlock(IItemFilterBlockViewModel targetBlockViewModel);
void CopyBlock(IItemFilterBlockViewModel targetBlockViewModel);
void CopyBlockStyle(IItemFilterBlockViewModel targetBlockViewModel);
void PasteBlock(IItemFilterBlockViewModel targetBlockViewModel);
void PasteBlockStyle(IItemFilterBlockViewModel targetBlockViewModel);
}
internal class ItemFilterScriptViewModel : PaneViewModel, IItemFilterScriptViewModel
@ -80,7 +98,11 @@ namespace Filtration.ViewModels
AddBlockCommand = new RelayCommand(OnAddBlockCommand);
AddSectionCommand = new RelayCommand(OnAddSectionCommand, () => SelectedBlockViewModel != null);
CopyBlockCommand = new RelayCommand(OnCopyBlockCommand, () => SelectedBlockViewModel != null);
CopyBlockStyleCommand = new RelayCommand(OnCopyBlockStyleCommand, () => SelectedBlockViewModel != null);
PasteBlockCommand = new RelayCommand(OnPasteBlockCommand, () => SelectedBlockViewModel != null);
PasteBlockStyleCommand = new RelayCommand(OnPasteBlockStyleCommand, () => SelectedBlockViewModel != null);
ExpandAllBlocksCommand = new RelayCommand(OnExpandAllBlocksCommand);
CollapseAllBlocksCommand = new RelayCommand(OnCollapseAllBlocksCommand);
var icon = new BitmapImage();
icon.BeginInit();
@ -100,7 +122,11 @@ namespace Filtration.ViewModels
public RelayCommand AddBlockCommand { get; private set; }
public RelayCommand AddSectionCommand { get; private set; }
public RelayCommand CopyBlockCommand { get; private set; }
public RelayCommand CopyBlockStyleCommand { get; private set; }
public RelayCommand PasteBlockCommand { get; private set; }
public RelayCommand PasteBlockStyleCommand { get; private set; }
public RelayCommand ExpandAllBlocksCommand { get; private set; }
public RelayCommand CollapseAllBlocksCommand { get; private set; }
public ObservableCollection<IItemFilterBlockViewModel> ItemFilterBlockViewModels
{
@ -444,6 +470,44 @@ namespace Filtration.ViewModels
Clipboard.SetText(_blockTranslator.TranslateItemFilterBlockToString(SelectedBlockViewModel.Block));
}
private void OnCopyBlockStyleCommand()
{
CopyBlockStyle(SelectedBlockViewModel);
}
public void CopyBlockStyle(IItemFilterBlockViewModel targetBlockViewModel)
{
string outputText = string.Empty;
foreach (var blockItem in targetBlockViewModel.Block.BlockItems.Where(b => b is IAudioVisualBlockItem))
{
if (outputText != string.Empty)
{
outputText += Environment.NewLine;
}
outputText += blockItem.OutputText;
}
Clipboard.SetText(outputText);
}
private void OnPasteBlockStyleCommand()
{
PasteBlockStyle(SelectedBlockViewModel);
}
public void PasteBlockStyle(IItemFilterBlockViewModel targetBlockViewModel)
{
var clipboardText = Clipboard.GetText();
if (string.IsNullOrEmpty(clipboardText))
{
return;
}
_blockTranslator.ReplaceColorBlockItemsFromString(targetBlockViewModel.Block.BlockItems, clipboardText);
targetBlockViewModel.RefreshBlockPreview();
}
private void OnPasteBlockCommand()
{
PasteBlock(SelectedBlockViewModel);
@ -479,7 +543,6 @@ namespace Filtration.ViewModels
private void OnMoveBlockToTopCommand()
{
MoveBlockToTop(SelectedBlockViewModel);
}
public void MoveBlockToTop(IItemFilterBlockViewModel targetBlockViewModel)
@ -596,13 +659,29 @@ namespace Filtration.ViewModels
var newSection = new ItemFilterSection { Description = "New Section" };
vm.Initialise(newSection, this);
Script.ItemFilterBlocks.Insert(Script.ItemFilterBlocks.IndexOf(targetBlockViewModel.Block) + 1, newSection);
ItemFilterBlockViewModels.Insert(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel) + 1, vm);
Script.ItemFilterBlocks.Insert(Script.ItemFilterBlocks.IndexOf(targetBlockViewModel.Block), newSection);
ItemFilterBlockViewModels.Insert(ItemFilterBlockViewModels.IndexOf(targetBlockViewModel), vm);
IsDirty = true;
SelectedBlockViewModel = vm;
RaisePropertyChanged("ItemFilterSectionViewModels");
}
private void OnExpandAllBlocksCommand()
{
foreach (var blockViewModel in ItemFilterBlockViewModels)
{
blockViewModel.IsExpanded = true;
}
}
private void OnCollapseAllBlocksCommand()
{
foreach (var blockViewModel in ItemFilterBlockViewModels)
{
blockViewModel.IsExpanded = false;
}
}
private void OnDeleteBlockCommand()
{
DeleteBlock(SelectedBlockViewModel);

View File

@ -53,25 +53,39 @@ namespace Filtration.ViewModels
_themeService = themeService;
NewScriptCommand = new RelayCommand(OnNewScriptCommand);
CopyScriptCommand = new RelayCommand(OnCopyScriptCommand, ActiveDocumentIsScript);
CopyScriptCommand = new RelayCommand(OnCopyScriptCommand, () => ActiveDocumentIsScript);
OpenScriptCommand = new RelayCommand(OnOpenScriptCommand);
OpenThemeCommand = new RelayCommand(OnOpenThemeCommand);
SaveCommand = new RelayCommand(OnSaveDocumentCommand, ActiveDocumentIsEditable);
SaveAsCommand = new RelayCommand(OnSaveAsCommand, ActiveDocumentIsEditable);
CloseCommand = new RelayCommand(OnCloseDocumentCommand, () => AvalonDockWorkspaceViewModel.ActiveDocument != null);
CopyBlockCommand = new RelayCommand(OnCopyBlockCommand, () => ActiveDocumentIsScript() && (_avalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModel != null));
PasteCommand = new RelayCommand(OnPasteCommand, () => ActiveDocumentIsScript() && (_avalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModel != null));
CopyBlockCommand = new RelayCommand(OnCopyBlockCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
CopyBlockStyleCommand = new RelayCommand(OnCopyBlockStyleCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
PasteCommand = new RelayCommand(OnPasteCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
PasteBlockStyleCommand = new RelayCommand(OnPasteBlockStyleCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
MoveBlockUpCommand = new RelayCommand(OnMoveBlockUpCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
MoveBlockDownCommand = new RelayCommand(OnMoveBlockDownCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
MoveBlockToTopCommand = new RelayCommand(OnMoveBlockToTopCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
MoveBlockToBottomCommand = new RelayCommand(OnMoveBlockToBottomCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
AddBlockCommand = new RelayCommand(OnAddBlockCommand, () => ActiveDocumentIsScript);
AddSectionCommand = new RelayCommand(OnAddSectionCommand, () => ActiveDocumentIsScript);
DeleteBlockCommand = new RelayCommand(OnDeleteBlockCommand, () => ActiveDocumentIsScript && ActiveScriptHasSelectedBlock);
OpenAboutWindowCommand = new RelayCommand(OnOpenAboutWindowCommand);
OpenSettingsWindowCommand = new RelayCommand(OnOpenSettingsWindowCommand);
ReplaceColorsCommand = new RelayCommand(OnReplaceColorsCommand, ActiveDocumentIsScript);
CreateThemeCommand = new RelayCommand(OnCreateThemeCommand, ActiveDocumentIsScript);
ApplyThemeToScriptCommand = new RelayCommand(OnApplyThemeToScriptCommand, ActiveDocumentIsScript);
ReplaceColorsCommand = new RelayCommand(OnReplaceColorsCommand, () => ActiveDocumentIsScript);
CreateThemeCommand = new RelayCommand(OnCreateThemeCommand, () => ActiveDocumentIsScript);
ApplyThemeToScriptCommand = new RelayCommand(OnApplyThemeToScriptCommand, () => ActiveDocumentIsScript);
//LoadScriptFromFile("C:\\ThioleLootFilter.txt");
ExpandAllBlocksCommand = new RelayCommand(OnExpandAllBlocksCommand, () => ActiveDocumentIsScript);
CollapseAllBlocksCommand = new RelayCommand(OnCollapseAllBlocksCommand, () => ActiveDocumentIsScript);
ToggleShowAdvancedCommand = new RelayCommand<bool>(OnToggleShowAdvancedCommand, s => ActiveDocumentIsScript);
ClearFiltersCommand = new RelayCommand(OnClearFiltersCommand, () => ActiveDocumentIsScript);
if (string.IsNullOrEmpty(_itemFilterScriptRepository.GetItemFilterScriptDirectory()))
{
@ -95,6 +109,7 @@ namespace Filtration.ViewModels
ReplaceColorsCommand.RaiseCanExecuteChanged();
ApplyThemeToScriptCommand.RaiseCanExecuteChanged();
CreateThemeCommand.RaiseCanExecuteChanged();
RaisePropertyChanged("ShowAdvancedStatus");
break;
}
case "NewScript":
@ -116,7 +131,9 @@ namespace Filtration.ViewModels
public RelayCommand SaveCommand { get; private set; }
public RelayCommand SaveAsCommand { get; private set; }
public RelayCommand CopyBlockCommand { get; private set; }
public RelayCommand CopyBlockStyleCommand { get; private set; }
public RelayCommand PasteCommand { get; private set; }
public RelayCommand PasteBlockStyleCommand { get; private set; }
public RelayCommand CopyScriptCommand { get; private set; }
public RelayCommand NewScriptCommand { get; private set; }
public RelayCommand CloseCommand { get; private set; }
@ -126,6 +143,21 @@ namespace Filtration.ViewModels
public RelayCommand CreateThemeCommand { get; private set; }
public RelayCommand ApplyThemeToScriptCommand { get; private set; }
public RelayCommand AddBlockCommand { get; private set; }
public RelayCommand AddSectionCommand { get; private set; }
public RelayCommand DeleteBlockCommand { get; private set; }
public RelayCommand MoveBlockUpCommand { get; private set; }
public RelayCommand MoveBlockDownCommand { get; private set; }
public RelayCommand MoveBlockToTopCommand { get; private set; }
public RelayCommand MoveBlockToBottomCommand { get; private set; }
public RelayCommand ExpandAllBlocksCommand { get; private set; }
public RelayCommand CollapseAllBlocksCommand { get; private set; }
public RelayCommand<bool> ToggleShowAdvancedCommand { get; private set; }
public RelayCommand ClearFiltersCommand { get; private set; }
public IAvalonDockWorkspaceViewModel AvalonDockWorkspaceViewModel
{
get { return _avalonDockWorkspaceViewModel; }
@ -141,9 +173,25 @@ namespace Filtration.ViewModels
}
}
private bool ActiveDocumentIsScript()
public bool ActiveDocumentIsScript
{
return _activeDocument is IItemFilterScriptViewModel;
get
{
{
var isScript = _activeDocument is ItemFilterScriptViewModel;
return isScript;
}
}
}
public bool ActiveScriptHasSelectedBlock
{
get { return AvalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModel != null; }
}
public bool ActiveDocumentIsTheme
{
get { { return _activeDocument is ThemeViewModel; } }
}
private bool ActiveDocumentIsEditable()
@ -151,6 +199,14 @@ namespace Filtration.ViewModels
return _activeDocument is IEditableDocument;
}
public bool ShowAdvancedStatus
{
get
{
return ActiveDocumentIsScript && _avalonDockWorkspaceViewModel.ActiveScriptViewModel.ShowAdvanced;
}
}
private void OnCreateThemeCommand()
{
var themeViewModel = _themeProvider.NewThemeForScript(AvalonDockWorkspaceViewModel.ActiveScriptViewModel.Script);
@ -321,12 +377,22 @@ namespace Filtration.ViewModels
private void OnCopyBlockCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.CopyBlock(_avalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModel);
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.CopyBlockCommand.Execute(null);
}
private void OnCopyBlockStyleCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.CopyBlockStyleCommand.Execute(null);
}
private void OnPasteCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.PasteBlock(_avalonDockWorkspaceViewModel.ActiveScriptViewModel.SelectedBlockViewModel);
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.PasteBlockCommand.Execute(null);
}
private void OnPasteBlockStyleCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.PasteBlockStyleCommand.Execute(null);
}
private void OnNewScriptCommand()
@ -339,5 +405,60 @@ namespace Filtration.ViewModels
{
_avalonDockWorkspaceViewModel.ActiveDocument.Close();
}
private void OnMoveBlockUpCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.MoveBlockUpCommand.Execute(null);
}
private void OnMoveBlockDownCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.MoveBlockDownCommand.Execute(null);
}
private void OnMoveBlockToTopCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.MoveBlockToTopCommand.Execute(null);
}
private void OnMoveBlockToBottomCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.MoveBlockToBottomCommand.Execute(null);
}
private void OnAddBlockCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.AddBlockCommand.Execute(null);
}
private void OnAddSectionCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.AddSectionCommand.Execute(null);
}
private void OnDeleteBlockCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.DeleteBlockCommand.Execute(null);
}
private void OnExpandAllBlocksCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.ExpandAllBlocksCommand.Execute(null);
}
private void OnCollapseAllBlocksCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.CollapseAllBlocksCommand.Execute(null);
}
private void OnToggleShowAdvancedCommand(bool showAdvanced)
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.ToggleShowAdvancedCommand.Execute(showAdvanced);
}
private void OnClearFiltersCommand()
{
_avalonDockWorkspaceViewModel.ActiveScriptViewModel.ClearFilterCommand.Execute(null);
}
}
}

View File

@ -1,16 +1,15 @@
<controls:MetroWindow x:Class="Filtration.Views.AboutWindow"
<Window x:Class="Filtration.Views.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:extensions="clr-namespace:Filtration.Extensions"
Title="About Filtration"
Height="360"
Width="580"
Loaded="AboutWindow_OnLoaded"
BorderThickness="1"
BorderBrush="Black"
ShowMaxRestoreButton="False"
ShowMinButton="False">
BorderBrush="Black">
<!--ShowMaxRestoreButton="False"
ShowMinButton="False"-->
<Grid Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
@ -71,4 +70,4 @@
</TextBlock>
</ScrollViewer>
</Grid>
</controls:MetroWindow>
</Window>

View File

@ -2,11 +2,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Image Source="/Filtration;component/Resources/Icons/add_block_icon.png" x:Key="AddBlockIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/add_section_icon.png" x:Key="AddSectionIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/copy_icon.png" x:Key="CopyIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/delete_icon.png" x:Key="DeleteIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/new_icon.png" x:Key="NewIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/open_icon.png" x:Key="OpenIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/paste_icon.png" x:Key="PasteIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/save_all_icon.png" x:Key="SaveAllIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/save_icon.png" x:Key="SaveIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/arrow_top_icon.png" x:Key="MoveToTopIcon" x:Shared="false" />
@ -16,7 +14,7 @@
<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/about_icon.png" x:Key="AboutIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/replace_colors_icon.png" x:Key="ReplaceColorsIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/ReplaceColors.ico" x:Key="ReplaceColorsIcon" x:Shared="false" />
<Image Source="/Filtration;component/Resources/Icons/clear_filter_icon.png" x:Key="ClearFilterIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/filter_icon.png" x:Key="FilterIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/show_advanced_icon.png" x:Key="ShowAdvancedIcon" x:Shared="False" />
@ -24,6 +22,10 @@
<Image Source="/Filtration;component/Resources/Icons/block_output_preview_icon.png" x:Key="BlockOutputPreviewIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/expand_icon.png" x:Key="ExpandIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/collapse_icon.png" x:Key="CollapseIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/theme_icon.png" x:Key="ThemeIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/Theme.ico" x:Key="ThemeIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/script_icon.png" x:Key="ScriptIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/settings_icon.png" x:Key="SettingsIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/Copy.ico" x:Key="CopyIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/Paste.ico" x:Key="PasteIcon" x:Shared="False" />
<Image Source="/Filtration;component/Resources/Icons/PasteStyle.ico" x:Key="PasteStyleIcon" x:Shared="False" />
</ResourceDictionary>

View File

@ -11,6 +11,7 @@
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
xmlns:blockItemTypes="clr-namespace:Filtration.ObjectModel.BlockItemTypes;assembly=Filtration.ObjectModel"
xmlns:enums="clr-namespace:Filtration.ObjectModel.Enums;assembly=Filtration.ObjectModel"
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:ItemFilterBlockViewModel}"
d:DesignHeight="200" d:DesignWidth="800">
@ -38,13 +39,23 @@
<ToolTip Visibility="{Binding AdvancedBlockGroup, Converter={StaticResource BooleanVisibilityConverter}}">Advanced Block Group</ToolTip>
</Rectangle.ToolTip>
</Rectangle>
<Expander Grid.Column="1" Style="{StaticResource ExpanderRightAlignStyle}" x:Name="BlockExpander" MouseDoubleClick="BlockExpander_OnMouseDoubleClick" ToolTip="{Binding BlockDescription}" ToolTipService.IsEnabled="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsExpanded, Converter={StaticResource BoolInverterConverter}}">
<Expander Grid.Column="1"
Style="{StaticResource ExpanderRightAlignStyle}"
x:Name="BlockExpander"
MouseDoubleClick="BlockExpander_OnMouseDoubleClick"
ToolTip="{Binding BlockDescription}"
ToolTipService.IsEnabled="{Binding RelativeSource={RelativeSource Mode=Self}, Path=IsExpanded, Converter={StaticResource BoolInverterConverter}}"
IsExpanded="{Binding IsExpanded}">
<Expander.ContextMenu>
<ContextMenu>
<ContextMenu.Items>
<MenuItem Header="Copy" Command="{Binding CopyBlockCommand}" Icon="{StaticResource CopyIcon}" />
<MenuItem Header="Paste" Command="{Binding PasteBlockCommand}" Icon="{StaticResource PasteIcon}" />
<Separator />
<MenuItem Header="Block Style">
<MenuItem Header="Copy Block Style" Command="{Binding CopyBlockStyleCommand}" Icon="{StaticResource CopyIcon}" />
<MenuItem Header="Paste Block Style" Command="{Binding PasteBlockStyleCommand}" Icon="{StaticResource PasteIcon}" />
</MenuItem>
<MenuItem Header="Add Block" Command="{Binding Data.AddBlockCommand, Source={StaticResource proxy}}" Icon="{StaticResource AddBlockIcon}" />
<MenuItem Header="Add Section" Command="{Binding Data.AddSectionCommand, Source={StaticResource proxy}}" Icon="{StaticResource AddSectionIcon}">
</MenuItem>
@ -66,7 +77,6 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- BlockItems Summary Panel -->
<StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Center">
<ItemsControl ItemsSource="{Binding SummaryBlockItems}">
@ -94,15 +104,21 @@
<!-- Item Preview Box -->
<WrapPanel Grid.Row="0" Grid.Column="1" VerticalAlignment="Center">
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" Height="15" Width="15" Margin="0,0,3,0" Visibility="{Binding HasSound, Converter={StaticResource BooleanVisibilityConverter}}" />
<ToggleButton Width="143"
Height="28"
Margin="0,0,8,0"
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Height="15" Width="15"
Margin="0,0,3,0"
Visibility="{Binding HasSound, Converter={StaticResource BooleanVisibilityConverter}}" />
<ToggleButton Margin="0,2,8,2"
Style="{StaticResource ChromelessToggleButton}"
x:Name="ItemPreviewButton"
IsChecked="{Binding DisplaySettingsPopupOpen, Mode=OneWayToSource}"
ToolTip="Click here to change color and font settings" Cursor="Hand" >
<userControls:ItemPreviewControl TextColor="{Binding DisplayTextColor}" BackgroundColor="{Binding DisplayBackgroundColor}" BorderColor="{Binding DisplayBorderColor}" />
<userControls:ItemPreviewControl TextColor="{Binding DisplayTextColor}"
BackgroundColor="{Binding DisplayBackgroundColor}"
BorderColor="{Binding DisplayBorderColor}"
BlockFontSize="{Binding DisplayFontSize}" />
</ToggleButton>
</WrapPanel>
@ -148,12 +164,39 @@
<!-- Block Items -->
<WrapPanel Grid.Row="1" MaxHeight="200">
<ItemsControl ItemsSource="{Binding BlockItems}">
<WrapPanel.Resources>
<CollectionViewSource Source="{Binding BlockItems}" x:Key="BlockItemsCollectionViewSource">
<CollectionViewSource.SortDescriptions>
<componentModel:SortDescription PropertyName="SortOrder"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</WrapPanel.Resources>
<ItemsControl ItemsSource="{Binding Source={StaticResource BlockItemsCollectionViewSource}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemContainerStyle>
<Style TargetType="{x:Type ContentPresenter}">
<Setter Property="LayoutTransform">
<Setter.Value>
<ScaleTransform x:Name="transform" />
</Setter.Value>
</Setter>
<Style.Triggers>
<EventTrigger RoutedEvent="Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:2" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Style.Triggers>
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.Resources>
<Style TargetType="{x:Type Border}" x:Key="BlockItemBorder">
<Setter Property="BorderThickness" Value="1" />

View File

@ -10,6 +10,12 @@
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:ItemFilterScriptViewModel}"
d:DesignHeight="300" d:DesignWidth="600">
<UserControl.InputBindings>
<KeyBinding Command="{Binding CopyBlockCommand}" Modifiers="Control" Key="C" />
<KeyBinding Command="{Binding PasteBlockCommand}" Modifiers="Control" Key="V" />
<KeyBinding Command="{Binding CopyBlockStyleCommand}" Modifiers="Shift+Control" Key="C" />
<KeyBinding Command="{Binding PasteBlockStyleCommand}" Modifiers="Shift+Control" Key="V" />
</UserControl.InputBindings>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@ -47,23 +53,6 @@
</Border>
<Border Grid.Row="1" BorderThickness="1" BorderBrush="DarkGray" Margin="5,5,5,5" Padding="2">
<DockPanel LastChildFill="True">
<ToolBarTray DockPanel.Dock="Top">
<ToolBar>
<Button ToolTip="Add Block" Command="{Binding AddBlockCommand}" Content="{StaticResource AddBlockIcon}" />
<Button ToolTip="Add Section" Command="{Binding AddSectionCommand}" Content="{StaticResource AddSectionIcon}" />
<Button ToolTip="Delete Block/Section" Command="{Binding DeleteBlockCommand}" Content="{StaticResource DeleteIcon}" />
</ToolBar>
<ToolBar>
<Button ToolTip="Move Block to Top" Command="{Binding MoveBlockToTopCommand}" Content="{StaticResource MoveToTopIcon}" />
<Button ToolTip="Move Block Up" Command="{Binding MoveBlockUpCommand}" Content="{StaticResource MoveUpIcon}" />
<Button ToolTip="Move Block Down" Command="{Binding MoveBlockDownCommand}" Content="{StaticResource MoveDownIcon}" />
<Button ToolTip="Move Block to Bottom" Command="{Binding MoveBlockToBottomCommand}" Content="{StaticResource MoveToBottomIcon}" />
</ToolBar>
<ToolBar>
<Button ToolTip="Clear Filter" Command="{Binding ClearFilterCommand}" Content="{StaticResource ClearFilterIcon}" />
<ToggleButton ToolTip="Show Advanced Block Groups" Command="{Binding ToggleShowAdvancedCommand}" CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}" Content="{StaticResource ShowAdvancedIcon}" />
</ToolBar>
</ToolBarTray>
<userControls:AutoScrollingListBox ItemsSource="{Binding ItemFilterBlockViewModels}"
Margin="5,5,5,5"
Padding="5"
@ -88,14 +77,6 @@
</ListBox.ItemContainerStyle>
<ListBox.Resources>
<Style TargetType="ListBoxItem">
<Style.Resources>
<!-- SelectedItem with focus -->
<!--<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
--><!-- SelectedItem without focus -->
<!--<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />-->
<!-- SelectedItem text foreground --><!--
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Black" />-->
</Style.Resources>
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
</Style>
</ListBox.Resources>

View File

@ -22,7 +22,13 @@
</Grid.ColumnDefinitions>
<Border Width="7" Grid.Column="0" BorderBrush="Gray" Background="Gray" CornerRadius="2,0,0,2" />
<Border Grid.Column =" 1" BorderThickness="1" BorderBrush="SlateGray" Background="Gainsboro" CornerRadius="0,2,2,0" Padding="3">
<TextBox Text="{Binding BlockDescription, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" TextWrapping="Wrap"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBox Grid.Column ="0" Text="{Binding BlockDescription, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" TextWrapping="Wrap" MinWidth="150"/>
</Grid>
</Border>
</Grid>
</UserControl>

View File

@ -1,58 +1,83 @@
<controls:MetroWindow x:Class="Filtration.Views.MainWindow"
<fluent:RibbonWindow x:Class="Filtration.Views.MainWindow"
x:ClassModifier="internal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:fluent="clr-namespace:Fluent;assembly=Fluent"
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
xmlns:fa="http://schemas.fontawesome.io/icons/"
xmlns:viewsAvalonDock="clr-namespace:Filtration.Views.AvalonDock"
xmlns:converters="clr-namespace:Filtration.Converters"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:MainWindowViewModel}"
Title="{Binding WindowTitle}" Height="768" Width="1100" BorderThickness="1" BorderBrush="Black">
Title="{Binding WindowTitle}" Height="768" Width="1100" BorderThickness="1" BorderBrush="Black" Icon="{StaticResource MenuPasteIcon}">
<fluent:RibbonWindow.Resources>
<converters:BooleanVisibilityConverterCopy x:Key="BooleanVisibilityConverterCopy" />
</fluent:RibbonWindow.Resources>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_New Script" Command="{Binding NewScriptCommand}" Icon="{StaticResource NewIcon}"/>
<MenuItem Header="_Open Script" Command="{Binding OpenScriptCommand}" Icon="{StaticResource OpenIcon}"/>
<MenuItem Header="_Open Theme" Command="{Binding OpenThemeCommand}" Icon="{StaticResource OpenIcon}"/>
<MenuItem Header="_Save" Command="{Binding SaveCommand}" Icon="{StaticResource SaveIcon}"/>
<MenuItem Header="Save _As" Command="{Binding SaveAsCommand}" Icon="{StaticResource SaveIcon}"/>
<MenuItem Header="_Close Script" Command="{Binding CloseCommand}" />
<MenuItem Header="E_xit"/>
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem Header="_Copy Block" Command="{Binding CopyBlockCommand}" Icon="{StaticResource CopyIcon}" />
<MenuItem Header="_Paste Block" Command="{Binding PasteCommand}" Icon="{StaticResource PasteIcon}" />
<Separator />
<MenuItem Header="Copy _Script" Command="{Binding CopyScriptCommand}" Icon="{StaticResource CopyIcon}" />
</MenuItem>
<MenuItem Header="_View">
<MenuItem Header="Section Browser" IsCheckable="True" IsChecked="{Binding AvalonDockWorkspaceViewModel.SectionBrowserViewModel.IsVisible}" Icon="{StaticResource AddSectionIcon}" />
<MenuItem Header="Block Output Preview" IsCheckable="True" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockOutputPreviewViewModel.IsVisible}" Icon="{StaticResource BlockOutputPreviewIcon}" />
<MenuItem Header="Block Group Browser" IsCheckable="True" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockGroupBrowserViewModel.IsVisible}" Icon="{StaticResource BlockGroupBrowserIcon}" />
</MenuItem>
<MenuItem Header="_Tools">
<MenuItem Header="_Apply Theme to Script" Command="{Binding ApplyThemeToScriptCommand}" Icon="{StaticResource ThemeIcon}" />
<MenuItem Header="_Replace Colors" Command="{Binding ReplaceColorsCommand}" Icon="{StaticResource ReplaceColorsIcon}" />
<MenuItem Header="_Settings" Command="{Binding OpenSettingsWindowCommand}" />
</MenuItem>
<MenuItem Header="_Help">
<MenuItem Header="_About" Command="{Binding OpenAboutWindowCommand}" Icon="{StaticResource AboutIcon}" />
</MenuItem>
</Menu>
<ToolBarTray DockPanel.Dock="Top">
<ToolBar>
<Button Command="{Binding NewScriptCommand}" Content="{StaticResource NewIcon}" ToolTip="New Script" />
<Button Command="{Binding OpenScriptCommand}" Content="{StaticResource OpenIcon}" ToolTip="Open Script" />
<Button Command="{Binding SaveCommand}" Content="{StaticResource SaveIcon}" ToolTip="Save" />
<Separator />
<Button Command="{Binding CreateThemeCommand}" Content="{StaticResource ThemeIcon}" ToolTip="Create Theme for Script" />
</ToolBar>
</ToolBarTray>
<fluent:Ribbon DockPanel.Dock="Top">
<fluent:Ribbon.Menu>
<fluent:Backstage>
<fluent:BackstageTabControl>
<fluent:BackstageTabItem Header="Filtration" />
<fluent:Button Header="New Script" Command="{Binding NewScriptCommand}" Icon="{StaticResource NewIcon}" />
<fluent:Button Header="Open Script" Command="{Binding OpenScriptCommand}" Icon="{StaticResource OpenIcon}" />
<fluent:Button Header="Open Theme" Command="{Binding OpenThemeCommand}" Icon="{StaticResource OpenIcon}" />
<fluent:Button Header="Save" Command="{Binding SaveCommand}" Icon="{StaticResource SaveIcon}" />
<fluent:Button Header="Save As" Command="{Binding SaveAsCommand}" Icon="{StaticResource SaveIcon}" />
<fluent:Button Header="Close" Command="{Binding CloseCommand}" />
<fluent:SeparatorTabItem />
<fluent:Button Header="Settings" Command="{Binding OpenSettingsWindowCommand}" Icon="{StaticResource SettingsIcon}" />
<fluent:SeparatorTabItem />
<fluent:Button Header="About Filtration" Icon="{StaticResource AboutIcon}" Command="{Binding OpenAboutWindowCommand}" VerticalAlignment="Bottom" />
</fluent:BackstageTabControl>
</fluent:Backstage>
</fluent:Ribbon.Menu> <fluent:Ribbon.ContextualGroups> <fluent:RibbonContextualTabGroup Header="Script Tools" Background="ForestGreen" BorderBrush="ForestGreen" x:Name="ScriptToolsGroup" Visibility="{Binding ActiveDocumentIsScript, Converter={StaticResource BooleanVisibilityConverterCopy}, ConverterParameter={x:Static Visibility.Hidden}, Mode=OneWay}" /> </fluent:Ribbon.ContextualGroups>
<fluent:RibbonTabItem Header="View">
<fluent:RibbonGroupBox Header="Tools">
<fluent:ToggleButton Header="Section Browser" SizeDefinition="Middle" Icon="{StaticResource AddSectionIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.SectionBrowserViewModel.IsVisible}" />
<fluent:ToggleButton Header="Block Group Browser" SizeDefinition="Middle" Icon="{StaticResource BlockGroupBrowserIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockGroupBrowserViewModel.IsVisible}" />
<fluent:ToggleButton Header="Block Output Preview" SizeDefinition="Middle" Icon="{StaticResource BlockOutputPreviewIcon}" IsChecked="{Binding AvalonDockWorkspaceViewModel.BlockOutputPreviewViewModel.IsVisible}" />
</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
<fluent:RibbonTabItem Header="Script Tools" Group="{Binding ElementName=ScriptToolsGroup}" >
<fluent:RibbonGroupBox Header="Clipboard">
<fluent:Button Header="Copy Block" Command="{Binding CopyBlockCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource CopyIcon}">
</fluent:Button>
<fluent:Button Header="Paste Block" Command="{Binding PasteCommand}" Icon="{StaticResource PasteIcon}" LargeIcon="{StaticResource PasteIcon}" />
<fluent:Button Header="Copy Style" Command="{Binding CopyBlockStyleCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource CopyIcon}" SizeDefinition="Middle" />
<fluent:Button Header="Paste Style" Command="{Binding PasteBlockStyleCommand}" Icon="{StaticResource PasteStyleIcon}" LargeIcon="{StaticResource PasteIcon}" SizeDefinition="Middle" />
<fluent:Button Header="Copy Script" Command="{Binding CopyScriptCommand}" Icon="{StaticResource CopyIcon}" LargeIcon="{StaticResource PasteIcon}" SizeDefinition="Middle" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Block Shizzle">
<fluent:Button Header="Add Block" Command="{Binding AddBlockCommand}" SizeDefinition="Middle" Icon="{StaticResource AddBlockIcon}" />
<fluent:Button Header="Add Section" Command="{Binding AddSectionCommand}" SizeDefinition="Middle" Icon="{StaticResource AddSectionIcon}" />
<fluent:Button Header="Delete Block" Command="{Binding DeleteBlockCommand}" SizeDefinition="Middle" Icon="{StaticResource DeleteIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Expand / Collapse">
<fluent:Button Header="Expand All" Command="{Binding ExpandAllBlocksCommand}" SizeDefinition="Middle" Icon="{StaticResource ExpandIcon}" />
<fluent:Button Header="Collapse All" Command="{Binding CollapseAllBlocksCommand}" SizeDefinition="Middle" Icon="{StaticResource CollapseIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Filters">
<fluent:ToggleButton Command="{Binding ToggleShowAdvancedCommand}" CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource Self}}" Header="Show Advanced Blocks" SizeDefinition="Middle" Icon="{StaticResource ShowAdvancedIcon}" IsChecked="{Binding ShowAdvancedStatus, Mode=OneWay}" />
<fluent:Button Header="Clear All Filters" Command="{Binding ClearFiltersCommand}" SizeDefinition="Middle" Icon="{StaticResource ClearFilterIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Block Movement">
<fluent:Button Header="Move To Top" Command="{Binding MoveBlockToTopCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveToTopIcon}" />
<fluent:Button Header="Move Up" Command="{Binding MoveBlockUpCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveUpIcon}" />
<fluent:Button Header="Move Down" Command="{Binding MoveBlockDownCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveDownIcon}" />
<fluent:Button Header="Move To Bottom" Command="{Binding MoveBlockToBottomCommand}" SizeDefinition="Middle" Icon="{StaticResource MoveToBottomIcon}" />
</fluent:RibbonGroupBox>
<fluent:RibbonGroupBox Header="Themes">
<fluent:Button Header="Apply Theme" Command="{Binding ApplyThemeToScriptCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
<fluent:Button Header="Create Theme" Command="{Binding CreateThemeCommand}" Icon="{StaticResource ThemeIcon}" LargeIcon="{StaticResource ThemeIcon}" />
<fluent:Button Header="Replace Colours" Command="{Binding ReplaceColorsCommand}" Icon="{StaticResource ReplaceColorsIcon}" LargeIcon="{StaticResource ReplaceColorsIcon}" />
</fluent:RibbonGroupBox>
</fluent:RibbonTabItem>
</fluent:Ribbon>
<Grid>
<viewsAvalonDock:AvalonDockWorkspaceView DataContext="{Binding AvalonDockWorkspaceViewModel}" />
</Grid>
</DockPanel>
</controls:MetroWindow>
</fluent:RibbonWindow>

View File

@ -1,18 +1,17 @@
<controls:MetroWindow x:Class="Filtration.Views.ReplaceColorsWindow"
<Window x:Class="Filtration.Views.ReplaceColorsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
xmlns:userControls="clr-namespace:Filtration.UserControls"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:ReplaceColorsViewModel}"
ShowMaxRestoreButton="False"
Title="Replace Script Colors" Height="230" Width="500"
BorderThickness="1" BorderBrush="Black"
Loaded="ReplaceColorsWindow_OnLoaded">
<!--ShowMaxRestoreButton="False"-->
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@ -61,4 +60,4 @@
<TextBlock Grid.Row="6" Grid.Column="2" VerticalAlignment="Center">Preview</TextBlock>
<Button Grid.Row="7" Grid.Column="4" Command="{Binding ReplaceColorsCommand}">Replace Colors</Button>
</Grid>
</controls:MetroWindow>
</Window>

View File

@ -1,13 +1,13 @@
<controls:MetroWindow x:Class="Filtration.Views.SettingsWindow"
<Window x:Class="Filtration.Views.SettingsWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModels="clr-namespace:Filtration.ViewModels"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:SettingsWindowViewModel}"
Title="Options" Height="150" Width="500" IsMaxRestoreButtonEnabled="False">
Title="Options" Height="150" Width="500">
<!--IsMaxRestoreButtonEnabled="False"-->
<Border BorderBrush="Black" BorderThickness="1">
<DockPanel Margin="10">
<Grid DockPanel.Dock="Bottom">
@ -45,4 +45,4 @@
</Grid>
</DockPanel>
</Border>
</controls:MetroWindow>
</Window>

View File

@ -8,7 +8,7 @@
<ResourceDictionary>
<Style x:Key="PathOfExileFont">
<Setter Property="TextElement.FontFamily" Value="pack://application:,,,/resources/#Fontin SmallCaps" />
<Setter Property="TextElement.FontSize" Value="14" />
<!--<Setter Property="TextElement.FontSize" Value="14" />-->
</Style>
<Style x:Key="ChromelessToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">

View File

@ -5,8 +5,8 @@
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
<package id="CommonServiceLocator" version="1.3" targetFramework="net451" />
<package id="Extended.Wpf.Toolkit" version="2.4" targetFramework="net451" />
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net451" />
<package id="MvvmLight" version="5.1.1.0" targetFramework="net451" />
<package id="Fluent.Ribbon" version="3.4.0" targetFramework="net451" />
<package id="FontAwesome.WPF" version="4.3.0.3" targetFramework="net451" />
<package id="MvvmLightLibs" version="5.1.1.0" targetFramework="net451" />
<package id="WPFToolkit" version="3.5.50211.1" targetFramework="net451" />
</packages>