Equbuxu 3 years ago
parent
commit
2c011ae16a
100 changed files with 327 additions and 426 deletions
  1. 1 0
      src/PixiEditor/App.xaml
  2. 1 1
      src/PixiEditor/App.xaml.cs
  3. 3 5
      src/PixiEditor/Exceptions/CorruptedFileException.cs
  4. 5 6
      src/PixiEditor/Helpers/Behaviours/ClearFocusOnClickBehavior.cs
  5. 3 8
      src/PixiEditor/Helpers/Behaviours/GlobalShortcutFocusBehavior.cs
  6. 1 1
      src/PixiEditor/Helpers/Behaviours/MouseBehavior.cs
  7. 2 2
      src/PixiEditor/Helpers/Behaviours/TextBlockExtensions.cs
  8. 2 2
      src/PixiEditor/Helpers/BindingProxy.cs
  9. 3 4
      src/PixiEditor/Helpers/Converters/BoolToIntConverter.cs
  10. 3 9
      src/PixiEditor/Helpers/Converters/CountToVisibilityConverter.cs
  11. 3 4
      src/PixiEditor/Helpers/Converters/DebugConverter.cs
  12. 3 4
      src/PixiEditor/Helpers/Converters/DoubleToIntConverter.cs
  13. 3 4
      src/PixiEditor/Helpers/Converters/EmptyStringToVisibilityConverter.cs
  14. 3 8
      src/PixiEditor/Helpers/Converters/EnumBooleanConverter.cs
  15. 2 2
      src/PixiEditor/Helpers/Converters/EqualityBoolToVisibilityConverter.cs
  16. 4 4
      src/PixiEditor/Helpers/Converters/FileExtensionToColorConverter.cs
  17. 3 4
      src/PixiEditor/Helpers/Converters/FloorConverter.cs
  18. 3 4
      src/PixiEditor/Helpers/Converters/FormattedColorConverter.cs
  19. 3 4
      src/PixiEditor/Helpers/Converters/IndentConverter.cs
  20. 4 9
      src/PixiEditor/Helpers/Converters/IndexToAssociatedKeyConverter.cs
  21. 4 5
      src/PixiEditor/Helpers/Converters/IntToPickerTypeConverter.cs
  22. 3 5
      src/PixiEditor/Helpers/Converters/IntToViewportRectConverter.cs
  23. 3 4
      src/PixiEditor/Helpers/Converters/InverseBooleanConverter.cs
  24. 3 4
      src/PixiEditor/Helpers/Converters/IsSpecifiedTypeConverter.cs
  25. 3 4
      src/PixiEditor/Helpers/Converters/KeyToStringConverter.cs
  26. 3 8
      src/PixiEditor/Helpers/Converters/MarkupConverter.cs
  27. 3 3
      src/PixiEditor/Helpers/Converters/ModifierFlagToModifiersConverter.cs
  28. 3 4
      src/PixiEditor/Helpers/Converters/MultiValueMarkupConverter.cs
  29. 3 4
      src/PixiEditor/Helpers/Converters/NotNullToBoolConverter.cs
  30. 3 4
      src/PixiEditor/Helpers/Converters/NotNullToVisibilityConverter.cs
  31. 3 4
      src/PixiEditor/Helpers/Converters/NullToVisibilityConverter.cs
  32. 3 5
      src/PixiEditor/Helpers/Converters/OppositeVisibilityConverter.cs
  33. 5 10
      src/PixiEditor/Helpers/Converters/PaletteItemsToWidthConverter.cs
  34. 4 5
      src/PixiEditor/Helpers/Converters/PaletteViewerWidthToVisibilityConverter.cs
  35. 4 6
      src/PixiEditor/Helpers/Converters/SKColorToMediaColorConverter.cs
  36. 3 5
      src/PixiEditor/Helpers/Converters/SingleInstanceConverter.cs
  37. 3 5
      src/PixiEditor/Helpers/Converters/SingleInstanceMultiValueConverter.cs
  38. 3 4
      src/PixiEditor/Helpers/Converters/ThresholdVisibilityConverter.cs
  39. 3 4
      src/PixiEditor/Helpers/Converters/ZoomToViewportConverter.cs
  40. 5 6
      src/PixiEditor/Helpers/CrashHelper.cs
  41. 4 7
      src/PixiEditor/Helpers/DependencyInjectionHelper.cs
  42. 5 5
      src/PixiEditor/Helpers/DesignCommandHelpers.cs
  43. 3 5
      src/PixiEditor/Helpers/ExecutionTrigger.cs
  44. 3 5
      src/PixiEditor/Helpers/Extensions/DictionaryHelper.cs
  45. 3 5
      src/PixiEditor/Helpers/Extensions/DirectoryExtensions.cs
  46. 3 8
      src/PixiEditor/Helpers/Extensions/EnumHelpers.cs
  47. 2 2
      src/PixiEditor/Helpers/Extensions/EnumerableHelpers.cs
  48. 4 5
      src/PixiEditor/Helpers/Extensions/Int32RectHelper.cs
  49. 1 1
      src/PixiEditor/Helpers/Extensions/ParserHelpers.cs
  50. 4 5
      src/PixiEditor/Helpers/Extensions/PixelFormatHelper.cs
  51. 4 4
      src/PixiEditor/Helpers/Extensions/SKRectIHelper.cs
  52. 3 2
      src/PixiEditor/Helpers/Extensions/ServiceCollectionHelpers.cs
  53. 4 4
      src/PixiEditor/Helpers/Extensions/SkiaWPFHelpers.cs
  54. 3 7
      src/PixiEditor/Helpers/Extensions/StringHelpers.cs
  55. 3 4
      src/PixiEditor/Helpers/Extensions/ToolbarHelpers.cs
  56. 4 4
      src/PixiEditor/Helpers/GlobalMouseHook.cs
  57. 4 4
      src/PixiEditor/Helpers/IconEvaluators.cs
  58. 2 2
      src/PixiEditor/Helpers/InputKeyHelpers.cs
  59. 2 2
      src/PixiEditor/Helpers/PaletteHelpers.cs
  60. 1 1
      src/PixiEditor/Helpers/ProcessHelper.cs
  61. 3 4
      src/PixiEditor/Helpers/ProcessHelpers.cs
  62. 5 6
      src/PixiEditor/Helpers/RelayCommand.cs
  63. 3 5
      src/PixiEditor/Helpers/SizeCalculator.cs
  64. 3 6
      src/PixiEditor/Helpers/StringExtensions.cs
  65. 4 7
      src/PixiEditor/Helpers/SupportedFilesHelper.cs
  66. 2 4
      src/PixiEditor/Helpers/UI/DocumentsTemplateSelector.cs
  67. 2 2
      src/PixiEditor/Helpers/UI/PanelsStyleSelector.cs
  68. 3 5
      src/PixiEditor/Helpers/UI/ReversedOrderStackPanel.cs
  69. 2 2
      src/PixiEditor/Helpers/UI/TreeViewItemHelper.cs
  70. 3 4
      src/PixiEditor/Helpers/VersionHelpers.cs
  71. 2 3
      src/PixiEditor/Models/Colors/ExColor.cs
  72. 2 2
      src/PixiEditor/Models/Commands/Attributes/Commands/BasicAttribute.cs
  73. 4 4
      src/PixiEditor/Models/Commands/Attributes/Commands/CommandAttribute.cs
  74. 3 3
      src/PixiEditor/Models/Commands/Attributes/Commands/DebugAttribute.cs
  75. 3 3
      src/PixiEditor/Models/Commands/Attributes/Commands/GroupAttribute.cs
  76. 3 3
      src/PixiEditor/Models/Commands/Attributes/Commands/InternalAttribute.cs
  77. 2 2
      src/PixiEditor/Models/Commands/Attributes/Commands/ToolAttribute.cs
  78. 2 2
      src/PixiEditor/Models/Commands/Attributes/Evaluators/CanExecuteAttribute.cs
  79. 2 2
      src/PixiEditor/Models/Commands/Attributes/Evaluators/EvaluatorAttribute.cs
  80. 2 2
      src/PixiEditor/Models/Commands/Attributes/Evaluators/IconAttribute.cs
  81. 5 6
      src/PixiEditor/Models/Commands/CommandCollection.cs
  82. 26 26
      src/PixiEditor/Models/Commands/CommandController.cs
  83. 4 4
      src/PixiEditor/Models/Commands/CommandGroup.cs
  84. 1 1
      src/PixiEditor/Models/Commands/CommandMethods.cs
  85. 3 3
      src/PixiEditor/Models/Commands/Commands/BasicCommand.cs
  86. 5 5
      src/PixiEditor/Models/Commands/Commands/Command.cs
  87. 5 5
      src/PixiEditor/Models/Commands/Commands/ToolCommand.cs
  88. 2 2
      src/PixiEditor/Models/Commands/Evaluators/CanExecuteEvaluator.cs
  89. 2 2
      src/PixiEditor/Models/Commands/Evaluators/Evaluator.cs
  90. 2 2
      src/PixiEditor/Models/Commands/Evaluators/IconEvaluator.cs
  91. 1 1
      src/PixiEditor/Models/Commands/Exceptions/CommandNotFoundException.cs
  92. 3 2
      src/PixiEditor/Models/Commands/Search/ColorSearchResult.cs
  93. 4 4
      src/PixiEditor/Models/Commands/Search/CommandSearchResult.cs
  94. 4 5
      src/PixiEditor/Models/Commands/Search/FileSearchResult.cs
  95. 5 5
      src/PixiEditor/Models/Commands/Search/SearchResult.cs
  96. 4 4
      src/PixiEditor/Models/Commands/ShortcutChangedEventArgs.cs
  97. 4 4
      src/PixiEditor/Models/Commands/ShortcutFile.cs
  98. 2 2
      src/PixiEditor/Models/Commands/Templates/IShortcutDefaults.cs
  99. 3 3
      src/PixiEditor/Models/Commands/Templates/IShortcutFile.cs
  100. 3 3
      src/PixiEditor/Models/Commands/Templates/IShortcutInstallation.cs

