diff --git a/Application/FileConverter/ViewModels/SettingsViewModel.cs b/Application/FileConverter/ViewModels/SettingsViewModel.cs index 3148720..62f2b47 100644 --- a/Application/FileConverter/ViewModels/SettingsViewModel.cs +++ b/Application/FileConverter/ViewModels/SettingsViewModel.cs @@ -20,7 +20,6 @@ namespace FileConverter.ViewModels using GalaSoft.MvvmLight.Messaging; using Microsoft.Win32; - using ImageMagick; /// /// This class contains properties that the main View can data bind to. diff --git a/Application/FileConverter/Views/DragDropExtension.cs b/Application/FileConverter/Views/DragDropExtension.cs index 793764e..0608ccb 100644 --- a/Application/FileConverter/Views/DragDropExtension.cs +++ b/Application/FileConverter/Views/DragDropExtension.cs @@ -1,16 +1,15 @@ // License: http://www.gnu.org/licenses/gpl.html GPL version 3. -using System; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - namespace FileConverter.Views { + using System; + using System.Windows; + using System.Windows.Controls; + using System.Windows.Media; + /// /// Provides extended support for drag drop operation /// - public static class DragDropExtension { public static readonly DependencyProperty ScrollOnDragDropProperty = DependencyProperty.RegisterAttached("ScrollOnDragDrop", typeof(bool), typeof(DragDropExtension), new PropertyMetadata(false, HandleScrollOnDragDropChanged)); @@ -37,14 +36,14 @@ namespace FileConverter.Views private static void HandleScrollOnDragDropChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args) { - FrameworkElement container = dependencyObject as FrameworkElement; - if (dependencyObject == null) { Diagnostics.Debug.LogError("Invalid types!"); return; } + FrameworkElement container = dependencyObject as FrameworkElement; + Unsubscribe(container); if (true.Equals(args.NewValue))