diff --git a/Filtration.ThemeEditor/Views/ThemeControl.xaml b/Filtration.ThemeEditor/Views/ThemeControl.xaml
index 2b21c2b..d565157 100644
--- a/Filtration.ThemeEditor/Views/ThemeControl.xaml
+++ b/Filtration.ThemeEditor/Views/ThemeControl.xaml
@@ -5,17 +5,37 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:viewModels="clr-namespace:Filtration.ThemeEditor.ViewModels"
xmlns:views="clr-namespace:Filtration.ThemeEditor.Views"
+ xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewModels:ThemeViewModel}"
d:DesignHeight="300" d:DesignWidth="300">
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/Filtration/App.config b/Filtration/App.config
index 9cd140a..02dfa29 100644
--- a/Filtration/App.config
+++ b/Filtration/App.config
@@ -16,12 +16,15 @@
True
-
+
0
False
+
+ 0
+
diff --git a/Filtration/App.xaml b/Filtration/App.xaml
index c6c1856..878922d 100644
--- a/Filtration/App.xaml
+++ b/Filtration/App.xaml
@@ -11,8 +11,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Filtration/Converters/BooleanVisibilityConverterCopy.cs b/Filtration/Converters/BooleanVisibilityConverterCopy.cs
index 3be867a..2681bc2 100644
--- a/Filtration/Converters/BooleanVisibilityConverterCopy.cs
+++ b/Filtration/Converters/BooleanVisibilityConverterCopy.cs
@@ -9,6 +9,7 @@ namespace Filtration.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
+ return (bool) value ? Visibility.Visible : Visibility.Hidden;
if (value is bool && targetType == typeof (Visibility))
{
var val = (bool) value;
diff --git a/Filtration/Filtration.csproj b/Filtration/Filtration.csproj
index b57ba4c..2cd8a50 100644
--- a/Filtration/Filtration.csproj
+++ b/Filtration/Filtration.csproj
@@ -64,6 +64,9 @@
False
..\packages\MvvmLightLibs.5.1.1.0\lib\net45\GalaSoft.MvvmLight.Platform.dll
+
+ ..\packages\MahApps.Metro.1.1.2.0\lib\net45\MahApps.Metro.dll
+
..\packages\NLog.4.0.1\lib\net45\NLog.dll
@@ -81,7 +84,7 @@
- ..\packages\Fluent.Ribbon.3.4.0\lib\net45\System.Windows.Interactivity.dll
+ ..\packages\MahApps.Metro.1.1.2.0\lib\net45\System.Windows.Interactivity.dll
@@ -259,6 +262,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
diff --git a/Filtration/Models/UpdateData.cs b/Filtration/Models/UpdateData.cs
index b7a556a..5c8cb13 100644
--- a/Filtration/Models/UpdateData.cs
+++ b/Filtration/Models/UpdateData.cs
@@ -9,7 +9,8 @@ namespace Filtration.Models
private string _releaseNotes;
public string DownloadUrl { get; set; }
- public decimal CurrentVersion { get; set; }
+ public int LatestVersionMajorPart { get; set; }
+ public int LatestVersionMinorPart { get; set; }
public DateTime ReleaseDate { get; set; }
public string ReleaseNotes
diff --git a/Filtration/Properties/Settings.Designer.cs b/Filtration/Properties/Settings.Designer.cs
index 5380110..9caa308 100644
--- a/Filtration/Properties/Settings.Designer.cs
+++ b/Filtration/Properties/Settings.Designer.cs
@@ -50,12 +50,12 @@ namespace Filtration.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
- public decimal SuppressUpdatesUpToVersion {
+ public int SuppressUpdatesUpToVersionMajorPart {
get {
- return ((decimal)(this["SuppressUpdatesUpToVersion"]));
+ return ((int)(this["SuppressUpdatesUpToVersionMajorPart"]));
}
set {
- this["SuppressUpdatesUpToVersion"] = value;
+ this["SuppressUpdatesUpToVersionMajorPart"] = value;
}
}
@@ -70,5 +70,17 @@ namespace Filtration.Properties {
this["SuppressUpdates"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public int SuppressUpdatesUpToVersionMinorPart {
+ get {
+ return ((int)(this["SuppressUpdatesUpToVersionMinorPart"]));
+ }
+ set {
+ this["SuppressUpdatesUpToVersionMinorPart"] = value;
+ }
+ }
}
}
diff --git a/Filtration/Properties/Settings.settings b/Filtration/Properties/Settings.settings
index 1a10680..c473a78 100644
--- a/Filtration/Properties/Settings.settings
+++ b/Filtration/Properties/Settings.settings
@@ -8,11 +8,14 @@
True
-
+
0
False
+
+ 0
+
\ No newline at end of file
diff --git a/Filtration/Services/UpdateCheckService.cs b/Filtration/Services/UpdateCheckService.cs
index 5a01c83..b16af22 100644
--- a/Filtration/Services/UpdateCheckService.cs
+++ b/Filtration/Services/UpdateCheckService.cs
@@ -1,5 +1,4 @@
using System.IO;
-using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using Filtration.Models;
@@ -14,7 +13,8 @@ namespace Filtration.Services
internal class UpdateCheckService : IUpdateCheckService
{
private readonly IHTTPService _httpService;
- private const string UpdateDataUrl = "http://ben-wallis.github.io/Filtration/filtration_version.xml";
+ //private const string UpdateDataUrl = "http://ben-wallis.github.io/Filtration/filtration_version.xml";
+ private const string UpdateDataUrl = "http://xvar.net/filtration_version.xml";
public UpdateCheckService(IHTTPService httpService)
{
diff --git a/Filtration/UserControls/EditableListBoxControl.xaml b/Filtration/UserControls/EditableListBoxControl.xaml
index d5aba6d..67814e0 100644
--- a/Filtration/UserControls/EditableListBoxControl.xaml
+++ b/Filtration/UserControls/EditableListBoxControl.xaml
@@ -41,7 +41,7 @@
-
+
diff --git a/Filtration/ViewModels/AvalonDockWorkspaceViewModel.cs b/Filtration/ViewModels/AvalonDockWorkspaceViewModel.cs
index c23a24d..8867e62 100644
--- a/Filtration/ViewModels/AvalonDockWorkspaceViewModel.cs
+++ b/Filtration/ViewModels/AvalonDockWorkspaceViewModel.cs
@@ -107,7 +107,6 @@ namespace Filtration.ViewModels
}
private List _tools;
- private FiltrationViewModelBase _activeContent;
public IEnumerable Tools
{
diff --git a/Filtration/ViewModels/MainWindowViewModel.cs b/Filtration/ViewModels/MainWindowViewModel.cs
index bc3007a..c278d34 100644
--- a/Filtration/ViewModels/MainWindowViewModel.cs
+++ b/Filtration/ViewModels/MainWindowViewModel.cs
@@ -8,6 +8,7 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using Filtration.Common.ViewModels;
using Filtration.Interface;
+using Filtration.Models;
using Filtration.ObjectModel.ThemeEditor;
using Filtration.Properties;
using Filtration.Repositories;
@@ -177,23 +178,23 @@ namespace Filtration.ViewModels
public async void CheckForUpdates()
{
- var assembly = Assembly.GetExecutingAssembly();
- var assemblyVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
- var currentVersion = Convert.ToDecimal(assemblyVersion.FileMajorPart + CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator + assemblyVersion.FileMinorPart);
+ var assemblyVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
var result = await _updateCheckService.GetUpdateData();
try
{
- if (result.CurrentVersion > currentVersion)
+ if (result.LatestVersionMajorPart >= assemblyVersion.FileMajorPart &&
+ result.LatestVersionMinorPart > assemblyVersion.FileMinorPart)
{
if (Settings.Default.SuppressUpdates == false ||
- Settings.Default.SuppressUpdatesUpToVersion < result.CurrentVersion)
+ LatestVersionIsNewerThanSuppressedVersion(result))
{
Settings.Default.SuppressUpdates = false;
Settings.Default.Save();
var updateAvailableView = new UpdateAvailableView {DataContext = _updateAvailableViewModel};
- _updateAvailableViewModel.Initialise(result, currentVersion);
+ _updateAvailableViewModel.Initialise(result, assemblyVersion.FileMajorPart,
+ assemblyVersion.FileMinorPart);
_updateAvailableViewModel.OnRequestClose += (s, e) => updateAvailableView.Close();
updateAvailableView.ShowDialog();
}
@@ -210,6 +211,13 @@ namespace Filtration.ViewModels
}
}
+ private bool LatestVersionIsNewerThanSuppressedVersion(UpdateData updateData)
+ {
+ return Settings.Default.SuppressUpdatesUpToVersionMajorPart < updateData.LatestVersionMajorPart ||
+ (Settings.Default.SuppressUpdatesUpToVersionMajorPart <= updateData.LatestVersionMajorPart &&
+ Settings.Default.SuppressUpdatesUpToVersionMinorPart < updateData.LatestVersionMinorPart);
+ }
+
public ImageSource Icon { get; private set; }
public IAvalonDockWorkspaceViewModel AvalonDockWorkspaceViewModel
diff --git a/Filtration/ViewModels/UpdateAvailableViewModel.cs b/Filtration/ViewModels/UpdateAvailableViewModel.cs
index 5cf6ed0..04a47a5 100644
--- a/Filtration/ViewModels/UpdateAvailableViewModel.cs
+++ b/Filtration/ViewModels/UpdateAvailableViewModel.cs
@@ -1,10 +1,5 @@
using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
using Filtration.Models;
using Filtration.Properties;
using GalaSoft.MvvmLight.CommandWpf;
@@ -14,9 +9,9 @@ namespace Filtration.ViewModels
internal interface IUpdateAvailableViewModel
{
event EventHandler OnRequestClose;
- void Initialise(UpdateData updateData, decimal currentVersion);
- decimal CurrentVersion { get; }
- decimal NewVersion { get; }
+ void Initialise(UpdateData updateData, int currentVersionMajorPart, int currentVersionMinorPart);
+ string CurrentVersion { get; }
+ string NewVersion { get; }
string ReleaseNotes { get; }
DateTime ReleaseDate { get; }
}
@@ -24,7 +19,8 @@ namespace Filtration.ViewModels
internal class UpdateAvailableViewModel : IUpdateAvailableViewModel
{
private UpdateData _updateData;
- private decimal _currentVersion;
+ private int _currentVersionMajorPart;
+ private int _currentVersionMinorPart;
public UpdateAvailableViewModel()
{
@@ -39,20 +35,21 @@ namespace Filtration.ViewModels
public RelayCommand AskLaterCommand { get; private set; }
public RelayCommand DownloadCommand { get; private set; }
- public void Initialise(UpdateData updateData, decimal currentVersion)
+ public void Initialise(UpdateData updateData, int currentVersionMajorPart, int currentVersionMinorPart)
{
- _currentVersion = currentVersion;
+ _currentVersionMajorPart = currentVersionMajorPart;
+ _currentVersionMinorPart = currentVersionMinorPart;
_updateData = updateData;
}
- public decimal CurrentVersion
+ public string CurrentVersion
{
- get { return _currentVersion; }
+ get { return _currentVersionMajorPart + "." + _currentVersionMinorPart; }
}
- public decimal NewVersion
+ public string NewVersion
{
- get { return _updateData.CurrentVersion; }
+ get { return _updateData.LatestVersionMajorPart + "." + _updateData.LatestVersionMinorPart; }
}
public string ReleaseNotes
@@ -73,7 +70,8 @@ namespace Filtration.ViewModels
private void OnNeverAskAgainCommand()
{
Settings.Default.SuppressUpdates = true;
- Settings.Default.SuppressUpdatesUpToVersion = _updateData.CurrentVersion;
+ Settings.Default.SuppressUpdatesUpToVersionMajorPart = _updateData.LatestVersionMajorPart;
+ Settings.Default.SuppressUpdatesUpToVersionMinorPart = _updateData.LatestVersionMinorPart;
Settings.Default.Save();
CloseWindow();
}
diff --git a/Filtration/Views/ItemFilterSectionView.xaml b/Filtration/Views/ItemFilterSectionView.xaml
index 6ff0543..46f28b1 100644
--- a/Filtration/Views/ItemFilterSectionView.xaml
+++ b/Filtration/Views/ItemFilterSectionView.xaml
@@ -8,7 +8,7 @@
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="300">
-
+
+
+
\ No newline at end of file
diff --git a/Filtration/packages.config b/Filtration/packages.config
index d28bda8..38a0c67 100644
--- a/Filtration/packages.config
+++ b/Filtration/packages.config
@@ -6,6 +6,7 @@
+