+ 1 - 0
src/PixiEditor/App.xaml

@@ -1,4 +1,5 @@
 <Application x:Class="PixiEditor.App"
+             x:ClassModifier="internal"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              >

+ 1 - 1
src/PixiEditor/App.xaml.cs

@@ -10,7 +10,7 @@ namespace PixiEditor;
 /// <summary>
 ///     Interaction logic for App.xaml.
 /// </summary>
-public partial class App : Application
+internal partial class App : Application
 {
     /// <summary>The event mutex name.</summary>
     private const string UniqueEventName = "33f1410b-2ad7-412a-a468-34fe0a85747c";

+ 3 - 5
src/PixiEditor/Exceptions/CorruptedFileException.cs

@@ -1,9 +1,7 @@
-using System;
-
-namespace PixiEditor.Exceptions;
+namespace PixiEditor.Exceptions;
 
 [Serializable]
-public class CorruptedFileException : Exception
+internal class CorruptedFileException : Exception
 {
     public CorruptedFileException()
         : base("The file you've chosen might be corrupted.")
@@ -26,4 +24,4 @@ public class CorruptedFileException : Exception
         : base(info, context)
     {
     }
-}
+}

+ 5 - 6
src/PixiEditor/Helpers/Behaviours/ClearFocusOnClickBehavior.cs

@@ -1,11 +1,10 @@
-using PixiEditor.Models.Controllers;
-using System.Windows;
-using System.Windows.Input;
+using System.Windows;
 using System.Windows.Interactivity;
+using PixiEditor.Models.Controllers;
 
 namespace PixiEditor.Helpers.Behaviours;
 
-public class ClearFocusOnClickBehavior : Behavior<FrameworkElement>
+internal class ClearFocusOnClickBehavior : Behavior<FrameworkElement>
 {
     protected override void OnAttached()
     {
@@ -16,7 +15,7 @@ public class ClearFocusOnClickBehavior : Behavior<FrameworkElement>
 
     private void AssociatedObject_LostKeyboardFocus(object sender, System.Windows.Input.KeyboardFocusChangedEventArgs e)
     {
-            
+
     }
 
     protected override void OnDetaching()
@@ -29,4 +28,4 @@ public class ClearFocusOnClickBehavior : Behavior<FrameworkElement>
         AssociatedObject.Focus();
         ShortcutController.UnblockShortcutExecutionAll();
     }
-}
+}

+ 3 - 8
src/PixiEditor/Helpers/Behaviours/GlobalShortcutFocusBehavior.cs

@@ -1,15 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
+using System.Windows;
 using System.Windows.Interactivity;
 using PixiEditor.Models.Controllers;
 
 namespace PixiEditor.Helpers.Behaviours;
 
-public class GlobalShortcutFocusBehavior : Behavior<FrameworkElement>
+internal class GlobalShortcutFocusBehavior : Behavior<FrameworkElement>
 {
     protected override void OnAttached()
     {
@@ -34,4 +29,4 @@ public class GlobalShortcutFocusBehavior : Behavior<FrameworkElement>
     {
         ShortcutController.BlockShortcutExection("GlobalShortcutFocusBehavior");
     }
-}
+}

+ 1 - 1
src/PixiEditor/Helpers/Behaviours/MouseBehavior.cs

@@ -4,7 +4,7 @@ using System.Windows.Interactivity;
 
 namespace PixiEditor.Helpers.Behaviours
 {
-    public class MouseBehavior : Behavior<FrameworkElement>
+    internal class MouseBehavior : Behavior<FrameworkElement>
     {
         public static readonly DependencyProperty MouseYProperty = DependencyProperty.Register(nameof(MouseY), typeof(double), typeof(MouseBehavior), new PropertyMetadata(default(double)));
 

+ 2 - 2
src/PixiEditor/Helpers/Behaviours/TextBlockExtensions.cs

@@ -4,7 +4,7 @@ using System.Windows.Documents;
 
 namespace PixiEditor.Helpers.Behaviours;
 
-public static class TextBlockExtensions
+internal static class TextBlockExtensions
 {
     public static IEnumerable<Inline> GetBindableInlines(DependencyObject obj)
     {
@@ -29,4 +29,4 @@ public static class TextBlockExtensions
         target.Inlines.Clear();
         target.Inlines.AddRange((System.Collections.IEnumerable)e.NewValue);
     }
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/BindingProxy.cs

@@ -2,7 +2,7 @@
 
 namespace PixiEditor.Helpers;
 
-public class BindingProxy : Freezable
+internal class BindingProxy : Freezable
 {
     protected override Freezable CreateInstanceCore()
     {
@@ -17,4 +17,4 @@ public class BindingProxy : Freezable
 
     public static readonly DependencyProperty DataProperty =
         DependencyProperty.Register(nameof(Data), typeof(object), typeof(BindingProxy), new UIPropertyMetadata(null));
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/BoolToIntConverter.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class BoolToIntConverter
+internal class BoolToIntConverter
     : SingleInstanceConverter<BoolToIntConverter>
 {
     public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -23,4 +22,4 @@ public class BoolToIntConverter
 
         return 1;
     }
-}
+}

+ 3 - 9
src/PixiEditor/Helpers/Converters/CountToVisibilityConverter.cs

@@ -1,15 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Globalization;
 using System.Windows;
-using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class CountToVisibilityConverter : SingleInstanceConverter<CountToVisibilityConverter>
+internal class CountToVisibilityConverter : SingleInstanceConverter<CountToVisibilityConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
@@ -20,4 +14,4 @@ public class CountToVisibilityConverter : SingleInstanceConverter<CountToVisibil
 
         return Visibility.Visible;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/DebugConverter.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class DebugConverter
+internal class DebugConverter
     : SingleInstanceConverter<DebugConverter>
 {
     public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -15,4 +14,4 @@ public class DebugConverter
     {
         return value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/DoubleToIntConverter.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class DoubleToIntConverter :
+internal class DoubleToIntConverter :
     SingleInstanceConverter<DoubleToIntConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -16,4 +15,4 @@ public class DoubleToIntConverter :
 
         return value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/EmptyStringToVisibilityConverter.cs

@@ -1,10 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class EmptyStringToVisibilityConverter :
+internal class EmptyStringToVisibilityConverter :
     SingleInstanceConverter<EmptyStringToVisibilityConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -14,4 +13,4 @@ public class EmptyStringToVisibilityConverter :
                 ? Visibility.Collapsed
                 : Visibility.Visible;
     }
-}
+}

+ 3 - 8
src/PixiEditor/Helpers/Converters/EnumBooleanConverter.cs

@@ -1,13 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
+using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class EnumBooleanConverter : SingleInstanceConverter<EnumBooleanConverter>
+internal class EnumBooleanConverter : SingleInstanceConverter<EnumBooleanConverter>
 {
     #region IValueConverter Members
     public override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
@@ -33,4 +28,4 @@ public class EnumBooleanConverter : SingleInstanceConverter<EnumBooleanConverter
         return Enum.Parse(targetType, parameterString);
     }
     #endregion
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/Converters/EqualityBoolToVisibilityConverter.cs

@@ -3,7 +3,7 @@ using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class EqualityBoolToVisibilityConverter : MarkupConverter
+internal class EqualityBoolToVisibilityConverter : MarkupConverter
 {
     public bool Invert { get; set; }
 
@@ -23,4 +23,4 @@ public class EqualityBoolToVisibilityConverter : MarkupConverter
 
         return value.Equals(parameter) != Invert ? Visibility.Visible : Visibility.Collapsed;
     }
-}
+}

+ 4 - 4
src/PixiEditor/Helpers/Converters/FileExtensionToColorConverter.cs

@@ -1,11 +1,11 @@
-using PixiEditor.Models.Enums;
-using System.Globalization;
+using System.Globalization;
 using System.IO;
 using System.Windows.Media;
+using PixiEditor.Models.Enums;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class FileExtensionToColorConverter :
+internal class FileExtensionToColorConverter :
     SingleInstanceConverter<FileExtensionToColorConverter>
 {
     private static readonly Dictionary<string, SolidColorBrush> extensionsToBrushes;
@@ -38,4 +38,4 @@ public class FileExtensionToColorConverter :
     {
         return new SolidColorBrush(Color.FromRgb(r, g, b));
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/FloorConverter.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class FloorConverter : SingleInstanceConverter<FloorConverter>
+internal class FloorConverter : SingleInstanceConverter<FloorConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
@@ -14,4 +13,4 @@ public class FloorConverter : SingleInstanceConverter<FloorConverter>
     {
         return value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/FormattedColorConverter.cs

@@ -1,10 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows.Media;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class FormattedColorConverter
+internal class FormattedColorConverter
     : SingleInstanceMultiValueConverter<FormattedColorConverter>
 {
     public override object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
@@ -24,4 +23,4 @@ public class FormattedColorConverter
             _ => "",
         };
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/IndentConverter.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class IndentConverter
+internal class IndentConverter
     : SingleInstanceConverter<IndentConverter>
 {
     private const int IndentSize = 20;
@@ -19,4 +18,4 @@ public class IndentConverter
     {
         return Binding.DoNothing;
     }
-}
+}

+ 4 - 9
src/PixiEditor/Helpers/Converters/IndexToAssociatedKeyConverter.cs

@@ -1,17 +1,12 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Globalization;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class IndexToAssociatedKeyConverter : SingleInstanceConverter<IndexToAssociatedKeyConverter>
+internal class IndexToAssociatedKeyConverter : SingleInstanceConverter<IndexToAssociatedKeyConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
-        if(value is int index && index < 10)
+        if (value is int index && index < 10)
         {
             if (index == 9) return 0;
             return (int?)index + 1;
@@ -19,4 +14,4 @@ public class IndexToAssociatedKeyConverter : SingleInstanceConverter<IndexToAsso
 
         return (int?)null;
     }
-}
+}

+ 4 - 5
src/PixiEditor/Helpers/Converters/IntToPickerTypeConverter.cs

@@ -1,10 +1,9 @@
-using ColorPicker.Models;
-using System;
-using System.Globalization;
+using System.Globalization;
+using ColorPicker.Models;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class IntToPickerTypeConverter
+internal class IntToPickerTypeConverter
     : SingleInstanceConverter<IntToPickerTypeConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -16,4 +15,4 @@ public class IntToPickerTypeConverter
     {
         return (int)value;
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Converters/IntToViewportRectConverter.cs

@@ -1,11 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
-using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class IntToViewportRectConverter
+internal class IntToViewportRectConverter
     : SingleInstanceConverter<IntToViewportRectConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -14,4 +12,4 @@ public class IntToViewportRectConverter
             ? new Rect(0, 0, 1d / (int)value, 1d)
             : (object)new Rect(0, 0, 1d, 1d / (int)value);
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/InverseBooleanConverter.cs

@@ -1,10 +1,9 @@
-using System;
-using System.Windows.Data;
+using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
 [ValueConversion(typeof(bool), typeof(bool))]
-public class InverseBooleanConverter
+internal class InverseBooleanConverter
     : SingleInstanceConverter<InverseBooleanConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
@@ -13,4 +12,4 @@ public class InverseBooleanConverter
             ? throw new InvalidOperationException("The target must be a boolean")
             : !(bool)value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/IsSpecifiedTypeConverter.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
 [ValueConversion(typeof(object), typeof(bool))]
-public class IsSpecifiedTypeConverter : MarkupConverter
+internal class IsSpecifiedTypeConverter : MarkupConverter
 {
     public Type SpecifiedType { get; set; }
 
@@ -13,4 +12,4 @@ public class IsSpecifiedTypeConverter : MarkupConverter
     {
         return value != null && value.GetType() == SpecifiedType;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/KeyToStringConverter.cs

@@ -1,10 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows.Input;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class KeyToStringConverter
+internal class KeyToStringConverter
     : SingleInstanceConverter<KeyToStringConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -22,4 +21,4 @@ public class KeyToStringConverter
             return string.Empty;
         }
     }
-}
+}

+ 3 - 8
src/PixiEditor/Helpers/Converters/MarkupConverter.cs

@@ -1,15 +1,10 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Globalization;
 using System.Windows.Data;
 using System.Windows.Markup;
 
 namespace PixiEditor.Helpers.Converters;
 
-public abstract class MarkupConverter : MarkupExtension, IValueConverter
+internal abstract class MarkupConverter : MarkupExtension, IValueConverter
 {
     public abstract object Convert(object value, Type targetType, object parameter, CultureInfo culture);
 
@@ -22,4 +17,4 @@ public abstract class MarkupConverter : MarkupExtension, IValueConverter
     {
         return this;
     }
-}
+}

+ 3 - 3
src/PixiEditor/Helpers/Converters/ModifierFlagToModifiersConverter.cs

@@ -3,13 +3,13 @@ using System.Windows.Input;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class ModifierFlagToModifiersConverter : SingleInstanceConverter<ModifierFlagToModifiersConverter>
+internal class ModifierFlagToModifiersConverter : SingleInstanceConverter<ModifierFlagToModifiersConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
         return GetModifiers((ModifierKeys)value);
     }
-    
+
     private IEnumerable<ModifierKeys> GetModifiers(ModifierKeys keys)
     {
         if (keys.HasFlag(ModifierKeys.Windows))
@@ -29,4 +29,4 @@ public class ModifierFlagToModifiersConverter : SingleInstanceConverter<Modifier
             yield return ModifierKeys.Alt;
         }
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/MultiValueMarkupConverter.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows.Data;
 using System.Windows.Markup;
 
 namespace PixiEditor.Helpers.Converters;
 
-public abstract class MultiValueMarkupConverter : MarkupExtension, IMultiValueConverter
+internal abstract class MultiValueMarkupConverter : MarkupExtension, IMultiValueConverter
 {
     public abstract object Convert(object[] values, Type targetType, object parameter, CultureInfo culture);
 
@@ -15,4 +14,4 @@ public abstract class MultiValueMarkupConverter : MarkupExtension, IMultiValueCo
     }
 
     public override object ProvideValue(IServiceProvider serviceProvider) => this;
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/NotNullToBoolConverter.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
 [ValueConversion(typeof(object), typeof(bool))]
-public class NotNullToBoolConverter
+internal class NotNullToBoolConverter
     : SingleInstanceConverter<NotNullToBoolConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -19,4 +18,4 @@ public class NotNullToBoolConverter
     {
         return value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/NotNullToVisibilityConverter.cs

@@ -1,12 +1,11 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
 [ValueConversion(typeof(object), typeof(Visibility))]
-public class NotNullToVisibilityConverter
+internal class NotNullToVisibilityConverter
     : MarkupConverter
 {
     public bool Inverted { get; set; }
@@ -22,4 +21,4 @@ public class NotNullToVisibilityConverter
 
         return isNull ? Visibility.Visible : Visibility.Collapsed;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/NullToVisibilityConverter.cs

@@ -1,14 +1,13 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class NullToVisibilityConverter
+internal class NullToVisibilityConverter
     : SingleInstanceConverter<NullToVisibilityConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
         return value is null ? Visibility.Visible : Visibility.Collapsed;
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Converters/OppositeVisibilityConverter.cs

@@ -1,11 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
-using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class OppositeVisibilityConverter
+internal class OppositeVisibilityConverter
     : SingleInstanceConverter<OppositeVisibilityConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -27,4 +25,4 @@ public class OppositeVisibilityConverter
 
         return null;
     }
-}
+}

+ 5 - 10
src/PixiEditor/Helpers/Converters/PaletteItemsToWidthConverter.cs

@@ -1,22 +1,17 @@
-using SkiaSharp;
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Globalization;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class PaletteItemsToWidthConverter : SingleInstanceConverter<PaletteItemsToWidthConverter>
+internal class PaletteItemsToWidthConverter : SingleInstanceConverter<PaletteItemsToWidthConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
-        if(value is IList<SKColor> colors && colors.Count == 0)
+        if (value is IList<SKColor> colors && colors.Count == 0)
         {
             return 0;
         }
 
         return 120;
     }
-}
+}

+ 4 - 5
src/PixiEditor/Helpers/Converters/PaletteViewerWidthToVisibilityConverter.cs

@@ -1,19 +1,18 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class PaletteViewerWidthToVisibilityConverter : SingleInstanceConverter<PaletteViewerWidthToVisibilityConverter>
+internal class PaletteViewerWidthToVisibilityConverter : SingleInstanceConverter<PaletteViewerWidthToVisibilityConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
         bool isCompact = value is double and < 100;
-        if(parameter is string and "Hidden")
+        if (parameter is string and "Hidden")
         {
             return isCompact ? Visibility.Hidden : Visibility.Visible;
         }
 
         return isCompact ? Visibility.Visible : Visibility.Hidden;
     }
-}
+}

+ 4 - 6
src/PixiEditor/Helpers/Converters/SKColorToMediaColorConverter.cs

@@ -1,12 +1,10 @@
-using SkiaSharp;
-using System;
-using System.Globalization;
-using System.Windows.Data;
+using System.Globalization;
 using System.Windows.Media;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class SKColorToMediaColorConverter : SingleInstanceConverter<SKColorToMediaColorConverter>
+internal class SKColorToMediaColorConverter : SingleInstanceConverter<SKColorToMediaColorConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
     {
@@ -28,4 +26,4 @@ public class SKColorToMediaColorConverter : SingleInstanceConverter<SKColorToMed
         var color = (Color)value;
         return new SKColor(color.R, color.G, color.B, color.A);
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Converters/SingleInstanceConverter.cs

@@ -1,11 +1,9 @@
-using System;
-
-namespace PixiEditor.Helpers.Converters;
+namespace PixiEditor.Helpers.Converters;
 
 /// <summary>
 /// Use this if you want to share the same converter over the whole application. <para/> Do not use this if your converter has properties.
 /// </summary>
-public abstract class SingleInstanceConverter<TThis> : MarkupConverter
+internal abstract class SingleInstanceConverter<TThis> : MarkupConverter
     where TThis : SingleInstanceConverter<TThis>
 {
     private static SingleInstanceConverter<TThis> instance;
@@ -19,4 +17,4 @@ public abstract class SingleInstanceConverter<TThis> : MarkupConverter
 
         return instance;
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Converters/SingleInstanceMultiValueConverter.cs

@@ -1,8 +1,6 @@
-using System;
+namespace PixiEditor.Helpers.Converters;
 
-namespace PixiEditor.Helpers.Converters;
-
-public abstract class SingleInstanceMultiValueConverter<TThis> : MultiValueMarkupConverter
+internal abstract class SingleInstanceMultiValueConverter<TThis> : MultiValueMarkupConverter
     where TThis : SingleInstanceMultiValueConverter<TThis>
 {
     private static SingleInstanceMultiValueConverter<TThis> instance;
@@ -16,4 +14,4 @@ public abstract class SingleInstanceMultiValueConverter<TThis> : MultiValueMarku
 
         return instance;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/ThresholdVisibilityConverter.cs

@@ -1,10 +1,9 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class ThresholdVisibilityConverter
+internal class ThresholdVisibilityConverter
     : MarkupConverter
 {
     public double Threshold { get; set; } = 100;
@@ -16,4 +15,4 @@ public class ThresholdVisibilityConverter
             ? (double)value < Threshold ? Visibility.Visible : Visibility.Hidden
             : (double)value >= Threshold ? Visibility.Visible : Visibility.Hidden;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Converters/ZoomToViewportConverter.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Globalization;
+using System.Globalization;
 using System.Windows;
 using System.Windows.Data;
 
 namespace PixiEditor.Helpers.Converters;
 
-public class ZoomToViewportConverter
+internal class ZoomToViewportConverter
     : SingleInstanceConverter<ZoomToViewportConverter>
 {
     public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
@@ -18,4 +17,4 @@ public class ZoomToViewportConverter
 
         return Binding.DoNothing;
     }
-}
+}

+ 5 - 6
src/PixiEditor/Helpers/CrashHelper.cs

@@ -1,13 +1,12 @@
-using ByteSizeLib;
+using System.Globalization;
+using System.Text;
+using ByteSizeLib;
 using Hardware.Info;
 using PixiEditor.Models.DataHolders;
-using System;
-using System.Globalization;
-using System.Text;
 
 namespace PixiEditor.Helpers;
 
-public class CrashHelper
+internal class CrashHelper
 {
     private readonly IHardwareInfo hwInfo;
 
@@ -98,4 +97,4 @@ public class CrashHelper
             }
         }
     }
-}
+}

+ 4 - 7
src/PixiEditor/Helpers/DependencyInjectionHelper.cs

@@ -1,12 +1,9 @@
-using Microsoft.Extensions.DependencyInjection;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
+using System.Reflection;
+using Microsoft.Extensions.DependencyInjection;
 
 namespace PixiEditor.Helpers;
 
-public static class DependencyInjectionHelper
+internal static class DependencyInjectionHelper
 {
     public static T Inject<T>(this IServiceProvider provider)
         => (T)Inject(provider, typeof(T));
@@ -57,4 +54,4 @@ public static class DependencyInjectionHelper
 
         return true;
     }
-}
+}

+ 5 - 5
src/PixiEditor/Helpers/DesignCommandHelpers.cs

@@ -1,14 +1,14 @@
-using PixiEditor.Models.Commands;
-using CommandAttribute = PixiEditor.Models.Commands.Attributes.Command;
-using System.Reflection;
+using System.Reflection;
+using PixiEditor.Models.Commands;
 using PixiEditor.Models.Commands.Exceptions;
+using CommandAttribute = PixiEditor.Models.Commands.Attributes.Command;
 
 namespace PixiEditor.Helpers;
 
 /// <summary>
 /// Helps with debugging when using XAML
 /// </summary>
-public static class DesignCommandHelpers
+internal static class DesignCommandHelpers
 {
     private static IEnumerable<CommandAttribute.CommandAttribute> _commands;
 
@@ -32,4 +32,4 @@ public static class DesignCommandHelpers
 
         return command;
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/ExecutionTrigger.cs

@@ -1,12 +1,10 @@
-using System;
+namespace PixiEditor.Helpers;
 
-namespace PixiEditor.Helpers;
-
-public class ExecutionTrigger<T>
+internal class ExecutionTrigger<T>
 {
     public event EventHandler<T> Triggered;
     public void Execute(object sender, T args)
     {
         Triggered?.Invoke(sender, args);
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Extensions/DictionaryHelper.cs

@@ -1,8 +1,6 @@
-using System.Collections.Generic;
+namespace PixiEditor.Helpers.Extensions;
 
-namespace PixiEditor.Helpers.Extensions;
-
-public static class DictionaryHelper
+internal static class DictionaryHelper
 {
     public static void AddRangeOverride<TKey, TValue>(
         this IDictionary<TKey, TValue> dict,
@@ -26,4 +24,4 @@ public static class DictionaryHelper
             }
         }
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/Extensions/DirectoryExtensions.cs

@@ -1,8 +1,6 @@
-using System.Linq;
+namespace PixiEditor.Helpers.Extensions;
 
-namespace PixiEditor.Helpers.Extensions;
-
-public static class DirectoryExtensions
+internal static class DirectoryExtensions
 {
     /// <summary>
     ///     Gets files in directory with multiple filters.
@@ -15,4 +13,4 @@ public static class DirectoryExtensions
     {
         return filters.Split('|').SelectMany(filter => System.IO.Directory.GetFiles(sourceFolder, $"*{filter}", searchOption)).ToArray();
     }
-}
+}

+ 3 - 8
src/PixiEditor/Helpers/Extensions/EnumHelpers.cs

@@ -1,13 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.ComponentModel;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class EnumHelpers
+internal static class EnumHelpers
 {
     public static IEnumerable<T> GetFlags<T>(this T e)
         where T : Enum
@@ -32,4 +27,4 @@ public static class EnumHelpers
 
         return description;
     }
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/Extensions/EnumerableHelpers.cs

@@ -1,6 +1,6 @@
 namespace PixiEditor.Helpers.Extensions;
 
-public static class EnumerableHelpers
+internal static class EnumerableHelpers
 {
     /// <summary>
     /// Get's the item at the <paramref name="index"/> if it matches the <paramref name="predicate"/> or the first that matches after the <paramref name="index"/>.
@@ -93,4 +93,4 @@ public static class EnumerableHelpers
 
         return IndexOrNext(collection, predicate, index, false);
     }
-}
+}

+ 4 - 5
src/PixiEditor/Helpers/Extensions/Int32RectHelper.cs

@@ -1,10 +1,9 @@
-using SkiaSharp;
-using System;
-using System.Windows;
+using System.Windows;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class Int32RectHelper
+internal static class Int32RectHelper
 {
     public static Int32Rect Intersect(this Int32Rect rect, Int32Rect other)
     {
@@ -56,4 +55,4 @@ public static class Int32RectHelper
     {
         return new SKRectI(rect.X, rect.Y, rect.X + rect.Width, rect.Y + rect.Height);
     }
-}
+}

+ 1 - 1
src/PixiEditor/Helpers/Extensions/ParserHelpers.cs

@@ -3,7 +3,7 @@ using PixiEditor.Parser;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class ParserHelpers
+internal static class ParserHelpers
 {
     public static Document ToDocument(this SerializableDocument serializableDocument)
     {

+ 4 - 5
src/PixiEditor/Helpers/Extensions/PixelFormatHelper.cs

@@ -1,10 +1,9 @@
-using SkiaSharp;
-using System;
-using System.Windows.Media;
+using System.Windows.Media;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class PixelFormatHelper
+internal static class PixelFormatHelper
 {
     public static SKColorType ToSkia(this PixelFormat format, out SKAlphaType alphaType)
     {
@@ -69,4 +68,4 @@ public static class PixelFormatHelper
     {
         return TryToSkia(format, out _, out _);
     }
-}
+}

+ 4 - 4
src/PixiEditor/Helpers/Extensions/SKRectIHelper.cs

@@ -1,12 +1,12 @@
-using SkiaSharp;
-using System.Windows;
+using System.Windows;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class SKRectIHelper
+internal static class SKRectIHelper
 {
     public static Int32Rect ToInt32Rect(this SKRectI rect)
     {
         return new Int32Rect(rect.Left, rect.Top, rect.Width, rect.Height);
     }
-}
+}

+ 3 - 2
src/PixiEditor/Helpers/Extensions/ServiceCollectionHelpers.cs

@@ -9,11 +9,12 @@ using PixiEditor.Models.Tools;
 using PixiEditor.Models.Tools.Tools;
 using PixiEditor.Models.UserPreferences;
 using PixiEditor.ViewModels;
+using PixiEditor.ViewModels.SubViewModels.Document;
 using PixiEditor.ViewModels.SubViewModels.Main;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class ServiceCollectionHelpers
+internal static class ServiceCollectionHelpers
 {
     /// <summary>
     /// Add's all the services required to fully run PixiEditor's MainWindow
@@ -42,7 +43,7 @@ public static class ServiceCollectionHelpers
         // Controllers
         .AddSingleton<ShortcutController>()
         .AddSingleton<CommandController>()
-        .AddSingleton<BitmapManager>()
+        .AddSingleton<DocumentManagerViewModel>()
         // Tools
         .AddSingleton<Tool, MoveViewportTool>()
         .AddSingleton<Tool, MoveTool>()

+ 4 - 4
src/PixiEditor/Helpers/Extensions/SkiaWPFHelpers.cs

@@ -1,13 +1,13 @@
-using SkiaSharp;
-using System.Windows.Media;
+using System.Windows.Media;
+using SkiaSharp;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class SkiaWPFHelpers
+internal static class SkiaWPFHelpers
 {
     public static SKColor ToOpaqueSKColor(this Color color) => new(color.R, color.G, color.B);
     public static SKColor ToSKColor(this Color color) => new(color.R, color.G, color.B, color.A);
 
     public static Color ToOpaqueColor(this SKColor color) => Color.FromRgb(color.Red, color.Green, color.Blue);
     public static Color ToColor(this SKColor color) => Color.FromArgb(color.Alpha, color.Red, color.Green, color.Blue);
-}
+}

+ 3 - 7
src/PixiEditor/Helpers/Extensions/StringHelpers.cs

@@ -1,12 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Text;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class StringHelpers
+internal static class StringHelpers
 {
     public static string AddSpacesBeforeUppercaseLetters(this string text)
     {
@@ -28,4 +24,4 @@ public static class StringHelpers
     {
         return value.Length > maxLenght ? value.Substring(0, maxLenght) : value;
     }
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/Extensions/ToolbarHelpers.cs

@@ -1,14 +1,13 @@
-using System;
-using PixiEditor.Models.Tools.ToolSettings.Settings;
+using PixiEditor.Models.Tools.ToolSettings.Settings;
 using PixiEditor.Models.Tools.ToolSettings.Toolbars;
 
 namespace PixiEditor.Helpers.Extensions;
 
-public static class ToolbarHelpers
+internal static class ToolbarHelpers
 {
     public static EnumSetting<TEnum> GetEnumSetting<TEnum>(this Toolbar toolbar, string name)
         where TEnum : struct, Enum
     {
         return toolbar.GetSetting<EnumSetting<TEnum>>(name);
     }
-}
+}

+ 4 - 4
src/PixiEditor/Helpers/GlobalMouseHook.cs

@@ -13,7 +13,7 @@ public delegate void MouseUpEventHandler(object sender, Point p, MouseButton but
 
 // see https://stackoverflow.com/questions/22659925/how-to-capture-mouseup-event-outside-the-wpf-window
 [ExcludeFromCodeCoverage]
-public static class GlobalMouseHook
+internal static class GlobalMouseHook
 {
     private const int WH_MOUSE_LL = 14;
     private const int WM_LBUTTONUP = 0x0202;
@@ -28,8 +28,8 @@ public static class GlobalMouseHook
     public static event MouseUpEventHandler OnMouseUp
     {
         add
-        { 
-// disable low-level hook in debug to prevent mouse lag when pausing in debugger
+        {
+            // disable low-level hook in debug to prevent mouse lag when pausing in debugger
 #if !DEBUG
                 Subscribe();
 #endif
@@ -145,4 +145,4 @@ public static class GlobalMouseHook
         public uint Time;
         public IntPtr DwExtraInfo;
     }
-}
+}

+ 4 - 4
src/PixiEditor/Helpers/IconEvaluators.cs

@@ -8,15 +8,15 @@ using Command = PixiEditor.Models.Commands.Command;
 
 namespace PixiEditor.Helpers;
 
-public static class IconEvaluators
+internal static class IconEvaluators
 {
     private static readonly FontFamily segeoMdl2 = new FontFamily("Segoe MDL2 Assets");
-    
+
     [Evaluator.Icon("PixiEditor.FontIcon")]
     public static ImageSource GetFontIcon(object parameter)
     {
         string symbolCode = GetIconName(parameter);
-        
+
         var textBlock = new TextBlock
         {
             FontFamily = segeoMdl2,
@@ -49,4 +49,4 @@ public static class IconEvaluators
             _ => throw new NotImplementedException($"Parameter typeof {parameter.GetType()} has not been implemented yet.")
         };
     }
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/InputKeyHelpers.cs

@@ -5,7 +5,7 @@ using System.Windows.Input;
 
 namespace PixiEditor.Helpers;
 
-public static class InputKeyHelpers
+internal static class InputKeyHelpers
 {
     /// <summary>
     /// Returns the charcter of the <paramref name="key"/> mapped to the users keyboard layout
@@ -82,4 +82,4 @@ public static class InputKeyHelpers
 
     [DllImport("user32.dll")]
     private static extern uint MapVirtualKeyExW(uint uCode, MapType uMapType, int hkl);
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/PaletteHelpers.cs

@@ -2,7 +2,7 @@
 
 namespace PixiEditor.Helpers;
 
-public static class PaletteHelpers
+internal static class PaletteHelpers
 {
     public static string GetFilter(IList<PaletteFileParser> parsers, bool includeCommon)
     {
@@ -27,4 +27,4 @@ public static class PaletteHelpers
 
         return filter.Remove(filter.Length - 1);
     }
-}
+}

+ 1 - 1
src/PixiEditor/Helpers/ProcessHelper.cs

@@ -4,7 +4,7 @@ using System.Security.Principal;
 
 namespace PixiEditor.Helpers;
 
-public static class ProcessHelper
+internal static class ProcessHelper
 {
     public static Process RunAsAdmin(string path)
     {

+ 3 - 4
src/PixiEditor/Helpers/ProcessHelpers.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
 
 namespace PixiEditor.Helpers;
 
-public static class ProcessHelpers
+internal static class ProcessHelpers
 {
     public static void ShellExecute(string url)
     {
@@ -15,4 +14,4 @@ public static class ProcessHelpers
     }
 
     public static void ShellExecuteEV(string path) => ShellExecute(Environment.ExpandEnvironmentVariables(path));
-}
+}

+ 5 - 6
src/PixiEditor/Helpers/RelayCommand.cs

@@ -1,9 +1,8 @@
-using System;
-using System.Windows.Input;
+using System.Windows.Input;
 
 namespace PixiEditor.Helpers;
 
-public class RelayCommand<T> : ICommand
+internal class RelayCommand<T> : ICommand
 {
     private readonly Action<T> execute;
     private readonly Predicate<T> canExecute;
@@ -38,7 +37,7 @@ public class RelayCommand<T> : ICommand
     public bool CanExecute(object parameter)
     {
         if (canExecute == null) return true;
-        if(parameter != null && parameter is not T)
+        if (parameter != null && parameter is not T)
         {
             throw new ArgumentException("Provided parameter type does not match RelayCommand parameter type");
         }
@@ -62,9 +61,9 @@ public class RelayCommand<T> : ICommand
     }
 }
 
-public class RelayCommand : RelayCommand<object>
+internal class RelayCommand : RelayCommand<object>
 {
     public RelayCommand(Action<object> execute, Predicate<object> canExecute) : base(execute, canExecute) { }
 
     public RelayCommand(Action<object> execute) : base(execute) { }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/SizeCalculator.cs

@@ -1,8 +1,6 @@
-using System;
+namespace PixiEditor.Helpers;
 
-namespace PixiEditor.Helpers;
-
-public static class SizeCalculator
+internal static class SizeCalculator
 {
     public static System.Drawing.Size CalcAbsoluteFromPercentage(float percentage, System.Drawing.Size currentSize)
     {
@@ -16,4 +14,4 @@ public static class SizeCalculator
     {
         return (int)((float)currentAbsoluteSize * 100) / initAbsoluteSize;
     }
-}
+}

+ 3 - 6
src/PixiEditor/Helpers/StringExtensions.cs

@@ -1,12 +1,9 @@
-using System;
-using System.Linq;
+namespace PixiEditor.Helpers;
 
-namespace PixiEditor.Helpers;
-
-public static class StringExtensions
+internal static class StringExtensions
 {
     public static string Reverse(this string s)
     {
         return new string(s.Reverse<char>().ToArray());
     }
-}
+}

+ 4 - 7
src/PixiEditor/Helpers/SupportedFilesHelper.cs

@@ -1,13 +1,10 @@
-using PixiEditor.Models.Enums;
+using System.IO;
+using PixiEditor.Models.Enums;
 using PixiEditor.Models.IO;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
 
 namespace PixiEditor.Helpers;
 
-public class SupportedFilesHelper
+internal class SupportedFilesHelper
 {
     static Dictionary<FileType, FileTypeDialogData> fileTypeDialogsData;
     static List<FileTypeDialogData> allFileTypeDialogsData;
@@ -93,4 +90,4 @@ public class SupportedFilesHelper
         var filter = any + "|" + pixi + "|" + images;
         return filter;
     }
-}
+}

+ 2 - 4
src/PixiEditor/Helpers/UI/DocumentsTemplateSelector.cs

@@ -1,12 +1,10 @@
 using System.Windows;
 using System.Windows.Controls;
-using AvalonDock.Layout;
 using PixiEditor.Models.DataHolders;
-using PixiEditor.ViewModels;
 
 namespace PixiEditor.Helpers.UI;
 
-public class DocumentsTemplateSelector : DataTemplateSelector
+internal class DocumentsTemplateSelector : DataTemplateSelector
 {
     public DocumentsTemplateSelector()
     {
@@ -24,4 +22,4 @@ public class DocumentsTemplateSelector : DataTemplateSelector
 
         return base.SelectTemplate(item, container);
     }
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/UI/PanelsStyleSelector.cs

@@ -4,7 +4,7 @@ using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Helpers.UI;
 
-public class PanelsStyleSelector : StyleSelector
+internal class PanelsStyleSelector : StyleSelector
 {
     public Style DocumentTabStyle { get; set; }
 
@@ -16,4 +16,4 @@ public class PanelsStyleSelector : StyleSelector
         }
         return base.SelectStyle(item, container);
     }
-}
+}

+ 3 - 5
src/PixiEditor/Helpers/UI/ReversedOrderStackPanel.cs

@@ -1,11 +1,9 @@
-using System;
-using System.Linq;
-using System.Windows;
+using System.Windows;
 using System.Windows.Controls;
 
 namespace PixiEditor.Helpers.UI;
 
-public class ReversedOrderStackPanel : StackPanel
+internal class ReversedOrderStackPanel : StackPanel
 {
     protected override Size ArrangeOverride(Size arrangeSize)
     {
@@ -41,4 +39,4 @@ public class ReversedOrderStackPanel : StackPanel
 
         return arrangeSize;
     }
-}
+}

+ 2 - 2
src/PixiEditor/Helpers/UI/TreeViewItemHelper.cs

@@ -2,7 +2,7 @@
 
 namespace PixiEditor.Helpers.UI;
 
-public static class TreeViewItemHelper
+internal static class TreeViewItemHelper
 {
     public static GridLength GetIndent(DependencyObject obj)
     {
@@ -17,4 +17,4 @@ public static class TreeViewItemHelper
 
     public static readonly DependencyProperty IndentProperty =
         DependencyProperty.RegisterAttached("Indent", typeof(GridLength), typeof(TreeViewItemHelper), new PropertyMetadata(new GridLength(0)));
-}
+}

+ 3 - 4
src/PixiEditor/Helpers/VersionHelpers.cs

@@ -1,11 +1,10 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
 using System.Reflection;
 using System.Text;
 
 namespace PixiEditor.Helpers;
 
-public static class VersionHelpers
+internal static class VersionHelpers
 {
     public static Version GetCurrentAssemblyVersion() => Assembly.GetExecutingAssembly().GetName().Version;
 
@@ -44,4 +43,4 @@ public static class VersionHelpers
 
         builder.Append(" Debug Build");
     }
-}
+}

+ 2 - 3
src/PixiEditor/Models/Colors/ExColor.cs

@@ -1,9 +1,8 @@
 using SkiaSharp;
-using System;
 
 namespace PixiEditor.Models.Colors;
 
-public static class ExColor
+internal static class ExColor
 {
     /// <summary>
     ///     Creates color with corrected brightness.
@@ -151,4 +150,4 @@ public static class ExColor
 
         return v1;
     }
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Attributes/Commands/BasicAttribute.cs

@@ -1,8 +1,8 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
-    public class BasicAttribute : CommandAttribute
+    internal class BasicAttribute : CommandAttribute
     {
         /// <summary>
         /// Gets or sets the parameter that will be passed to the first argument of the method

+ 4 - 4
src/PixiEditor/Models/Commands/Attributes/Commands/CommandAttribute.cs

@@ -1,12 +1,12 @@
-using PixiEditor.Models.DataHolders;
-using System.Windows.Input;
+using System.Windows.Input;
+using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
     [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
-    public abstract class CommandAttribute : Attribute
+    internal abstract class CommandAttribute : Attribute
     {
         public string InternalName { get; }
 

+ 3 - 3
src/PixiEditor/Models/Commands/Attributes/Commands/DebugAttribute.cs

@@ -1,8 +1,8 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
-    public class DebugAttribute : BasicAttribute
+    internal class DebugAttribute : BasicAttribute
     {
         public DebugAttribute(string internalName, string displayName, string description) : base($"#DEBUG#{internalName}", displayName, description)
         {
@@ -13,4 +13,4 @@ public partial class Command
         {
         }
     }
-}
+}

+ 3 - 3
src/PixiEditor/Models/Commands/Attributes/Commands/GroupAttribute.cs

@@ -1,9 +1,9 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
     [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
-    public class GroupAttribute : Attribute
+    internal class GroupAttribute : Attribute
     {
         public string InternalName { get; }
 
@@ -18,4 +18,4 @@ public partial class Command
             DisplayName = displayName;
         }
     }
-}
+}

+ 3 - 3
src/PixiEditor/Models/Commands/Attributes/Commands/InternalAttribute.cs

@@ -1,11 +1,11 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
     /// <summary>
     /// A command that is not shown in the UI
     /// </summary>
-    public class InternalAttribute : BasicAttribute
+    internal class InternalAttribute : BasicAttribute
     {
         /// <summary>
         /// A command that is not shown in the UI
@@ -23,4 +23,4 @@ public partial class Command
         {
         }
     }
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Attributes/Commands/ToolAttribute.cs

@@ -2,10 +2,10 @@
 
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Command
+internal partial class Command
 {
     [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
-    public class ToolAttribute : CommandAttribute
+    internal class ToolAttribute : CommandAttribute
     {
         public Key Transient { get; set; }
 

+ 2 - 2
src/PixiEditor/Models/Commands/Attributes/Evaluators/CanExecuteAttribute.cs

@@ -1,9 +1,9 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Evaluator
+internal partial class Evaluator
 {
     [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
-    public class CanExecuteAttribute : EvaluatorAttribute
+    internal class CanExecuteAttribute : EvaluatorAttribute
     {
         public string[] NamesOfRequiredCanExecuteEvaluators { get; }
 

+ 2 - 2
src/PixiEditor/Models/Commands/Attributes/Evaluators/EvaluatorAttribute.cs

@@ -1,9 +1,9 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public static partial class Evaluator
+internal static partial class Evaluator
 {
     [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
-    public abstract class EvaluatorAttribute : Attribute
+    internal abstract class EvaluatorAttribute : Attribute
     {
         public string Name { get; }
 

+ 2 - 2
src/PixiEditor/Models/Commands/Attributes/Evaluators/IconAttribute.cs

@@ -1,9 +1,9 @@
 namespace PixiEditor.Models.Commands.Attributes;
 
-public partial class Evaluator
+internal partial class Evaluator
 {
     [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method, AllowMultiple = true)]
-    public class IconAttribute : EvaluatorAttribute
+    internal class IconAttribute : EvaluatorAttribute
     {
         public IconAttribute(string name)
             : base(name)

+ 5 - 6
src/PixiEditor/Models/Commands/CommandCollection.cs

@@ -1,13 +1,12 @@
-using PixiEditor.Models.DataHolders;
-using System.Collections;
+using System.Collections;
 using System.Diagnostics;
 using System.Windows.Input;
-using OneOf.Types;
+using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Models.Commands;
 
 [DebuggerDisplay("Count = {Count}")]
-public class CommandCollection : ICollection<Command>
+internal class CommandCollection : ICollection<Command>
 {
     private readonly Dictionary<string, Command> _commandInternalNames;
     private readonly OneToManyDictionary<KeyCombination, Command> _commandShortcuts;
@@ -73,11 +72,11 @@ public class CommandCollection : ICollection<Command>
         if (shortcut is { Key: Key.None, Modifiers: ModifierKeys.None })
             return;
         _commandShortcuts.AddRange(KeyCombination.None, _commandShortcuts[shortcut]);
-        _commandShortcuts.Clear(shortcut);      
+        _commandShortcuts.Clear(shortcut);
     }
 
     public IEnumerable<KeyValuePair<KeyCombination, IEnumerable<Command>>> GetShortcuts() =>
         _commandShortcuts;
 
     IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
-}
+}

+ 26 - 26
src/PixiEditor/Models/Commands/CommandController.cs

@@ -1,16 +1,16 @@
-using Microsoft.Extensions.DependencyInjection;
+using System.IO;
+using System.Reflection;
+using System.Windows.Media;
+using Microsoft.Extensions.DependencyInjection;
 using PixiEditor.Models.Commands.Attributes;
 using PixiEditor.Models.Commands.Evaluators;
 using PixiEditor.Models.DataHolders;
 using PixiEditor.Models.Tools;
-using System.IO;
-using System.Reflection;
-using System.Windows.Media;
 using CommandAttribute = PixiEditor.Models.Commands.Attributes.Command;
 
 namespace PixiEditor.Models.Commands;
 
-public class CommandController
+internal class CommandController
 {
     private readonly ShortcutFile shortcutFile;
 
@@ -107,26 +107,26 @@ public class CommandController
                 switch (attribute)
                 {
                     case Evaluator.CanExecuteAttribute canExecuteAttribute:
-                    {
-                        var getRequiredEvaluatorsObjectsOfCurrentEvaluator =
-                            (CommandController controller) =>
-                                canExecuteAttribute.NamesOfRequiredCanExecuteEvaluators.Select(x => controller.CanExecuteEvaluators[x]);
-
-                        AddEvaluatorFactory<Evaluator.CanExecuteAttribute, CanExecuteEvaluator, bool>(
-                            methodInfo,
-                            maybeServiceInstance,
-                            canExecuteAttribute,
-                            CanExecuteEvaluators,
-                            evaluateFunction => new CanExecuteEvaluator()
-                            {
-                                Name = attribute.Name,
-                                Evaluate = evaluateFunctionArgument =>
-                                    evaluateFunction.Invoke(evaluateFunctionArgument) &&
-                                    getRequiredEvaluatorsObjectsOfCurrentEvaluator.Invoke(this).All(requiredEvaluator =>
-                                        requiredEvaluator.CallEvaluate(null, evaluateFunctionArgument))
-                            });
-                        break;
-                    }
+                        {
+                            var getRequiredEvaluatorsObjectsOfCurrentEvaluator =
+                                (CommandController controller) =>
+                                    canExecuteAttribute.NamesOfRequiredCanExecuteEvaluators.Select(x => controller.CanExecuteEvaluators[x]);
+
+                            AddEvaluatorFactory<Evaluator.CanExecuteAttribute, CanExecuteEvaluator, bool>(
+                                methodInfo,
+                                maybeServiceInstance,
+                                canExecuteAttribute,
+                                CanExecuteEvaluators,
+                                evaluateFunction => new CanExecuteEvaluator()
+                                {
+                                    Name = attribute.Name,
+                                    Evaluate = evaluateFunctionArgument =>
+                                        evaluateFunction.Invoke(evaluateFunctionArgument) &&
+                                        getRequiredEvaluatorsObjectsOfCurrentEvaluator.Invoke(this).All(requiredEvaluator =>
+                                            requiredEvaluator.CallEvaluate(null, evaluateFunctionArgument))
+                                });
+                            break;
+                        }
                     case Evaluator.IconAttribute icon:
                         AddEvaluator<Evaluator.IconAttribute, IconEvaluator, ImageSource>(methodInfo, maybeServiceInstance, icon, IconEvaluators);
                         break;
@@ -354,4 +354,4 @@ public class CommandController
 
         shortcutFile.SaveShortcuts();
     }
-}
+}

+ 4 - 4
src/PixiEditor/Models/Commands/CommandGroup.cs

@@ -1,10 +1,10 @@
-using PixiEditor.Models.DataHolders;
-using System.Collections;
+using System.Collections;
 using System.Windows.Input;
+using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Models.Commands;
 
-public class CommandGroup : IEnumerable<Command>
+internal class CommandGroup : IEnumerable<Command>
 {
     private readonly Command[] commands;
     private readonly Command[] visibleCommands;
@@ -51,4 +51,4 @@ public class CommandGroup : IEnumerable<Command>
     public IEnumerator<Command> GetEnumerator() => Commands.GetEnumerator();
 
     IEnumerator IEnumerable.GetEnumerator() => Commands.GetEnumerator();
-}
+}

+ 1 - 1
src/PixiEditor/Models/Commands/CommandMethods.cs

@@ -2,7 +2,7 @@
 
 namespace PixiEditor.Models.Commands;
 
-public class CommandMethods
+internal class CommandMethods
 {
     private readonly Command _command;
     private readonly Action<object> _execute;

+ 3 - 3
src/PixiEditor/Models/Commands/Commands/BasicCommand.cs

@@ -2,9 +2,9 @@
 
 namespace PixiEditor.Models.Commands;
 
-public partial class Command
+internal partial class Command
 {
-    public class BasicCommand : Command
+    internal class BasicCommand : Command
     {
         public object Parameter { get; init; }
 
@@ -12,4 +12,4 @@ public partial class Command
 
         public BasicCommand(Action<object> onExecute, CanExecuteEvaluator canExecute) : base(onExecute, canExecute) { }
     }
-}
+}

+ 5 - 5
src/PixiEditor/Models/Commands/Commands/Command.cs

@@ -1,13 +1,13 @@
-using PixiEditor.Helpers;
+using System.Diagnostics;
+using System.Windows.Media;
+using PixiEditor.Helpers;
 using PixiEditor.Models.Commands.Evaluators;
 using PixiEditor.Models.DataHolders;
-using System.Diagnostics;
-using System.Windows.Media;
 
 namespace PixiEditor.Models.Commands;
 
 [DebuggerDisplay("{InternalName,nq} ('{DisplayName,nq}')")]
-public abstract partial class Command : NotifyableObject
+internal abstract partial class Command : NotifyableObject
 {
     private KeyCombination _shortcut;
 
@@ -53,4 +53,4 @@ public abstract partial class Command : NotifyableObject
     public ImageSource GetIcon() => IconEvaluator.CallEvaluate(this, GetParameter());
 
     public delegate void ShortcutChangedEventHandler(Command command, ShortcutChangedEventArgs args);
-}
+}

+ 5 - 5
src/PixiEditor/Models/Commands/Commands/ToolCommand.cs

@@ -1,11 +1,11 @@
-using PixiEditor.ViewModels;
-using System.Windows.Input;
+using System.Windows.Input;
+using PixiEditor.ViewModels;
 
 namespace PixiEditor.Models.Commands;
 
-public partial class Command
+internal partial class Command
 {
-    public class ToolCommand : Command
+    internal class ToolCommand : Command
     {
         public Type ToolType { get; init; }
 
@@ -15,4 +15,4 @@ public partial class Command
 
         public ToolCommand() : base(ViewModelMain.Current.ToolsSubViewModel.SetTool, CommandController.Current.CanExecuteEvaluators["PixiEditor.HasDocument"]) { }
     }
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Evaluators/CanExecuteEvaluator.cs

@@ -1,6 +1,6 @@
 namespace PixiEditor.Models.Commands.Evaluators;
 
-public class CanExecuteEvaluator : Evaluator<bool>
+internal class CanExecuteEvaluator : Evaluator<bool>
 {
     public static CanExecuteEvaluator AlwaysTrue { get; } = new StaticValueEvaluator(true);
 
@@ -17,4 +17,4 @@ public class CanExecuteEvaluator : Evaluator<bool>
 
         public override bool CallEvaluate(Command command, object parameter) => value;
     }
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Evaluators/Evaluator.cs

@@ -3,7 +3,7 @@
 namespace PixiEditor.Models.Commands.Evaluators;
 
 [DebuggerDisplay("{Name,nq}")]
-public abstract class Evaluator<T>
+internal abstract class Evaluator<T>
 {
     public string Name { get; init; }
 
@@ -13,4 +13,4 @@ public abstract class Evaluator<T>
     /// <param name="parameter">The parameter to pass to the Evaluate function</param>
     /// <returns>The value returned by the Evaluate function</returns>
     public virtual T CallEvaluate(Command command, object parameter) => Evaluate(parameter);
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Evaluators/IconEvaluator.cs

@@ -6,7 +6,7 @@ using System.Windows.Media.Imaging;
 
 namespace PixiEditor.Models.Commands.Evaluators;
 
-public class IconEvaluator : Evaluator<ImageSource>
+internal class IconEvaluator : Evaluator<ImageSource>
 {
     public static IconEvaluator Default { get; } = new CommandNameEvaluator();
 
@@ -74,4 +74,4 @@ public class IconEvaluator : Evaluator<ImageSource>
                 (string)entry.Key).ToArray();
         }
     }
-}
+}

+ 1 - 1
src/PixiEditor/Models/Commands/Exceptions/CommandNotFoundException.cs

@@ -1,7 +1,7 @@
 namespace PixiEditor.Models.Commands.Exceptions;
 
 [Serializable]
-public class CommandNotFoundException : Exception
+internal class CommandNotFoundException : Exception
 {
     public string CommandName { get; set; }
 

+ 3 - 2
src/PixiEditor/Models/Commands/Search/ColorSearchResult.cs

@@ -5,7 +5,7 @@ using SkiaSharp;
 
 namespace PixiEditor.Models.Commands.Search;
 
-public class ColorSearchResult : SearchResult
+internal class ColorSearchResult : SearchResult
 {
     private readonly DrawingImage icon;
     private readonly SKColor color;
@@ -17,7 +17,8 @@ public class ColorSearchResult : SearchResult
 
     public override string Description => $"{color} rgba({color.Red}, {color.Green}, {color.Blue}, {color.Alpha})";
 
-    public override bool CanExecute => !requiresDocument || (requiresDocument && ViewModelMain.Current.BitmapManager.ActiveDocument != null);
+    //public override bool CanExecute => !requiresDocument || (requiresDocument && ViewModelMain.Current.BitmapManager.ActiveDocument != null);
+    public override bool CanExecute => false;
 
     public override ImageSource Icon => icon;
 

+ 4 - 4
src/PixiEditor/Models/Commands/Search/CommandSearchResult.cs

@@ -1,9 +1,9 @@
-using PixiEditor.Models.DataHolders;
-using System.Windows.Media;
+using System.Windows.Media;
+using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Models.Commands.Search;
 
-public class CommandSearchResult : SearchResult
+internal class CommandSearchResult : SearchResult
 {
     public Command Command { get; }
 
@@ -18,4 +18,4 @@ public class CommandSearchResult : SearchResult
     public CommandSearchResult(Command command) => Command = command;
 
     public override void Execute() => Command.Execute();
-}
+}

+ 4 - 5
src/PixiEditor/Models/Commands/Search/FileSearchResult.cs

@@ -1,11 +1,10 @@
-using PixiEditor.Helpers.Converters;
-using System.IO;
-using System.Windows;
+using System.IO;
 using System.Windows.Media;
+using PixiEditor.Helpers.Converters;
 
 namespace PixiEditor.Models.Commands.Search;
 
-public class FileSearchResult : SearchResult
+internal class FileSearchResult : SearchResult
 {
     private readonly DrawingImage icon;
 
@@ -32,4 +31,4 @@ public class FileSearchResult : SearchResult
     {
         CommandController.Current.Commands["PixiEditor.File.OpenRecent"].Methods.Execute(FilePath);
     }
-}
+}

+ 5 - 5
src/PixiEditor/Models/Commands/Search/SearchResult.cs

@@ -1,12 +1,12 @@
-using PixiEditor.Helpers;
-using PixiEditor.Models.DataHolders;
-using System.Text.RegularExpressions;
+using System.Text.RegularExpressions;
 using System.Windows.Documents;
 using System.Windows.Media;
+using PixiEditor.Helpers;
+using PixiEditor.Models.DataHolders;
 
 namespace PixiEditor.Models.Commands.Search;
 
-public abstract class SearchResult : NotifyableObject
+internal abstract class SearchResult : NotifyableObject
 {
     private bool isSelected;
     private bool isMouseSelected;
@@ -71,4 +71,4 @@ public abstract class SearchResult : NotifyableObject
             }
         }
     }
-}
+}

+ 4 - 4
src/PixiEditor/Models/Commands/ShortcutChangedEventArgs.cs

@@ -2,15 +2,15 @@
 
 namespace PixiEditor.Models.Commands;
 
-public class ShortcutChangedEventArgs : EventArgs
+internal class ShortcutChangedEventArgs : EventArgs
 {
     public KeyCombination OldShortcut { get; }
-    
+
     public KeyCombination NewShortcut { get; }
-    
+
     public ShortcutChangedEventArgs(KeyCombination oldShortcut, KeyCombination newShortcut)
     {
         OldShortcut = oldShortcut;
         NewShortcut = newShortcut;
     }
-}
+}

+ 4 - 4
src/PixiEditor/Models/Commands/ShortcutFile.cs

@@ -1,10 +1,10 @@
-using Newtonsoft.Json;
+using System.IO;
+using Newtonsoft.Json;
 using PixiEditor.Models.DataHolders;
-using System.IO;
 
 namespace PixiEditor.Models.Commands;
 
-public class ShortcutFile
+internal class ShortcutFile
 {
     private readonly CommandController _commands;
 
@@ -41,4 +41,4 @@ public class ShortcutFile
 
     public static IEnumerable<KeyValuePair<KeyCombination, IEnumerable<string>>> LoadShortcuts(string path) =>
         JsonConvert.DeserializeObject<IEnumerable<KeyValuePair<KeyCombination, IEnumerable<string>>>>(File.ReadAllText(path));
-}
+}

+ 2 - 2
src/PixiEditor/Models/Commands/Templates/IShortcutDefaults.cs

@@ -1,6 +1,6 @@
 namespace PixiEditor.Models.Commands.Templates;
 
-public interface IShortcutDefaults
+internal interface IShortcutDefaults
 {
     ShortcutCollection DefaultShortcuts { get; }
-}
+}

+ 3 - 3
src/PixiEditor/Models/Commands/Templates/IShortcutFile.cs

@@ -1,8 +1,8 @@
 namespace PixiEditor.Models.Commands.Templates;
 
-public interface IShortcutFile
+internal interface IShortcutFile
 {
     string Filter { get; }
-    
+
     ShortcutCollection GetShortcuts(string path);
-}
+}

+ 3 - 3
src/PixiEditor/Models/Commands/Templates/IShortcutInstallation.cs

@@ -1,8 +1,8 @@
 namespace PixiEditor.Models.Commands.Templates;
 
-public interface IShortcutInstallation
+internal interface IShortcutInstallation
 {
     bool InstallationPresent { get; }
-    
+
     ShortcutCollection GetInstalledShortcuts();
-}
+}

Some files were not shown because too many files changed in this diff