Selaa lähdekoodia

Remove unused code, refactor, rename, clean-up

Ruben 2 vuotta sitten
vanhempi
sitoutus
08aa7af129
100 muutettua tiedostoa jossa 341 lisäystä ja 671 poistoa
  1. 85 0
      .editorconfig
  2. 2 1
      PicView/Animations/AnimationHelper.cs
  3. 5 39
      PicView/Animations/MouseOverAnimations.cs
  4. 2 2
      PicView/ChangeImage/Error_Handling.cs
  5. 21 13
      PicView/ChangeImage/FileHistory.cs
  6. 8 9
      PicView/ChangeImage/LoadPic.cs
  7. 4 4
      PicView/ChangeImage/Navigation.cs
  8. 3 2
      PicView/ChangeImage/Preloader.cs
  9. 4 4
      PicView/ChangeImage/UpdateImage.cs
  10. 5 5
      PicView/ChangeTitlebar/EditTitleBar.cs
  11. 2 3
      PicView/ConfigureSettings/ConfigColors.cs
  12. 0 1
      PicView/ConfigureSettings/UpdateUIValues.cs
  13. 1 0
      PicView/Editing/Crop/CropFunctions.cs
  14. 2 0
      PicView/Editing/Crop/CropService.cs
  15. 3 1
      PicView/Editing/Crop/State/Position.cs
  16. 0 1
      PicView/FileHandling/DeleteFiles.cs
  17. 0 2
      PicView/FileHandling/FileFunctions.cs
  18. 1 1
      PicView/FileHandling/OpenSave.cs
  19. 0 18
      PicView/GlobalSuppressions.cs
  20. 1 2
      PicView/ImageHandling/Base64.cs
  21. 1 0
      PicView/ImageHandling/GetImageData.cs
  22. 1 1
      PicView/ImageHandling/ImageSizeFunctions.cs
  23. 0 1
      PicView/PicGallery/GalleryClick.cs
  24. 0 1
      PicView/PicGallery/GalleryLoad.cs
  25. 1 0
      PicView/PicGallery/GalleryNavigation.cs
  26. 0 20
      PicView/PicView.csproj
  27. 3 3
      PicView/Shortcuts/MainKeyboardShortcuts.cs
  28. 1 2
      PicView/Shortcuts/MainMouseKeys.cs
  29. 1 0
      PicView/Shortcuts/QuickResizeShortcuts.cs
  30. 1 0
      PicView/SystemIntegration/LockScreenImage.cs
  31. 7 2
      PicView/SystemIntegration/MonitorSize.cs
  32. 0 1
      PicView/SystemIntegration/NativeMethods.cs
  33. 1 1
      PicView/SystemIntegration/Wallpaper.cs
  34. 4 2
      PicView/SystemIntegration/WindowBlur.cs
  35. 2 1
      PicView/Themes/Styles/Border.xaml
  36. 2 1
      PicView/Themes/Styles/ColorThemes/Dark.xaml
  37. 2 1
      PicView/Themes/Styles/ColorThemes/Light.xaml
  38. 2 1
      PicView/Themes/Styles/ComboBox.xaml
  39. 1 1
      PicView/Themes/Styles/Menu.xaml
  40. 2 1
      PicView/Themes/Styles/MyWindowStyle.xaml
  41. 2 1
      PicView/Themes/Styles/RadioButton.xaml
  42. 0 1
      PicView/Themes/Styles/ScrollBar.xaml
  43. 2 2
      PicView/Themes/Styles/Slider.xaml
  44. 0 1
      PicView/Translations/LoadLanguage.cs
  45. 1 1
      PicView/Translations/ko.xaml
  46. 1 2
      PicView/Translations/zh_TW.xaml
  47. 1 3
      PicView/UILogic/DragAndDrop/Image_DragAndDrop.cs
  48. 0 1
      PicView/UILogic/HideInterfaceLogic.cs
  49. 80 80
      PicView/UILogic/ImageInfo.cs
  50. 1 1
      PicView/UILogic/Loading/LoadControls.cs
  51. 0 1
      PicView/UILogic/Sizing/ScaleImage.cs
  52. 1 3
      PicView/UILogic/Timers.cs
  53. 1 0
      PicView/UILogic/TransformImage/Rotation.cs
  54. 1 1
      PicView/UILogic/TransformImage/Scroll.cs
  55. 3 0
      PicView/UILogic/TransformImage/Zoom.cs
  56. 2 1
      PicView/UILogic/UC.cs
  57. 2 5
      PicView/Views/ContextMenus/MainContextMenu.xaml
  58. 2 3
      PicView/Views/ContextMenus/NavigationContextMenu.xaml
  59. 2 3
      PicView/Views/ContextMenus/WindowContextMenu.xaml
  60. 1 2
      PicView/Views/UserControls/Buttons/CloseButton.xaml.cs
  61. 0 1
      PicView/Views/UserControls/Buttons/CopyButton.xaml.cs
  62. 1 2
      PicView/Views/UserControls/Buttons/FullscreenButton.xaml.cs
  63. 1 2
      PicView/Views/UserControls/Buttons/GalleryShortcut.xaml.cs
  64. 1 0
      PicView/Views/UserControls/Buttons/GoToPicButton.xaml.cs
  65. 2 6
      PicView/Views/UserControls/Buttons/GripButton.xaml.cs
  66. 0 23
      PicView/Views/UserControls/Buttons/ImageInfoButton.xaml
  67. 0 35
      PicView/Views/UserControls/Buttons/ImageInfoButton.xaml.cs
  68. 1 2
      PicView/Views/UserControls/Buttons/LefttButton.xaml.cs
  69. 1 2
      PicView/Views/UserControls/Buttons/LinkButton.xaml.cs
  70. 1 2
      PicView/Views/UserControls/Buttons/MenuCloseButton.xaml.cs
  71. 1 2
      PicView/Views/UserControls/Buttons/MinButton.xaml.cs
  72. 1 5
      PicView/Views/UserControls/Buttons/Minus.xaml.cs
  73. 0 39
      PicView/Views/UserControls/Buttons/OptimizeButton.xaml
  74. 0 43
      PicView/Views/UserControls/Buttons/OptimizeButton.xaml.cs
  75. 0 26
      PicView/Views/UserControls/Buttons/PasteButton.xaml
  76. 0 20
      PicView/Views/UserControls/Buttons/PasteButton.xaml.cs
  77. 0 53
      PicView/Views/UserControls/Buttons/ResizeButton.xaml
  78. 0 38
      PicView/Views/UserControls/Buttons/ResizeButton.xaml.cs
  79. 1 1
      PicView/Views/UserControls/Buttons/RestoreButton.xaml
  80. 2 3
      PicView/Views/UserControls/Buttons/RestoreButton.xaml.cs
  81. 1 2
      PicView/Views/UserControls/Buttons/RightButton.xaml.cs
  82. 3 6
      PicView/Views/UserControls/Buttons/StarOutlineButton.xaml.cs
  83. 2 5
      PicView/Views/UserControls/Buttons/X2.xaml.cs
  84. 1 1
      PicView/Views/UserControls/Gallery/PicGallery.xaml
  85. 0 1
      PicView/Views/UserControls/Gallery/PicGallery.xaml.cs
  86. 0 4
      PicView/Views/UserControls/Menus/FileMenu.xaml
  87. 0 4
      PicView/Views/UserControls/Menus/ImageSettings.xaml
  88. 0 2
      PicView/Views/UserControls/Menus/QuickSettingsMenu.xaml
  89. 0 1
      PicView/Views/UserControls/Menus/ToolsAndEffectsMenu.xaml
  90. 2 6
      PicView/Views/UserControls/Misc/AutoScrollSign.xaml.cs
  91. 2 6
      PicView/Views/UserControls/Misc/ColorPicker.xaml.cs
  92. 1 5
      PicView/Views/UserControls/Misc/CroppingTool.xaml.cs
  93. 3 14
      PicView/Views/UserControls/Misc/CustomTextBox.xaml.cs
  94. 1 5
      PicView/Views/UserControls/Misc/DragDropOverlay.xaml.cs
  95. 3 4
      PicView/Views/UserControls/Misc/DragDropOverlayPic.xaml.cs
  96. 2 7
      PicView/Views/UserControls/Misc/FolderIcon.xaml.cs
  97. 1 5
      PicView/Views/UserControls/Misc/Icon.xaml.cs
  98. 2 7
      PicView/Views/UserControls/Misc/LinkChain.xaml.cs
  99. 2 2
      PicView/Views/UserControls/Misc/LinkTextBox.xaml.cs
  100. 18 19
      PicView/Views/UserControls/Misc/QuickResize.xaml.cs

+ 85 - 0
.editorconfig

@@ -8,3 +8,88 @@ dotnet_analyzer_diagnostic.category-Style.severity = none
 
 # CS8602: Dereference of a possibly null reference.
 dotnet_diagnostic.CS8602.severity = silent
+csharp_using_directive_placement = outside_namespace:silent
+csharp_prefer_simple_using_statement = true:suggestion
+csharp_prefer_braces = true:silent
+csharp_style_namespace_declarations = block_scoped:silent
+csharp_style_prefer_method_group_conversion = true:silent
+csharp_style_prefer_top_level_statements = true:silent
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
+csharp_style_throw_expression = true:suggestion
+csharp_style_prefer_null_check_over_type_check = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_indent_labels = one_less_than_current
+
+[*.{cs,vb}]
+#### Naming styles ####
+
+# Naming rules
+
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
+
+dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
+
+dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
+dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
+
+# Symbol specifications
+
+dotnet_naming_symbols.interface.applicable_kinds = interface
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.interface.required_modifiers = 
+
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.types.required_modifiers = 
+
+dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
+dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
+dotnet_naming_symbols.non_field_members.required_modifiers = 
+
+# Naming styles
+
+dotnet_naming_style.begins_with_i.required_prefix = I
+dotnet_naming_style.begins_with_i.required_suffix = 
+dotnet_naming_style.begins_with_i.word_separator = 
+dotnet_naming_style.begins_with_i.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix = 
+dotnet_naming_style.pascal_case.required_suffix = 
+dotnet_naming_style.pascal_case.word_separator = 
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+
+dotnet_naming_style.pascal_case.required_prefix = 
+dotnet_naming_style.pascal_case.required_suffix = 
+dotnet_naming_style.pascal_case.word_separator = 
+dotnet_naming_style.pascal_case.capitalization = pascal_case
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_auto_properties = true:silent
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:silent
+dotnet_style_prefer_conditional_expression_over_return = true:silent
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_compound_assignment = true:suggestion
+dotnet_style_prefer_simplified_interpolation = true:suggestion
+dotnet_style_namespace_match_folder = true:suggestion
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
+tab_width = 4
+indent_size = 4
+end_of_line = crlf

+ 2 - 1
PicView/Animations/AnimationHelper.cs

@@ -56,6 +56,7 @@ internal static class AnimationHelper
     #endregion Fade
 
     #region Color Events
+
     internal static void MouseEnterBgTexColor(Brush brush)
     {
         ColorAnimation.From = Color.FromArgb(0, 0, 0, 0);
@@ -168,7 +169,7 @@ internal static class AnimationHelper
         };
     }
 
-    #endregion Color stuff
+    #endregion Color settings
 
     #region Size Animation
 

+ 5 - 39
PicView/Animations/MouseOverAnimations.cs

@@ -24,8 +24,8 @@ internal static class MouseOverAnimations
         {
             uIElement.MouseLeftButtonDown += delegate
             {
-                ButtonMouseOverAnim(iconBrush, false, true);
-                ButtonMouseOverAnim(backgroundBrush, false, true);
+                ButtonMouseOverAnim(iconBrush);
+                ButtonMouseOverAnim(backgroundBrush);
                 AnimationHelper.MouseEnterBgTexColor(backgroundBrush);
             };
 
@@ -97,7 +97,7 @@ internal static class MouseOverAnimations
 
     #region 1x
 
-    internal static void ButtonMouseOverAnim(Brush brush, bool transparent = false, bool alpha = false)
+    internal static void ButtonMouseOverAnim(Brush brush, bool transparent = false)
     {
         if (transparent)
         {
@@ -115,7 +115,7 @@ internal static class MouseOverAnimations
         }
     }
 
-    internal static void ButtonMouseLeaveAnim(Brush brush, bool transparent = false, bool alpha = false)
+    internal static void ButtonMouseLeaveAnim(Brush brush, bool transparent = false)
     {
         if (transparent)
         {
@@ -133,7 +133,7 @@ internal static class MouseOverAnimations
         }
     }
 
-    internal static void ButtonMouseLeaveAnimBgColor(Brush brush, bool alpha = false)
+    internal static void ButtonMouseLeaveAnimBgColor(Brush brush)
     {
         AnimationHelper.MouseLeaveColorEvent(
             BackgroundBorderColor.A,
@@ -145,38 +145,4 @@ internal static class MouseOverAnimations
     }
 
     #endregion 1x
-
-    #region 2x
-
-    // internal static void ButtonMouseOverAnim(Brush brush, Brush brush2, bool transparent = false, bool alpha = false)
-    // {
-    //     ButtonMouseOverAnim(brush, transparent, alpha);
-    //     ButtonMouseOverAnim(brush2, transparent, alpha);
-    // }
-    //
-    // internal static void ButtonMouseLeaveAnim(Brush brush, Brush brush2, bool transparent = false, bool alpha = false)
-    // {
-    //     ButtonMouseLeaveAnim(brush, transparent, alpha);
-    //     ButtonMouseLeaveAnim(brush2, transparent, alpha);
-    // }
-
-    #endregion 2x
-
-    #region 3x
-
-    internal static void ButtonMouseOverAnim(Brush brush, Brush brush2, Brush brush3, bool transparent = false, bool alpha = false)
-    {
-        ButtonMouseOverAnim(brush, transparent, alpha);
-        ButtonMouseOverAnim(brush2, transparent, alpha);
-        ButtonMouseOverAnim(brush3, transparent, alpha);
-    }
-
-    internal static void ButtonMouseLeaveAnim(Brush brush, Brush brush2, Brush brush3, bool transparent = false, bool alpha = false)
-    {
-        ButtonMouseLeaveAnim(brush, transparent, alpha);
-        ButtonMouseLeaveAnim(brush2, transparent, alpha);
-        ButtonMouseLeaveAnim(brush3, transparent, alpha);
-    }
-
-    #endregion 3x
 }

+ 2 - 2
PicView/ChangeImage/Error_Handling.cs

@@ -180,11 +180,11 @@ internal static class ErrorHandling
                 return ConfigureWindows.GetMainWindow?.Dispatcher.Invoke(() =>
                 {
                     var fileName = Path.GetFileName(ConfigureWindows.GetMainWindow.TitleText.Text);
-                    return fileName == (string) Application.Current.Resources["Loading"] ? InitialPath : fileName;
+                    return fileName == (string)Application.Current.Resources["Loading"] ? InitialPath : fileName;
                 });
             }
 
-            if (string.IsNullOrWhiteSpace(InitialPath) == false 
+            if (string.IsNullOrWhiteSpace(InitialPath) == false
                 && Settings.Default.IncludeSubDirectories
                 && Path.GetDirectoryName(InitialPath) != Path.GetDirectoryName(Pics[FolderIndex]))
             {

+ 21 - 13
PicView/ChangeImage/FileHistory.cs

@@ -1,7 +1,8 @@
-using System.Diagnostics;
-using PicView.ChangeTitlebar;
+using PicView.ChangeTitlebar;
 using PicView.FileHandling;
+using PicView.Properties;
 using PicView.UILogic;
+using System.Diagnostics;
 using System.Globalization;
 using System.IO;
 using System.Windows;
@@ -77,7 +78,6 @@ internal class FileHistory
         {
             Tooltip.ShowTooltipMessage(e.Message);
         }
-
     }
 
     internal async Task OpenLastFileAsync()
@@ -125,11 +125,14 @@ internal class FileHistory
         }
 
         var index = _fileHistory.IndexOf(Navigation.Pics[Navigation.FolderIndex]);
-        index++;
-
-        if (index >= MaxCount)
+        if (Settings.Default.Looping)
         {
-            return;
+            index = (index + 1 + _fileHistory.Count) % _fileHistory.Count;
+        }
+        else
+        {
+            index++;
+            if (index >= MaxCount) return;
         }
 
         if (_fileHistory[index] == Navigation.Pics[Navigation.FolderIndex])
@@ -149,9 +152,15 @@ internal class FileHistory
         }
 
         var index = _fileHistory.IndexOf(Navigation.Pics[Navigation.FolderIndex]);
-        index--;
-
-        if (index < 0) { return; }
+        if (Settings.Default.Looping)
+        {
+            index = (index - 1 + _fileHistory.Count) % _fileHistory.Count;
+        }
+        else
+        {
+            index--;
+            if (index < 0) { return; }
+        }
 
         if (_fileHistory[index] == Navigation.Pics[Navigation.FolderIndex])
         {
@@ -202,7 +211,7 @@ internal class FileHistory
 
         menuItem.Click += async (_, _) => await LoadPic.LoadPicFromStringAsync(menuItem.ToolTip.ToString()).ConfigureAwait(false);
         var ext = Path.GetExtension(filePath);
-        var ext5 = !string.IsNullOrWhiteSpace(ext) && ext.Length >= 5 ? ext.Substring(0, 5) : ext;
+        var ext5 = !string.IsNullOrWhiteSpace(ext) && ext.Length >= 5 ? ext[..5] : ext;
         menuItem.InputGestureText = ext5;
         return menuItem;
     }
@@ -213,7 +222,7 @@ internal class FileHistory
         {
             var cm = (MenuItem)ConfigureWindows.MainContextMenu.Items[6];
 
-            for (int i = 0; i < MaxCount; i++)
+            for (var i = 0; i < MaxCount; i++)
             {
                 if (_fileHistory.Count == i)
                 {
@@ -221,7 +230,6 @@ internal class FileHistory
                 }
 
                 var item = MenuItem(_fileHistory[i], i);
-                if (item is null) { break; }
                 if (cm.Items.Count <= i)
                 {
                     cm.Items.Add(item);

+ 8 - 9
PicView/ChangeImage/LoadPic.cs

@@ -76,7 +76,7 @@ internal static class LoadPic
         }
     }
 
-    #endregion
+    #endregion Load Pic from String
 
     #region Load Pic from File
 
@@ -141,13 +141,13 @@ internal static class LoadPic
 
         FolderIndex = Pics.IndexOf(fileInfo.FullName);
         await LoadPicAtIndexAsync(FolderIndex, fileInfo).ConfigureAwait(false);
-        if ( folderChanged && Settings.Default.FullscreenGallery)
+        if (folderChanged && Settings.Default.FullscreenGallery)
         {
             await GalleryLoad.ReloadGallery().ConfigureAwait(false);
         }
     }
 
-    #endregion
+    #endregion Load Pic from File
 
     #region Load Pic from Archive
 
@@ -179,7 +179,7 @@ internal static class LoadPic
         }).ConfigureAwait(false);
     }
 
-    #endregion
+    #endregion Load Pic from Archive
 
     #region Load Pic from Folder
 
@@ -254,9 +254,9 @@ internal static class LoadPic
         }
     }
 
-    #endregion
+    #endregion Load Pic from Folder
 
-    #region Load Pic at Index 
+    #region Load Pic at Index
 
     /// <summary>
     /// Loads the image at the specified index asynchronously and updates the UI.
@@ -312,7 +312,7 @@ internal static class LoadPic
         await UpdateImage.UpdateImageAsync(index, preLoadValue).ConfigureAwait(false);
     }
 
-    #endregion
+    #endregion Load Pic at Index
 
     #region Loading Preview
 
@@ -340,6 +340,5 @@ internal static class LoadPic
         });
     }
 
-
-    #endregion
+    #endregion Loading Preview
 }

+ 4 - 4
PicView/ChangeImage/Navigation.cs

@@ -3,9 +3,6 @@ using PicView.FileHandling;
 using PicView.PicGallery;
 using PicView.Properties;
 using PicView.UILogic;
-using PicView.Views.UserControls.Gallery;
-using System.Windows.Threading;
-using System;
 
 namespace PicView.ChangeImage;
 
@@ -101,14 +98,17 @@ internal static class Navigation
                     next = newIndex;
                 }
                 break;
+
             case NavigateTo.First:
                 if (Pics.Count > PreLoader.MaxCount) PreLoader.Clear();
                 next = 0;
                 break;
+
             case NavigateTo.Last:
                 if (Pics.Count > PreLoader.MaxCount) PreLoader.Clear();
                 next = Pics.Count - 1;
                 break;
+
             default: return;
         }
 
@@ -128,7 +128,7 @@ internal static class Navigation
     {
         SetTitle.SetLoadingString();
         var fileList = await Task.FromResult(FileLists.NextFileList(next)).ConfigureAwait(false);
-        if (fileList is null or {Count: <= 0})
+        if (fileList is null or { Count: <= 0 })
         {
             SetTitle.SetTitleString();
             return;

+ 3 - 2
PicView/ChangeImage/Preloader.cs

@@ -54,7 +54,7 @@ internal static class PreLoader
     private static readonly ConcurrentDictionary<int, PreLoadValue> PreLoadList = new();
 
     /// <summary>
-    /// Sets the number of iterations to load in front 
+    /// Sets the number of iterations to load in front
     /// </summary>
     private const int PositiveIterations = 8;
 
@@ -69,8 +69,10 @@ internal static class PreLoader
     internal const int MaxCount = PositiveIterations + NegativeIterations + 2;
 
 #if DEBUG
+
     // ReSharper disable once ConvertToConstant.Local
     private static readonly bool ShowAddRemove = false;
+
 #endif
 
     /// <summary>
@@ -165,7 +167,6 @@ internal static class PreLoader
                 Trace.WriteLine($"{Pics[key]} removed at {Pics.IndexOf(Pics[key])}");
 #endif
         }
-
         catch (Exception e)
         {
 #if DEBUG

+ 4 - 4
PicView/ChangeImage/UpdateImage.cs

@@ -32,10 +32,10 @@ internal static class UpdateImage
     {
         preLoadValue.BitmapSource ??= ImageFunctions.ImageErrorMessage();
         var isGif = preLoadValue.FileInfo.Extension.Equals(".gif", StringComparison.OrdinalIgnoreCase);
-        
+
         await ConfigureWindows.GetMainWindow.Dispatcher.InvokeAsync(() =>
         {
-            if (isGif) // Loads gif from XamlAnimatedGif if necessary   
+            if (isGif) // Loads gif from XamlAnimatedGif if necessary
             {
                 AnimationBehavior.SetSourceUri(ConfigureWindows.GetMainWindow.MainImage, new Uri(Pics?[index]));
             }
@@ -44,7 +44,7 @@ internal static class UpdateImage
                 ConfigureWindows.GetMainWindow.MainImage.Source = preLoadValue.BitmapSource;
             }
 
-            if (GetSpinWaiter is {IsVisible: true})
+            if (GetSpinWaiter is { IsVisible: true })
             {
                 GetSpinWaiter.Visibility = Visibility.Collapsed;
             }
@@ -52,7 +52,7 @@ internal static class UpdateImage
 
         var titleString = TitleString(preLoadValue.BitmapSource.PixelWidth, preLoadValue.BitmapSource.PixelHeight,
             index, preLoadValue.FileInfo);
-        
+
         await ConfigureWindows.GetMainWindow.Dispatcher.InvokeAsync(() =>
         {
             FitImage(preLoadValue.BitmapSource.PixelWidth, preLoadValue.BitmapSource.PixelHeight);

+ 5 - 5
PicView/ChangeTitlebar/EditTitleBar.cs

@@ -12,7 +12,7 @@ namespace PicView.ChangeTitlebar;
 
 internal static class EditTitleBar
 {
-    private static string? backupTitle;
+    private static string? _backupTitle;
 
     internal static void Bar_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
     {
@@ -65,7 +65,7 @@ internal static class EditTitleBar
 
         e.Handled = true;
 
-        backupTitle = ConfigureWindows.GetMainWindow.TitleText.Text;
+        _backupTitle = ConfigureWindows.GetMainWindow.TitleText.Text;
         ConfigureWindows.GetMainWindow.TitleText.Text = Pics[FolderIndex];
     }
 
@@ -111,8 +111,8 @@ internal static class EditTitleBar
         Keyboard.ClearFocus();
         ConfigureWindows.GetMainWindow.Focus();
 
-        if (!backup || backupTitle == null) return;
-        ConfigureWindows.GetMainWindow.TitleText.Text = backupTitle;
-        backupTitle = string.Empty;
+        if (!backup || _backupTitle == null) return;
+        ConfigureWindows.GetMainWindow.TitleText.Text = _backupTitle;
+        _backupTitle = string.Empty;
     }
 }

+ 2 - 3
PicView/ConfigureSettings/ConfigColors.cs

@@ -25,7 +25,6 @@ internal static class ConfigColors
     /// </summary>
     internal static Color MainColor { get; set; }
 
-
     internal static void UpdateColor()
     {
         var getColor = AnimationHelper.GetPreferredColor();
@@ -186,7 +185,7 @@ internal static class ConfigColors
     #region Change Theme
 
     /// <summary>
-    /// changes the UI theme of the application to a light or dark theme. 
+    /// changes the UI theme of the application to a light or dark theme.
     /// It updates the resource dictionary of the application with the specified theme.
     /// </summary>
     /// <param name="useDarkTheme"></param>
@@ -227,7 +226,7 @@ internal static class ConfigColors
     }
 
     /// <summary>
-    /// Changes the color theme of the application. 
+    /// Changes the color theme of the application.
     /// It takes a ColorOption value and updates the ColorTheme setting of the application to the corresponding value.
     /// The method then calls the UpdateColor method, which updates the application's color scheme to match the new theme.
     /// </summary>

+ 0 - 1
PicView/ConfigureSettings/UpdateUIValues.cs

@@ -215,7 +215,6 @@ internal static class UpdateUIValues
             mainFlipButtonPath.Data = menuFlipButtonPath.Data =
                 Geometry.Parse("M448,192l-128,96v-64H128v128h248c4.4,0,8,3.6,8,8v48c0,4.4-3.6,8-8,8H72c-4.4,0-8-3.6-8-8V168c0-4.4,3.6-8,8-8h248V96 L448, 192z");
         }
-
         else
         {
             mainFlipButtonPath.Data = menuFlipButtonPath.Data =

+ 1 - 0
PicView/Editing/Crop/CropFunctions.cs

@@ -180,6 +180,7 @@ internal static class CropFunctions
                 width = Convert.ToInt32(cropArea.CroppedRectAbsolute.Width / AspectRatio);
                 height = Convert.ToInt32(cropArea.CroppedRectAbsolute.Height / AspectRatio);
                 break;
+
             default:
                 width = Convert.ToInt32(cropArea.CroppedRectAbsolute.Height / AspectRatio);
                 height = Convert.ToInt32(cropArea.CroppedRectAbsolute.Width / AspectRatio);

+ 2 - 0
PicView/Editing/Crop/CropService.cs

@@ -126,9 +126,11 @@ public class CropService
             case TouchPoint.OutsideRectangle when cropTool.Width >= 1 && cropTool.Height >= 1:
                 // Don't deselect when clicking outside rect
                 return;
+
             case TouchPoint.OutsideRectangle:
                 currentToolState = createState;
                 break;
+
             case TouchPoint.InsideRectangle:
                 currentToolState = dragState;
                 break;

+ 3 - 1
PicView/Editing/Crop/State/Position.cs

@@ -18,6 +18,7 @@ internal readonly struct Position : IEquatable<Position>
     }
 
     #region IEquatable<T>
+
     public override bool Equals(object? obj) => obj != null && obj is Position size && Equals(size);
 
     public static bool operator ==(Position e1, Position e2)
@@ -39,5 +40,6 @@ internal readonly struct Position : IEquatable<Position>
     {
         throw new NotImplementedException();
     }
-    #endregion
+
+    #endregion IEquatable<T>
 }

+ 0 - 1
PicView/FileHandling/DeleteFiles.cs

@@ -104,7 +104,6 @@ internal static class DeleteFiles
         PreLoader.Clear();
         Pics.Remove(Pics[FolderIndex]);
 
-
         if (Pics.Count <= 0)
         {
             ErrorHandling.UnexpectedError();

+ 0 - 2
PicView/FileHandling/FileFunctions.cs

@@ -197,8 +197,6 @@ internal static partial class FileFunctions
     }
 
     [GeneratedRegex("\\b(?:https?://|www\\.)\\S+\\b", RegexOptions.IgnoreCase | RegexOptions.Compiled, "en-US")]
-    // ReSharper disable once IdentifierTypo
-    // ReSharper disable once InconsistentNaming
     private static partial Regex URLregex();
 
     /// <summary>

+ 1 - 1
PicView/FileHandling/OpenSave.cs

@@ -156,7 +156,7 @@ internal static class OpenSave
         string fileName;
         var randomized = false;
         SaveFileDialog? saveDialog = null;
-        
+
         if (Pics?.Count > FolderIndex)
         {
             fileName = showFileDialog ? Path.GetFileName(Pics[FolderIndex]) : Pics[FolderIndex];

+ 0 - 18
PicView/GlobalSuppressions.cs

@@ -1,18 +0,0 @@
-// This file is used by Code Analysis to maintain SuppressMessage
-// attributes that are applied to this project.
-// Project-level suppressions either have no target or are given
-// a specific target and scoped to a namespace, type, member, etc.
-
-using System.Diagnostics.CodeAnalysis;
-
-[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.MainWindow.Pic(System.String)")]
-[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.MainWindow.Pic(System.Int32)")]
-[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.MainWindow.PicWeb(System.String)")]
-[assembly: SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.MainWindow.AutoScrollTimerEvent(System.Object,System.Timers.ElapsedEventArgs)")]
-[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.LoadFromWeb.PicWeb(System.String)")]
-[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.Open_Save.OpenWith(System.String)")]
-[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.FileFunctions.RenameFile(System.String,System.String)~System.Boolean")]
-[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.ImageDecoder.TrySaveImage(System.Int32,System.Boolean,System.String,System.String)~System.Boolean")]
-[assembly: SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.NativeMethods.WndProc(System.IntPtr,System.Int32,System.IntPtr,System.IntPtr,System.Boolean@)~System.IntPtr")]
-[assembly: SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.Utilities.UpdateColor(System.Boolean)")]
-[assembly: SuppressMessage("Globalization", "CA1305:Specify IFormatProvider", Justification = "<Pending>", Scope = "member", Target = "~M:PicView.FileFunctions.MakeValidFileName(System.String)~System.String")]

+ 1 - 2
PicView/ImageHandling/Base64.cs

@@ -3,7 +3,6 @@ using PicView.UILogic;
 using System.IO;
 using System.Windows;
 using System.Windows.Media.Imaging;
-using System.Windows.Threading;
 
 namespace PicView.ImageHandling;
 
@@ -118,4 +117,4 @@ internal static class Base64
         Clipboard.SetText(base64String);
         Tooltip.ShowTooltipMessage(Application.Current.Resources["ConvertedToBase64"]);
     }
-}
+}

+ 1 - 0
PicView/ImageHandling/GetImageData.cs

@@ -356,6 +356,7 @@ internal static class GetImageData
                 case 1:
                     authorsValue = authorsArray[0];
                     break;
+
                 case >= 2:
                     {
                         var sb = new StringBuilder();

+ 1 - 1
PicView/ImageHandling/ImageSizeFunctions.cs

@@ -163,4 +163,4 @@ internal static class ImageSizeFunctions
 
         return true;
     }
-}
+}

+ 0 - 1
PicView/PicGallery/GalleryClick.cs

@@ -137,7 +137,6 @@ internal static class GalleryClick
         }, DispatcherPriority.Send);
     }
 
-
     private static async Task ItemClickAsync(int id)
     {
         await ConfigureWindows.GetMainWindow.Dispatcher.InvokeAsync(() =>

+ 0 - 1
PicView/PicGallery/GalleryLoad.cs

@@ -181,7 +181,6 @@ internal static class GalleryLoad
         IsLoading = false;
     }
 
-
     internal static async Task ReloadGallery()
     {
         if (Settings.Default.FullscreenGallery)

+ 1 - 0
PicView/PicGallery/GalleryNavigation.cs

@@ -179,6 +179,7 @@ internal static class GalleryNavigation
             case Direction.Right:
                 SelectedGalleryItem += VerticalItems;
                 break;
+
             default:
                 throw new ArgumentOutOfRangeException(nameof(direction), direction, null);
         }

+ 0 - 20
PicView/PicView.csproj

@@ -203,9 +203,6 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Settings.settings</DependentUpon>
     </Compile>
-    <Compile Update="Views\UserControls\Buttons\ImageInfoButton.xaml.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Update="Views\UserControls\Buttons\LinkButton.xaml.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -215,15 +212,9 @@
     <Compile Update="Views\UserControls\Buttons\LefttButton.xaml.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Update="Views\UserControls\Buttons\ResizeButton.xaml.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Update="Views\UserControls\Buttons\RightButton.xaml.cs">
       <SubType>Code</SubType>
     </Compile>
-    <Compile Update="Views\UserControls\Buttons\PasteButton.xaml.cs">
-      <SubType>Code</SubType>
-    </Compile>
     <Compile Update="Views\UserControls\Buttons\MenuCloseButton.xaml.cs">
       <SubType>Code</SubType>
     </Compile>
@@ -286,10 +277,6 @@
     <Page Update="Translations\pl.xaml">
       <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
     </Page>
-    <Page Update="Views\UserControls\Buttons\ImageInfoButton.xaml">
-      <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Update="Views\UserControls\Buttons\LinkButton.xaml">
       <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
       <SubType>Designer</SubType>
@@ -300,16 +287,9 @@
     <Page Update="Views\UserControls\Buttons\LefttButton.xaml">
       <SubType>Designer</SubType>
     </Page>
-    <Page Update="Views\UserControls\Buttons\ResizeButton.xaml">
-      <XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
-      <SubType>Designer</SubType>
-    </Page>
     <Page Update="Views\UserControls\Buttons\RightButton.xaml">
       <SubType>Designer</SubType>
     </Page>
-    <Page Update="Views\UserControls\Buttons\PasteButton.xaml">
-      <SubType>Designer</SubType>
-    </Page>
     <Page Update="Views\UserControls\Buttons\MenuCloseButton.xaml">
       <SubType>Designer</SubType>
     </Page>

+ 3 - 3
PicView/Shortcuts/MainKeyboardShortcuts.cs

@@ -204,7 +204,7 @@ internal static class MainKeyboardShortcuts
                     {
                         await SaveFilesAsync(Settings.Default.ShowFileSavingDialog).ConfigureAwait(false);
                     }
-                    
+
                     return; // Fix saving file
                 }
 
@@ -265,11 +265,11 @@ internal static class MainKeyboardShortcuts
                     {
                         ColorPicking.StopRunning(false);
                     }
-                    else if (GetEffectsWindow is {IsVisible: true})
+                    else if (GetEffectsWindow is { IsVisible: true })
                     {
                         GetEffectsWindow.Hide();
                     }
-                    else if (GetImageInfoWindow is {IsVisible: true})
+                    else if (GetImageInfoWindow is { IsVisible: true })
                     {
                         GetImageInfoWindow.Hide();
                     }

+ 1 - 2
PicView/Shortcuts/MainMouseKeys.cs

@@ -105,6 +105,7 @@ internal static class MainMouseKeys
             case MouseButton.XButton2:
                 await GetFileHistory.NextAsync().ConfigureAwait(false);
                 break;
+
             default: break;
         }
     }
@@ -185,12 +186,10 @@ internal static class MainMouseKeys
             await GetMainWindow.Dispatcher.BeginInvoke(DispatcherPriority.Normal, () =>
                 GalleryNavigation.ScrollTo(direction, false, (Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift));
         }
-
         else if (ShouldHandleScroll())
         {
             await GetMainWindow.Dispatcher.BeginInvoke(DispatcherPriority.Normal, () => HandleScroll(direction));
         }
-
         else
         {
             await HandleNavigateOrZoomAsync(direction, e).ConfigureAwait(false);

+ 1 - 0
PicView/Shortcuts/QuickResizeShortcuts.cs

@@ -58,6 +58,7 @@ internal static partial class QuickResizeShortcuts
 
                 e.Handled = true;// only allowed on ctrl
                 return;
+
             case Key.Escape: // Escape logic
                 UC.GetQuickResize.Hide();
                 e.Handled = true;

+ 1 - 0
PicView/SystemIntegration/LockScreenImage.cs

@@ -48,6 +48,7 @@ public static class LockScreenHelper
                 case ".gif":
                 case ".bmp":
                     break;
+
                 default:
                     shouldSaveImage = true;
                     break;

+ 7 - 2
PicView/SystemIntegration/MonitorSize.cs

@@ -15,24 +15,29 @@ internal readonly struct MonitorSize : IEquatable<MonitorSize>
     /// Gets the pixel width of the current monitor's working area.
     /// </summary>
     internal double Width { get; }
+
     /// <summary>
     /// Gets the pixel height of the current monitor's working area.
     /// </summary>
     internal double Height { get; }
+
     /// <summary>
     /// Gets the DPI scaling factor of the current monitor.
     /// </summary>
     internal double DpiScaling { get; }
+
     /// <summary>
     /// Gets the available working area of the current monitor.
     /// </summary>
     internal Rect WorkArea { get; }
 
     #region IEquatable<T>
+
     public bool Equals(MonitorSize other)
     {
         throw new NotImplementedException();
     }
+
     public override bool Equals(object? obj) => obj != null && obj is MonitorSize size && Equals(size);
 
     public static bool operator ==(MonitorSize e1, MonitorSize e2)
@@ -49,7 +54,8 @@ internal readonly struct MonitorSize : IEquatable<MonitorSize>
     {
         throw new NotImplementedException();
     }
-    #endregion
+
+    #endregion IEquatable<T>
 
     /// <summary>
     /// Initializes a new instance of the <see cref="MonitorSize"/> struct with the specified monitor information.
@@ -96,6 +102,5 @@ internal readonly struct MonitorSize : IEquatable<MonitorSize>
 
         // Return a new instance of the MonitorSize struct
         return new MonitorSize(monitorWidth, monitorHeight, dpiScaling, workArea.Value);
-
     }
 }

+ 0 - 1
PicView/SystemIntegration/NativeMethods.cs

@@ -140,5 +140,4 @@ internal static partial class NativeMethods
     }
 
     #endregion GetPixelColor
-
 }

+ 1 - 1
PicView/SystemIntegration/Wallpaper.cs

@@ -5,7 +5,6 @@ using PicView.FileHandling;
 using PicView.ImageHandling;
 using PicView.UILogic;
 using System.ComponentModel;
-using System.Globalization;
 using System.IO;
 using System.Windows;
 using System.Windows.Input;
@@ -58,6 +57,7 @@ public static class Wallpaper // Taken from a Microsoft sample...
                 case ".gif":
                 case ".bmp":
                     break;
+
                 default:
                     shouldSaveImage = true;
                     break;

+ 4 - 2
PicView/SystemIntegration/WindowBlur.cs

@@ -16,6 +16,7 @@ internal static partial class WindowBlur
     }
 
     #region IEquatable<T>
+
     private struct AccentPolicy : IEquatable<AccentPolicy>
     {
         public AccentState AccentState;
@@ -72,7 +73,9 @@ internal static partial class WindowBlur
             throw new NotImplementedException();
         }
     }
-    #endregion
+
+    #endregion IEquatable<T>
+
     private enum WindowCompositionAttribute
     {
         AccentPolicy = 19
@@ -108,5 +111,4 @@ internal static partial class WindowBlur
             throw new Exception("Failed to enable blur on window.");
         }
     }
-
 }

+ 2 - 1
PicView/Themes/Styles/Border.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <Style x:Key="ButtonBorder" TargetType="Border">
         <Setter Property="Height" Value="40" />

+ 2 - 1
PicView/Themes/Styles/ColorThemes/Dark.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <!--  Chosen Color  -->
     <Color x:Key="ChosenColor">#FFDB5B3D</Color>

+ 2 - 1
PicView/Themes/Styles/ColorThemes/Light.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <!--  Chosen Color  -->
     <Color x:Key="ChosenColor">#F236BBFF</Color>

+ 2 - 1
PicView/Themes/Styles/ComboBox.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
         <Grid>

+ 1 - 1
PicView/Themes/Styles/Menu.xaml

@@ -1,7 +1,7 @@
 <ResourceDictionary
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     mc:Ignorable="d">
 

+ 2 - 1
PicView/Themes/Styles/MyWindowStyle.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Style x:Key="MyWindowStyle" TargetType="Window">
         <Setter Property="UseLayoutRounding" Value="True" />
         <Setter Property="Template">

+ 2 - 1
PicView/Themes/Styles/RadioButton.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <Style TargetType="{x:Type RadioButton}">
         <Setter Property="Margin" Value="0" />

+ 0 - 1
PicView/Themes/Styles/ScrollBar.xaml

@@ -218,7 +218,6 @@
         </Border>
     </ControlTemplate>
 
-
     <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
         <Track
             Name="PART_Track"

+ 2 - 2
PicView/Themes/Styles/Slider.xaml

@@ -1,5 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">
         <Setter Property="SnapsToDevicePixels" Value="true" />

+ 0 - 1
PicView/Translations/LoadLanguage.cs

@@ -53,7 +53,6 @@ internal static class LoadLanguage
         }
     }
 
-
     internal static void ChangeLanguage(int language)
     {
         var choice = (Languages)language;

+ 1 - 1
PicView/Translations/ko.xaml

@@ -399,4 +399,4 @@
     <system:String x:Key="Cancel">취소</system:String>
 
     <system:String x:Key="None">없음</system:String>
-</ResourceDictionary>
+</ResourceDictionary>

+ 1 - 2
PicView/Translations/zh_TW.xaml

@@ -399,5 +399,4 @@
     <system:String x:Key="Cancel">取消</system:String>
 
     <system:String x:Key="None">沒有任何</system:String>
-
-</ResourceDictionary>
+</ResourceDictionary>

+ 1 - 3
PicView/UILogic/DragAndDrop/Image_DragAndDrop.cs

@@ -5,11 +5,9 @@ using PicView.PicGallery;
 using PicView.ProcessHandling;
 using PicView.Properties;
 using PicView.Views.UserControls.Misc;
-using SkiaSharp;
 using System.IO;
 using System.Text;
 using System.Windows;
-using System.Windows.Media.Imaging;
 using System.Windows.Threading;
 using static PicView.ChangeImage.Navigation;
 using static PicView.ImageHandling.Thumbnails;
@@ -133,7 +131,7 @@ internal static class ImageDragAndDrop
         if (e.Data.GetData(DataFormats.FileDrop, true) is not string[] files)
         {
             var memoryStream = (MemoryStream)e.Data.GetData("text/x-moz-url");
-            
+
             // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
             if (memoryStream is not null)
             {

+ 0 - 1
PicView/UILogic/HideInterfaceLogic.cs

@@ -102,7 +102,6 @@ internal static class HideInterfaceLogic
             {
                 UC.GetClickArrowLeft.Visibility =
                     UC.GetClickArrowRight.Visibility = Visibility.Visible;
-
             }
 
             UC.GetX2.Visibility =

+ 80 - 80
PicView/UILogic/ImageInfo.cs

@@ -110,9 +110,9 @@ internal static class ImageInfo
                 if (ConfigureWindows.GetImageInfoWindow.ExifParent.Children.Count > 0)
                 {
                     // 0 == GPS
-                    var latitudeBox = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[1];
+                    var latitudeBox = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[1];
                     latitudeBox.SetValues(data[15], data[16], true);
-                    var longitudeBox = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[2];
+                    var longitudeBox = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[2];
                     longitudeBox.SetValues(data[17], data[18], true);
 
                     var linkX = (LinkTextBox)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[3];
@@ -120,178 +120,178 @@ internal static class ImageInfo
                     var linkY = (LinkTextBox)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[4];
                     linkY.SetURL(data[20], "Google");
 
-                    var latitude = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[5];
+                    var latitude = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[5];
                     latitude.SetValues(data[21], data[22], true);
 
                     // 6 == Origin
-                    var title = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[7];
+                    var title = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[7];
                     title.SetValues(data[23], data[24], true);
-                    var dateTakenBox = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[8];
+                    var dateTakenBox = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[8];
                     dateTakenBox.SetValues(data[25], data[26], true);
 
-                    var authorBox = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[9];
+                    var authorBox = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[9];
                     authorBox.SetValues(data[27], data[28], true);
-                    var subject = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[10];
+                    var subject = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[10];
                     subject.SetValues(data[29], data[30], true);
 
-                    var program = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[11];
+                    var program = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[11];
                     program.SetValues(data[31], data[32], true);
-                    var copyright = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[12];
+                    var copyright = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[12];
                     copyright.SetValues(data[33], data[34], true);
 
                     // 13 == Image
-                    var resolutionUnit = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[14];
+                    var resolutionUnit = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[14];
                     resolutionUnit.SetValues(data[35], data[36], true);
-                    var colorRepresentation = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[15];
+                    var colorRepresentation = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[15];
                     colorRepresentation.SetValues(data[37], data[38], true);
 
-                    var compression = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[16];
+                    var compression = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[16];
                     compression.SetValues(data[39], data[40], true);
-                    var compressionBits = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[17];
+                    var compressionBits = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[17];
                     compressionBits.SetValues(data[41], data[42], true);
 
                     // 18 == Camera
-                    var cameraMaker = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[19];
+                    var cameraMaker = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[19];
                     cameraMaker.SetValues(data[43], data[44], true);
-                    var cameraModel = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[20];
+                    var cameraModel = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[20];
                     cameraModel.SetValues(data[45], data[46], true);
 
-                    var fstop = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[21];
+                    var fstop = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[21];
                     fstop.SetValues(data[47], data[48], true);
-                    var exposure = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[22];
+                    var exposure = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[22];
                     exposure.SetValues(data[49], data[50], true);
 
-                    var isoSpeed = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[23];
+                    var isoSpeed = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[23];
                     isoSpeed.SetValues(data[51], data[52], true);
-                    var exposureBias = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[24];
+                    var exposureBias = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[24];
                     exposureBias.SetValues(data[53], data[54], true);
 
-                    var maxAperture = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[25];
+                    var maxAperture = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[25];
                     maxAperture.SetValues(data[55], data[56], true);
 
-                    var focal = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[26];
+                    var focal = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[26];
                     focal.SetValues(data[57], data[58], true);
-                    var flength35 = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[27];
+                    var flength35 = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[27];
                     flength35.SetValues(data[59], data[60], true);
 
-                    var flashMode = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[28];
+                    var flashMode = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[28];
                     flashMode.SetValues(data[61], data[62], true);
-                    var flashEnergy = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[29];
+                    var flashEnergy = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[29];
                     flashEnergy.SetValues(data[63], data[64], true);
 
-                    var meteringMode = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[30];
+                    var meteringMode = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[30];
                     meteringMode.SetValues(data[65], data[66], true);
 
                     // 31 == Film
-                    var lensmaker = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[32];
+                    var lensmaker = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[32];
                     lensmaker.SetValues(data[67], data[68], true);
-                    var lensmodel = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[33];
+                    var lensmodel = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[33];
                     lensmodel.SetValues(data[69], data[70], true);
 
-                    var flashManufacturer = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[34];
+                    var flashManufacturer = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[34];
                     flashManufacturer.SetValues(data[71], data[72], true);
-                    var flashModel = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[35];
+                    var flashModel = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[35];
                     flashModel.SetValues(data[73], data[74], true);
 
-                    var camSerialNumber = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[36];
+                    var camSerialNumber = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[36];
                     camSerialNumber.SetValues(data[75], data[76], true);
 
-                    var contrast = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[37];
+                    var contrast = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[37];
                     contrast.SetValues(data[77], data[78], true);
-                    var brightness = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[38];
+                    var brightness = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[38];
                     brightness.SetValues(data[79], data[80], true);
 
-                    var lightSource = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[39];
+                    var lightSource = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[39];
                     lightSource.SetValues(data[81], data[82], true);
 
-                    var exposureProgram = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[40];
+                    var exposureProgram = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[40];
                     exposureProgram.SetValues(data[83], data[84], true);
 
-                    var saturation = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[41];
+                    var saturation = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[41];
                     saturation.SetValues(data[85], data[86], true);
-                    var sharpness = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[42];
+                    var sharpness = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[42];
                     sharpness.SetValues(data[87], data[88], true);
 
-                    var whiteBalance = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[43];
+                    var whiteBalance = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[43];
                     whiteBalance.SetValues(data[89], data[90], true);
-                    var photometricInterpolation = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[44];
+                    var photometricInterpolation = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[44];
                     photometricInterpolation.SetValues(data[91], data[92], true);
 
-                    var digitalZoom = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[45];
+                    var digitalZoom = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[45];
                     digitalZoom.SetValues(data[93], data[94], true);
 
-                    var exifversion = (TextboxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[46];
+                    var exifversion = (TextBoxInfo)ConfigureWindows.GetImageInfoWindow.ExifParent.Children[46];
                     exifversion.SetValues(data[95], data[96], true);
                 }
                 else
                 {
-                    var latitudeBox = new TextboxInfo(data[15], data[16], true);
-                    var longitudeBox = new TextboxInfo(data[17], data[18], true);
+                    var latitudeBox = new TextBoxInfo(data[15], data[16], true);
+                    var longitudeBox = new TextBoxInfo(data[17], data[18], true);
 
                     var linkX = new LinkTextBox(data[19], "Bing");
                     var linkY = new LinkTextBox(data[20], "Google");
 
-                    var altitude = new TextboxInfo(data[21], data[22], true);
+                    var altitude = new TextBoxInfo(data[21], data[22], true);
 
-                    var title = new TextboxInfo(data[23], data[24], true);
-                    var subject = new TextboxInfo(data[25], data[26], true);
+                    var title = new TextBoxInfo(data[23], data[24], true);
+                    var subject = new TextBoxInfo(data[25], data[26], true);
 
-                    var authorBox = new TextboxInfo(data[27], data[28], true);
-                    var dateTakenBox = new TextboxInfo(data[29], data[30], true);
+                    var authorBox = new TextBoxInfo(data[27], data[28], true);
+                    var dateTakenBox = new TextBoxInfo(data[29], data[30], true);
 
-                    var program = new TextboxInfo(data[31], data[32], true);
-                    var copyright = new TextboxInfo(data[33], data[34], true);
+                    var program = new TextBoxInfo(data[31], data[32], true);
+                    var copyright = new TextBoxInfo(data[33], data[34], true);
 
-                    var resolutionUnit = new TextboxInfo(data[35], data[36], true);
-                    var colorRepresentation = new TextboxInfo(data[37], data[38], true);
+                    var resolutionUnit = new TextBoxInfo(data[35], data[36], true);
+                    var colorRepresentation = new TextBoxInfo(data[37], data[38], true);
 
-                    var compression = new TextboxInfo(data[39], data[40], true);
-                    var compressionBits = new TextboxInfo(data[41], data[42], true);
+                    var compression = new TextBoxInfo(data[39], data[40], true);
+                    var compressionBits = new TextBoxInfo(data[41], data[42], true);
 
-                    var cameraMaker = new TextboxInfo(data[43], data[44], true);
-                    var cameraModel = new TextboxInfo(data[45], data[46], true);
+                    var cameraMaker = new TextBoxInfo(data[43], data[44], true);
+                    var cameraModel = new TextBoxInfo(data[45], data[46], true);
 
-                    var fstop = new TextboxInfo(data[47], data[48], true);
-                    var exposure = new TextboxInfo(data[49], data[50], true);
+                    var fstop = new TextBoxInfo(data[47], data[48], true);
+                    var exposure = new TextBoxInfo(data[49], data[50], true);
 
-                    var isoSpeed = new TextboxInfo(data[51], data[52], true);
-                    var exposureBias = new TextboxInfo(data[53], data[54], true);
+                    var isoSpeed = new TextBoxInfo(data[51], data[52], true);
+                    var exposureBias = new TextBoxInfo(data[53], data[54], true);
 
-                    var maxAperture = new TextboxInfo(data[55], data[56], true);
+                    var maxAperture = new TextBoxInfo(data[55], data[56], true);
 
-                    var focal = new TextboxInfo(data[57], data[58], true);
-                    var flength35 = new TextboxInfo(data[59], data[60], true);
+                    var focal = new TextBoxInfo(data[57], data[58], true);
+                    var flength35 = new TextBoxInfo(data[59], data[60], true);
 
-                    var flashMode = new TextboxInfo(data[61], data[62], true);
-                    var flashEnergy = new TextboxInfo(data[63], data[64], true);
+                    var flashMode = new TextBoxInfo(data[61], data[62], true);
+                    var flashEnergy = new TextBoxInfo(data[63], data[64], true);
 
-                    var metering = new TextboxInfo(data[65], data[66], true);
+                    var metering = new TextBoxInfo(data[65], data[66], true);
 
-                    var lensmaker = new TextboxInfo(data[67], data[68], true);
-                    var lensmodel = new TextboxInfo(data[69], data[70], true);
+                    var lensmaker = new TextBoxInfo(data[67], data[68], true);
+                    var lensmodel = new TextBoxInfo(data[69], data[70], true);
 
-                    var flashManufacturer = new TextboxInfo(data[71], data[72], true);
-                    var flashModel = new TextboxInfo(data[73], data[74], true);
+                    var flashManufacturer = new TextBoxInfo(data[71], data[72], true);
+                    var flashModel = new TextBoxInfo(data[73], data[74], true);
 
-                    var camSerialNumber = new TextboxInfo(data[75], data[76], true);
+                    var camSerialNumber = new TextBoxInfo(data[75], data[76], true);
 
-                    var contrast = new TextboxInfo(data[77], data[78], true);
-                    var brightness = new TextboxInfo(data[79], data[80], true);
+                    var contrast = new TextBoxInfo(data[77], data[78], true);
+                    var brightness = new TextBoxInfo(data[79], data[80], true);
 
-                    var lightSource = new TextboxInfo(data[81], data[82], true);
+                    var lightSource = new TextBoxInfo(data[81], data[82], true);
 
-                    var exposureProgram = new TextboxInfo(data[83], data[84], true);
+                    var exposureProgram = new TextBoxInfo(data[83], data[84], true);
 
-                    var saturation = new TextboxInfo(data[85], data[86], true);
-                    var sharpness = new TextboxInfo(data[87], data[88], true);
+                    var saturation = new TextBoxInfo(data[85], data[86], true);
+                    var sharpness = new TextBoxInfo(data[87], data[88], true);
 
-                    var whiteBalance = new TextboxInfo(data[89], data[90], true);
+                    var whiteBalance = new TextBoxInfo(data[89], data[90], true);
 
-                    var photometricInterpolation = new TextboxInfo(data[91], data[92], true);
+                    var photometricInterpolation = new TextBoxInfo(data[91], data[92], true);
 
-                    var digitalZoom = new TextboxInfo(data[93], data[94], true);
+                    var digitalZoom = new TextBoxInfo(data[93], data[94], true);
 
-                    var exifversion = new TextboxInfo(data[95], data[96], true);
+                    var exifversion = new TextBoxInfo(data[95], data[96], true);
 
                     var gps = (StackPanel)ConfigureWindows.GetImageInfoWindow.Resources["GPS"];
                     ConfigureWindows.GetImageInfoWindow.ExifParent.Children.Add(gps);

+ 1 - 1
PicView/UILogic/Loading/LoadControls.cs

@@ -95,7 +95,7 @@ internal static class LoadControls
     /// </summary>
     internal static void LoadRestoreButton()
     {
-        GetRestoreButton = new Restorebutton
+        GetRestoreButton = new RestoreButton
         {
             Focusable = false,
             VerticalAlignment = VerticalAlignment.Top,

+ 0 - 1
PicView/UILogic/Sizing/ScaleImage.cs

@@ -1,5 +1,4 @@
 using PicView.ChangeImage;
-using PicView.PicGallery;
 using PicView.Properties;
 using PicView.UILogic.TransformImage;
 using System.Windows;

+ 1 - 3
PicView/UILogic/Timers.cs

@@ -1,6 +1,4 @@
-using PicView.PicGallery;
-using System.Windows.Threading;
-using static PicView.Animations.FadeControls;
+using static PicView.Animations.FadeControls;
 using static PicView.UILogic.TransformImage.Scroll;
 using Timer = System.Timers.Timer;
 

+ 1 - 0
PicView/UILogic/TransformImage/Rotation.cs

@@ -61,6 +61,7 @@ internal static class Rotation
             }
         }
     }
+
     /// <summary>
     /// Rotates the image by 90 degrees.
     /// </summary>

+ 1 - 1
PicView/UILogic/TransformImage/Scroll.cs

@@ -1,11 +1,11 @@
 using PicView.ChangeImage;
 using PicView.Properties;
+using PicView.UILogic.Loading;
 using System.Timers;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
 using System.Windows.Threading;
-using PicView.UILogic.Loading;
 using static PicView.UILogic.Sizing.ScaleImage;
 using static PicView.UILogic.Tooltip;
 using static PicView.UILogic.UC;

+ 3 - 0
PicView/UILogic/TransformImage/Zoom.cs

@@ -257,12 +257,15 @@ internal static class ZoomLogic
             // Increase speed based on the current zoom level
             case > 14 when isZoomIn:
                 return;
+
             case > 4:
                 zoomSpeed += 1.5;
                 break;
+
             case > 3.2:
                 zoomSpeed += 1;
                 break;
+
             case > 1.6:
                 zoomSpeed += 0.5;
                 break;

+ 2 - 1
PicView/UILogic/UC.cs

@@ -15,6 +15,7 @@ internal static class UC
 {
     // ReSharper disable once InconsistentNaming
     internal static StartUpUC? GetStartUpUC { get; private set; }
+
     internal static ImageSettings? GetImageSettingsMenu { get; set; }
     internal static FileMenu? GetFileMenu { get; set; }
     internal static QuickSettingsMenu? GetQuickSettingsMenu { get; set; }
@@ -25,7 +26,7 @@ internal static class UC
     internal static ClickArrow? GetClickArrowRight { get; set; }
     internal static X2? GetX2 { get; set; }
     internal static Minus? GetMinus { get; set; }
-    internal static Restorebutton? GetRestoreButton { get; set; }
+    internal static RestoreButton? GetRestoreButton { get; set; }
     internal static Views.UserControls.Gallery.PicGallery? GetPicGallery { get; set; }
     internal static GalleryShortcut? GetGalleryShortcut { get; set; }
     internal static CroppingTool? GetCroppingTool { get; set; }

+ 2 - 5
PicView/Views/ContextMenus/MainContextMenu.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <DrawingImage x:Key="sort_amount_up_solidDrawingImage">
         <DrawingImage.Drawing>
@@ -34,7 +35,6 @@
                     Fill="{StaticResource IconColorBrush}"
                     Stretch="Fill" />
             </MenuItem.Icon>
-
         </MenuItem>
 
         <!--  Save  -->
@@ -312,11 +312,8 @@
                         Stretch="Fill" />
                 </MenuItem.Icon>
             </MenuItem>
-
         </MenuItem>
 
-
-
         <!--  Show in folder  -->
         <MenuItem
             Foreground="{StaticResource MainColorBrush}"

+ 2 - 3
PicView/Views/ContextMenus/NavigationContextMenu.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <ContextMenu x:Key="navCM">
 
@@ -15,7 +16,6 @@
             </MenuItem.Icon>
         </MenuItem>
 
-
         <!--  Prev  -->
         <MenuItem
             Foreground="{StaticResource MainColorBrush}"
@@ -184,6 +184,5 @@
                 </Image>
             </MenuItem.Icon>
         </MenuItem>
-
     </ContextMenu>
 </ResourceDictionary>

+ 2 - 3
PicView/Views/ContextMenus/WindowContextMenu.xaml

@@ -1,4 +1,5 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
     <ContextMenu x:Key="windowCM">
 
@@ -19,7 +20,6 @@
             </MenuItem.Icon>
         </MenuItem>
 
-
         <!--  Minimize  -->
         <MenuItem Foreground="{StaticResource MainColorBrush}" Header="{StaticResource Minimize}">
             <MenuItem.Icon>
@@ -29,7 +29,6 @@
             </MenuItem.Icon>
         </MenuItem>
 
-
         <!--  Close  -->
         <MenuItem
             Foreground="{StaticResource MainColorBrush}"

+ 1 - 2
PicView/Views/UserControls/Buttons/CloseButton.xaml.cs

@@ -1,12 +1,11 @@
 using PicView.Animations;
 using PicView.Properties;
 using System.Windows;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class CloseButton : UserControl
+public partial class CloseButton
 {
     public CloseButton()
     {

+ 0 - 1
PicView/Views/UserControls/Buttons/CopyButton.xaml.cs

@@ -23,7 +23,6 @@ public partial class CopyButton : UserControl
                 TheButton.MouseLeave += (s, x) => ButtonMouseLeaveAnimBgColor(ButtonBrush);
                 AnimationHelper.LightThemeMouseEvent(this, IconBrush);
             }
-
         };
     }
 }

+ 1 - 2
PicView/Views/UserControls/Buttons/FullscreenButton.xaml.cs

@@ -2,12 +2,11 @@
 using PicView.Properties;
 using PicView.UILogic.Sizing;
 using System.Windows;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class FullscreenButton : UserControl
+public partial class FullscreenButton
 {
     public FullscreenButton()
     {

+ 1 - 2
PicView/Views/UserControls/Buttons/GalleryShortcut.xaml.cs

@@ -1,13 +1,12 @@
 using PicView.Animations;
 using PicView.PicGallery;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Buttons;
 
 /// <summary>
 /// Cool shady close button!
 /// </summary>
-public partial class GalleryShortcut : UserControl
+public partial class GalleryShortcut
 {
     public GalleryShortcut()
     {

+ 1 - 0
PicView/Views/UserControls/Buttons/GoToPicButton.xaml.cs

@@ -98,6 +98,7 @@ public partial class GoToPicButton : UserControl
 
                 e.Handled = true;// only allowed on ctrl
                 return;
+
             case Key.Escape: // Escape logic
                 GoToPicBox.Text = FolderIndex.ToString(CultureInfo.CurrentCulture);
                 ClearGoTo();

+ 2 - 6
PicView/Views/UserControls/Buttons/GripButton.xaml.cs

@@ -1,11 +1,7 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Buttons;
 
-namespace PicView.Views.UserControls.Buttons;
 
-/// <summary>
-/// Interaction logic for CropButton.xaml
-/// </summary>
-public partial class GripButton : UserControl
+public partial class GripButton
 {
     public GripButton()
     {

+ 0 - 23
PicView/Views/UserControls/Buttons/ImageInfoButton.xaml

@@ -1,23 +0,0 @@
-<UserControl
-    x:Class="PicView.Views.UserControls.Buttons.ImageInfoButton"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <Button
-        x:Name="TheButton"
-        Height="51"
-        BorderThickness="0"
-        ToolTip="{StaticResource ShowInfoWindow}">
-        <Button.Background>
-            <SolidColorBrush x:Name="TheButtonBrush" Color="Transparent" />
-        </Button.Background>
-        <Path
-            Width="20"
-            Height="20"
-            Data="M48 32C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48H48zm0 32h106c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H38c-3.3 0-6-2.7-6-6V80c0-8.8 7.2-16 16-16zm426 96H38c-3.3 0-6-2.7-6-6v-36c0-3.3 2.7-6 6-6h138l30.2-45.3c1.1-1.7 3-2.7 5-2.7H464c8.8 0 16 7.2 16 16v74c0 3.3-2.7 6-6 6zM256 424c-66.2 0-120-53.8-120-120s53.8-120 120-120 120 53.8 120 120-53.8 120-120 120zm0-208c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm-48 104c-8.8 0-16-7.2-16-16 0-35.3 28.7-64 64-64 8.8 0 16 7.2 16 16s-7.2 16-16 16c-17.6 0-32 14.4-32 32 0 8.8-7.2 16-16 16z"
-            Stretch="Fill">
-            <Path.Fill>
-                <SolidColorBrush x:Name="IconBrush" Color="{StaticResource IconColor}" />
-            </Path.Fill>
-        </Path>
-    </Button>
-</UserControl>

+ 0 - 35
PicView/Views/UserControls/Buttons/ImageInfoButton.xaml.cs

@@ -1,35 +0,0 @@
-using PicView.Animations;
-using PicView.UILogic;
-using System.Windows.Controls;
-using static PicView.Animations.MouseOverAnimations;
-
-namespace PicView.Views.UserControls.Buttons;
-
-public partial class ImageInfoButton : UserControl
-{
-    public ImageInfoButton()
-    {
-        InitializeComponent();
-
-        Loaded += delegate
-        {
-            TheButton.MouseEnter += delegate
-            {
-                ButtonMouseOverAnim(IconBrush);
-                AnimationHelper.MouseEnterBgTexColor(TheButtonBrush);
-            };
-
-            TheButton.MouseLeave += delegate
-            {
-                ButtonMouseLeaveAnim(IconBrush);
-                AnimationHelper.MouseLeaveBgTexColor(TheButtonBrush);
-            };
-
-            TheButton.Click += (_, _) =>
-            {
-                UC.Close_UserControls();
-                ConfigureWindows.ImageInfoWindow();
-            };
-        };
-    }
-}

+ 1 - 2
PicView/Views/UserControls/Buttons/LefttButton.xaml.cs

@@ -1,11 +1,10 @@
 using PicView.Animations;
 using PicView.ChangeImage;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class LeftButton : UserControl
+public partial class LeftButton
 {
     public LeftButton()
     {

+ 1 - 2
PicView/Views/UserControls/Buttons/LinkButton.xaml.cs

@@ -1,11 +1,10 @@
 using PicView.Animations;
 using PicView.Properties;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class LinkButton : UserControl
+public partial class LinkButton
 {
     public LinkButton()
     {

+ 1 - 2
PicView/Views/UserControls/Buttons/MenuCloseButton.xaml.cs

@@ -1,13 +1,12 @@
 using PicView.Animations;
 using PicView.Properties;
 using PicView.UILogic;
-using System.Windows.Controls;
 using System.Windows.Input;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class MenuCloseButton : UserControl
+public partial class MenuCloseButton
 {
     public MenuCloseButton()
     {

+ 1 - 2
PicView/Views/UserControls/Buttons/MinButton.xaml.cs

@@ -1,12 +1,11 @@
 using PicView.Animations;
 using PicView.Properties;
 using System.Windows;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class MinButton : UserControl
+public partial class MinButton
 {
     public MinButton()
     {

+ 1 - 5
PicView/Views/UserControls/Buttons/Minus.xaml.cs

@@ -1,14 +1,10 @@
 using PicView.Animations;
 using PicView.UILogic;
 using System.Windows;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Buttons;
 
-/// <summary>
-/// Cool shady close button!
-/// </summary>
-public partial class Minus : UserControl
+public partial class Minus
 {
     public Minus()
     {

+ 0 - 39
PicView/Views/UserControls/Buttons/OptimizeButton.xaml

@@ -1,39 +0,0 @@
-<UserControl x:Class="PicView.Views.UserControls.Buttons.OptimizeButton"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             ToolTip="{StaticResource OptimizeImage}">
-    <UserControl.Resources>
-        <SolidColorBrush x:Key="IconBrush" x:Name="IconBrush" Color="{StaticResource IconColor}" />
-    </UserControl.Resources>
-    <Button
-        x:Name="TheButton"
-        Width="51"
-        Height="51"
-        BorderThickness="0">
-        <Button.Background>
-            <SolidColorBrush x:Name="ButtonBrush" Color="{StaticResource BackgroundColorAlt}" />
-        </Button.Background>
-        <Image
-            Width="20"
-            Height="20">
-            <Image.Source>
-                <DrawingImage>
-                    <DrawingImage.Drawing>
-                        <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
-                            <GeometryDrawing Geometry="F1 M512,512z M0,0z M448,256C448,150 362,64 256,64 150,64 64,150 64,256 64,362 150,448 256,448 362,448 448,362 448,256z">
-                                <GeometryDrawing.Pen>
-                                    <Pen Brush="{StaticResource IconBrush}" Thickness="32" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="1" />
-                                </GeometryDrawing.Pen>
-                            </GeometryDrawing>
-                            <GeometryDrawing Geometry="F1 M512,512z M0,0z M360,94.59L360,296 M443.13,212.87L296,360 M417.41,360L216,360 M299.13,443.13L155.13,299.13 M152,416L152,216 M68.87,299.13L212.87,155.13 M94.59,152L288,152 M212.87,68.87L360,216">
-                                <GeometryDrawing.Pen>
-                                    <Pen Brush="{StaticResource IconBrush}" Thickness="32" StartLineCap="Round" EndLineCap="Round" LineJoin="Round" MiterLimit="1" />
-                                </GeometryDrawing.Pen>
-                            </GeometryDrawing>
-                        </DrawingGroup>
-                    </DrawingImage.Drawing>
-                </DrawingImage>
-            </Image.Source>
-        </Image>
-    </Button>
-</UserControl>

+ 0 - 43
PicView/Views/UserControls/Buttons/OptimizeButton.xaml.cs

@@ -1,43 +0,0 @@
-using PicView.Animations;
-using PicView.ImageHandling;
-using System.Windows.Controls;
-using System.Windows.Media;
-using static PicView.Animations.MouseOverAnimations;
-
-namespace PicView.Views.UserControls.Buttons;
-
-/// <summary>
-/// Interaction logic for OptimizeButton.xaml
-/// </summary>
-public partial class OptimizeButton : UserControl
-{
-    public OptimizeButton()
-    {
-        InitializeComponent();
-
-        Loaded += delegate
-        {
-            var IconBrush = (SolidColorBrush)Resources["IconBrush"];
-            TheButton.PreviewMouseLeftButtonDown += delegate
-            {
-                ButtonMouseOverAnim(IconBrush, false, true);
-                ButtonMouseOverAnim(ButtonBrush, false, true);
-                AnimationHelper.MouseEnterBgTexColor(ButtonBrush);
-            };
-
-            TheButton.MouseEnter += delegate
-            {
-                ButtonMouseOverAnim(IconBrush);
-                AnimationHelper.MouseEnterBgTexColor(ButtonBrush);
-            };
-
-            TheButton.MouseLeave += delegate
-            {
-                ButtonMouseLeaveAnim(IconBrush);
-                AnimationHelper.MouseLeaveBgTexColor(ButtonBrush);
-            };
-
-            TheButton.Click += async (_, _) => await ImageFunctions.OptimizeImageAsyncWithErrorChecking().ConfigureAwait(false);
-        };
-    }
-}

+ 0 - 26
PicView/Views/UserControls/Buttons/PasteButton.xaml

@@ -1,26 +0,0 @@
-<UserControl
-    x:Class="PicView.Views.UserControls.Buttons.PasteButton"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    ToolTip="{StaticResource PasteImageFromClipholder}">
-    <Button
-        x:Name="TheButton"
-        Width="51"
-        Height="51"
-        Margin="0"
-        BorderThickness="0"
-        FontWeight="Bold">
-        <Button.Background>
-            <SolidColorBrush x:Name="ButtonBrush" Color="{StaticResource FadeColor}" />
-        </Button.Background>
-        <Path
-            Width="16"
-            Height="16"
-            Data="M768 1664h896v-640h-416q-40 0-68-28t-28-68v-416h-384v1152zm256-1440v-64q0-13-9.5-22.5t-22.5-9.5h-704q-13 0-22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h704q13 0 22.5-9.5t9.5-22.5zm256 672h299l-299-299v299zm512 128v672q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-544q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h1088q40 0 68 28t28 68v328q21 13 36 28l408 408q28 28 48 76t20 88z"
-            Stretch="Fill">
-            <Path.Fill>
-                <SolidColorBrush x:Name="IconBrush" Color="{StaticResource IconColor}" />
-            </Path.Fill>
-        </Path>
-    </Button>
-</UserControl>

+ 0 - 20
PicView/Views/UserControls/Buttons/PasteButton.xaml.cs

@@ -1,20 +0,0 @@
-using PicView.FileHandling;
-using System.Windows.Controls;
-using static PicView.Animations.MouseOverAnimations;
-
-namespace PicView.Views.UserControls.Buttons;
-
-public partial class PasteButton : UserControl
-{
-    public PasteButton()
-    {
-        InitializeComponent();
-
-        Loaded += delegate
-        {
-            SetButtonIconMouseOverAnimations(TheButton, ButtonBrush, IconBrush);
-
-            TheButton.Click += async delegate { await CopyPaste.PasteAsync().ConfigureAwait(false); };
-        };
-    }
-}

+ 0 - 53
PicView/Views/UserControls/Buttons/ResizeButton.xaml

@@ -1,53 +0,0 @@
-<UserControl
-    x:Class="PicView.Views.UserControls.Buttons.ResizeButton"
-    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-    ToolTip="{StaticResource ResizeImage}">
-    <UserControl.Resources>
-        <SolidColorBrush
-            x:Key="IconBrush"
-            x:Name="IconBrush"
-            Color="{StaticResource IconColor}" />
-    </UserControl.Resources>
-    <Button
-        x:Name="TheButton"
-        Width="51"
-        Height="51">
-        <Button.Background>
-            <SolidColorBrush x:Name="ButtonBrush" Color="Transparent" />
-        </Button.Background>
-
-        <Canvas Width="51" Height="51">
-            <Image
-                Canvas.Left="10"
-                Canvas.Top="15"
-                Height="20">
-                <Image.Source>
-                    <DrawingImage>
-                        <DrawingImage.Drawing>
-                            <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
-                                <GeometryDrawing Brush="{StaticResource IconBrush}" Geometry="F1 M512,512z M0,0z M464,448L48,448C21.49,448,0,426.51,0,400L0,112C0,85.49,21.49,64,48,64L464,64C490.51,64,512,85.49,512,112L512,400C512,426.51,490.51,448,464,448z M112,120C81.072,120 56,145.072 56,176 56,206.928 81.072,232 112,232 142.928,232 168,206.928 168,176 168,145.072 142.928,120 112,120z M64,384L448,384 448,272 360.485,184.485C355.799,179.799,348.201,179.799,343.514,184.485L208,320 152.485,264.485C147.799,259.799,140.201,259.799,135.514,264.485L64,336 64,384z" />
-                            </DrawingGroup>
-                        </DrawingImage.Drawing>
-                    </DrawingImage>
-                </Image.Source>
-            </Image>
-
-            <Image
-                Canvas.Left="29"
-                Canvas.Top="19"
-                Height="12"
-                Opacity=".8">
-                <Image.Source>
-                    <DrawingImage>
-                        <DrawingImage.Drawing>
-                            <DrawingGroup ClipGeometry="M0,0 V512 H512 V0 H0 Z">
-                                <GeometryDrawing Brush="{StaticResource IconBrush}" Geometry="F1 M512,512z M0,0z M464,448L48,448C21.49,448,0,426.51,0,400L0,112C0,85.49,21.49,64,48,64L464,64C490.51,64,512,85.49,512,112L512,400C512,426.51,490.51,448,464,448z M112,120C81.072,120 56,145.072 56,176 56,206.928 81.072,232 112,232 142.928,232 168,206.928 168,176 168,145.072 142.928,120 112,120z M64,384L448,384 448,272 360.485,184.485C355.799,179.799,348.201,179.799,343.514,184.485L208,320 152.485,264.485C147.799,259.799,140.201,259.799,135.514,264.485L64,336 64,384z" />
-                            </DrawingGroup>
-                        </DrawingImage.Drawing>
-                    </DrawingImage>
-                </Image.Source>
-            </Image>
-        </Canvas>
-    </Button>
-</UserControl>

+ 0 - 38
PicView/Views/UserControls/Buttons/ResizeButton.xaml.cs

@@ -1,38 +0,0 @@
-using System.Windows.Controls;
-
-namespace PicView.Views.UserControls.Buttons;
-
-public partial class ResizeButton : UserControl
-{
-    public ResizeButton()
-    {
-        InitializeComponent();
-
-        //Loaded += delegate
-        //{
-        //    var IconBrush = (SolidColorBrush)Resources["IconBrush"];
-        //    TheButton.PreviewMouseLeftButtonDown += delegate
-        //    {
-        //        ButtonMouseOverAnim(IconBrush, false, true);
-        //        ButtonMouseOverAnim(ButtonBrush, false, true);
-        //        AnimationHelper.MouseEnterBgTexColor(ButtonBrush);
-        //    };
-
-        //    TheButton.MouseEnter += delegate
-        //    {
-        //        ButtonMouseOverAnim(IconBrush);
-        //        AnimationHelper.MouseEnterBgTexColor(ButtonBrush);
-        //    };
-
-        //    TheButton.MouseLeave += delegate
-        //    {
-        //        ButtonMouseLeaveAnim(IconBrush);
-        //        AnimationHelper.MouseLeaveBgTexColor(ButtonBrush);
-        //    };
-
-        //    TheButton.Click += (_, _) => UpdateUIValues.ToggleQuickResize();
-        //};
-    }
-
-
-}

+ 1 - 1
PicView/Views/UserControls/Buttons/RestoreButton.xaml

@@ -1,5 +1,5 @@
 <UserControl
-    x:Class="PicView.Views.UserControls.Buttons.Restorebutton"
+    x:Class="PicView.Views.UserControls.Buttons.RestoreButton"
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
     <Border BorderThickness="1,0,0,1">

+ 2 - 3
PicView/Views/UserControls/Buttons/RestoreButton.xaml.cs

@@ -2,16 +2,15 @@
 using PicView.Properties;
 using PicView.UILogic.Sizing;
 using System.Windows;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Buttons;
 
 /// <summary>
 /// Cool shady close button!
 /// </summary>
-public partial class Restorebutton : UserControl
+public partial class RestoreButton
 {
-    public Restorebutton()
+    public RestoreButton()
     {
         InitializeComponent();
 

+ 1 - 2
PicView/Views/UserControls/Buttons/RightButton.xaml.cs

@@ -1,11 +1,10 @@
 using PicView.Animations;
 using PicView.ChangeImage;
-using System.Windows.Controls;
 using static PicView.Animations.MouseOverAnimations;
 
 namespace PicView.Views.UserControls.Buttons;
 
-public partial class RightButton : UserControl
+public partial class RightButton
 {
     public RightButton()
     {

+ 3 - 6
PicView/Views/UserControls/Buttons/StarOutlineButton.xaml.cs

@@ -1,12 +1,9 @@
-using System.Windows.Controls;
-using System.Windows.Media;
+using System.Windows.Media;
 
 namespace PicView.Views.UserControls.Buttons;
 
-/// <summary>
-/// Interaction logic for StarButtonOutline.xaml
-/// </summary>
-public partial class StarOutlineButton : UserControl
+
+public partial class StarOutlineButton
 {
     public StarOutlineButton()
     {

+ 2 - 5
PicView/Views/UserControls/Buttons/X2.xaml.cs

@@ -3,14 +3,11 @@ using PicView.PicGallery;
 using PicView.Properties;
 using PicView.UILogic;
 using System.Windows;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Buttons;
 
-/// <summary>
-/// Cool shady close button!
-/// </summary>
-public partial class X2 : UserControl
+
+public partial class X2
 {
     public X2()
     {

+ 1 - 1
PicView/Views/UserControls/Gallery/PicGallery.xaml

@@ -24,7 +24,7 @@
                 CanContentScroll="False"
                 FocusVisualStyle="{x:Null}"
                 Focusable="False"
-                HorizontalScrollBarVisibility="Visible" 
+                HorizontalScrollBarVisibility="Visible"
                 IsDeferredScrollingEnabled="False"
                 VerticalScrollBarVisibility="Disabled">
                 <ScrollViewer.Style>

+ 0 - 1
PicView/Views/UserControls/Gallery/PicGallery.xaml.cs

@@ -1,5 +1,4 @@
 using PicView.PicGallery;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Gallery;
 

+ 0 - 4
PicView/Views/UserControls/Menus/FileMenu.xaml

@@ -381,10 +381,6 @@
                     </Button>
                 </StackPanel>
             </Border>
-
-
-
-
         </Canvas>
 
         <Rectangle

+ 0 - 4
PicView/Views/UserControls/Menus/ImageSettings.xaml

@@ -345,8 +345,6 @@
                         </StackPanel>
                     </Border>
 
-
-
                     <Border
                         x:Name="FullscreenGalleryBorder"
                         Canvas.Left="5"
@@ -381,7 +379,6 @@
                                     Foreground="{StaticResource FullScreenIcon}"
                                     Text="{StaticResource ShowFullscreenGallery}"
                                     TextWrapping="Wrap" />
-
                             </StackPanel>
                         </Button>
                     </Border>
@@ -419,7 +416,6 @@
                                     Foreground="{StaticResource ContainedIcon}"
                                     Text="{StaticResource ShowHorizontalGallery}"
                                     TextWrapping="Wrap" />
-
                             </StackPanel>
                         </Button>
                     </Border>

+ 0 - 2
PicView/Views/UserControls/Menus/QuickSettingsMenu.xaml

@@ -358,8 +358,6 @@
                         </StackPanel>
                     </Border>
                 </Border>
-
-
             </Canvas>
         </Border>
 

+ 0 - 1
PicView/Views/UserControls/Menus/ToolsAndEffectsMenu.xaml

@@ -407,7 +407,6 @@
                         </StackPanel>
                     </Button>
                 </Border>
-
             </Canvas>
         </Border>
 

+ 2 - 6
PicView/Views/UserControls/Misc/AutoScrollSign.xaml.cs

@@ -1,11 +1,7 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Misc;
 
-namespace PicView.Views.UserControls.Misc;
 
-/// <summary>
-/// Interaction logic for AutoScrollSign.xaml
-/// </summary>
-public partial class AutoScrollSign : UserControl
+public partial class AutoScrollSign 
 {
     public AutoScrollSign()
     {

+ 2 - 6
PicView/Views/UserControls/Misc/ColorPicker.xaml.cs

@@ -1,11 +1,7 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Misc;
 
-namespace PicView.Views.UserControls.Misc;
 
-/// <summary>
-/// Interaction logic for ColorPicker.xaml
-/// </summary>
-public partial class ColorPicker : UserControl
+public partial class ColorPicker
 {
     public ColorPicker()
     {

+ 1 - 5
PicView/Views/UserControls/Misc/CroppingTool.xaml.cs

@@ -1,12 +1,8 @@
 using PicView.Editing.Crop;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Misc;
 
-/// <summary>
-/// Interaction logic for CroppingTool.xaml
-/// </summary>
-public partial class CroppingTool : UserControl
+public partial class CroppingTool
 {
     public CroppingTool()
     {

+ 3 - 14
PicView/Views/UserControls/Misc/CustomTextBox.xaml.cs

@@ -1,11 +1,6 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Misc;
 
-namespace PicView.Views.UserControls.Misc;
-
-/// <summary>
-/// Interaction logic for CustomTextBox.xaml
-/// </summary>
-public partial class CustomTextBox : UserControl
+public partial class CustomTextBox
 {
     public CustomTextBox()
     {
@@ -18,11 +13,5 @@ public partial class CustomTextBox : UserControl
         set => InnerTextBox.Text = value;
     }
 
-    public new bool IsFocused
-    {
-        get
-        {
-            return InnerTextBox.IsFocused;
-        }
-    }
+    public new bool IsFocused => InnerTextBox.IsFocused;
 }

+ 1 - 5
PicView/Views/UserControls/Misc/DragDropOverlay.xaml.cs

@@ -1,12 +1,8 @@
 using System.Windows;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Misc;
 
-/// <summary>
-/// Interaction logic for DragDropOverlay.xaml
-/// </summary>
-public partial class DragDropOverlay : UserControl
+public partial class DragDropOverlay
 {
     public DragDropOverlay(UIElement element)
     {

+ 3 - 4
PicView/Views/UserControls/Misc/DragDropOverlayPic.xaml.cs

@@ -1,9 +1,8 @@
-using System.Windows.Controls;
-using System.Windows.Media;
+using System.Windows.Media;
 
 namespace PicView.Views.UserControls.Misc;
 
-public partial class DragDropOverlayPic : UserControl
+public partial class DragDropOverlayPic
 {
     public DragDropOverlayPic(ImageSource source)
     {
@@ -12,7 +11,7 @@ public partial class DragDropOverlayPic : UserControl
         UpdateSource(source);
     }
 
-    public void UpdateSource(ImageSource source)
+    private void UpdateSource(ImageSource source)
     {
         if (source == null) { return; }
 

+ 2 - 7
PicView/Views/UserControls/Misc/FolderIcon.xaml.cs

@@ -1,11 +1,6 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Misc;
 
-namespace PicView.Views.UserControls.Misc;
-
-/// <summary>
-/// Interaction logic for FolderIcon.xaml
-/// </summary>
-public partial class FolderIcon : UserControl
+public partial class FolderIcon
 {
     public FolderIcon()
     {

+ 1 - 5
PicView/Views/UserControls/Misc/Icon.xaml.cs

@@ -1,15 +1,11 @@
 using PicView.ConfigureSettings;
 using System.Windows;
-using System.Windows.Controls;
 using System.Windows.Media;
 using System.Windows.Threading;
 
 namespace PicView.Views.UserControls.Misc;
 
-/// <summary>
-/// Interaction logic for Logo.xaml
-/// </summary>
-public partial class Icon : UserControl
+public partial class Icon
 {
     public Icon()
     {

+ 2 - 7
PicView/Views/UserControls/Misc/LinkChain.xaml.cs

@@ -1,11 +1,6 @@
-using System.Windows.Controls;
+namespace PicView.Views.UserControls.Misc;
 
-namespace PicView.Views.UserControls.Misc;
-
-/// <summary>
-/// Interaction logic for LinkChain.xaml
-/// </summary>
-public partial class LinkChain : UserControl
+public partial class LinkChain
 {
     public LinkChain()
     {

+ 2 - 2
PicView/Views/UserControls/Misc/LinkTextBox.xaml.cs

@@ -1,9 +1,8 @@
 using PicView.ProcessHandling;
-using System.Windows.Controls;
 
 namespace PicView.Views.UserControls.Misc;
 
-public partial class LinkTextBox : UserControl
+public partial class LinkTextBox
 {
     public LinkTextBox()
     {
@@ -18,6 +17,7 @@ public partial class LinkTextBox : UserControl
         linkButton.TheButton.Click += (_, _) => ProcessLogic.Hyperlink_RequestNavigate(ValueBox.Text);
     }
 
+    // ReSharper disable once InconsistentNaming
     public void SetURL(string url, string name)
     {
         ValueBox.Text = url;

+ 18 - 19
PicView/Views/UserControls/Misc/QuickResize.xaml.cs

@@ -1,4 +1,5 @@
-using PicView.Animations;
+using System.Globalization;
+using PicView.Animations;
 using PicView.Shortcuts;
 using PicView.UILogic;
 using PicView.UILogic.Sizing;
@@ -33,16 +34,18 @@ public partial class QuickResize : UserControl
 
             PercentageBox.PreviewKeyDown += async (_, e) =>
             {
-                // Prevent alt tab navigation and instead move back to WidthBox
-                if (e.Key == Key.Tab)
+                switch (e.Key)
                 {
-                    e.Handled = true;
-                    WidthBox.Focus();
-                }
-                if (e.Key == Key.Enter)
-                {
-                    e.Handled = true;
-                    await QuickResizeShortcuts.Fire(WidthBox.Text, HeightBox.Text).ConfigureAwait(false);
+                    // Prevent alt tab navigation and instead move back to WidthBox
+                    case Key.Tab:
+                        e.Handled = true;
+                        WidthBox.Focus();
+                        break;
+
+                    case Key.Enter:
+                        e.Handled = true;
+                        await QuickResizeShortcuts.Fire(WidthBox.Text, HeightBox.Text).ConfigureAwait(false);
+                        break;
                 }
             };
 
@@ -69,9 +72,9 @@ public partial class QuickResize : UserControl
 
             ApplyButton.MouseLeftButtonDown += async (_, _) => await QuickResizeShortcuts.Fire(WidthBox.Text, HeightBox.Text).ConfigureAwait(false);
 
-            for (int i = 0; i < PercentageBox.Items.Count; i++)
+            foreach (var t in PercentageBox.Items)
             {
-                var item = (ComboBoxItem)PercentageBox.Items[i];
+                var item = (ComboBoxItem)t;
                 item.GotFocus += (_, _) =>
                 {
                     if (item.IsMouseOver is false)
@@ -86,11 +89,7 @@ public partial class QuickResize : UserControl
 
     private void PercentageBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
     {
-        var originalWidth = ConfigureWindows.GetMainWindow.MainImage.Source.Width;
-        var originalHeight = ConfigureWindows.GetMainWindow.MainImage.Source.Height;
-
-        var content = ((ComboBoxItem)PercentageBox.SelectedItem).Content as string;
-        if (content == null) { return; }
+        if (((ComboBoxItem)PercentageBox.SelectedItem).Content is not string content) { return; }
 
         var value = decimal.Parse(content.TrimEnd('%', ' ')) / 100M; // Convert from percentage to decimal
 
@@ -104,8 +103,8 @@ public partial class QuickResize : UserControl
         Visibility = Visibility.Visible;
         AnimationHelper.Fade(this, TimeSpan.FromSeconds(.4), TimeSpan.Zero, 0, 1);
         PercentageBox.SelectedIndex = 0;
-        WidthBox.Text = ConfigureWindows.GetMainWindow.MainImage.Source?.Width.ToString();
-        HeightBox.Text = ConfigureWindows.GetMainWindow.MainImage?.Source?.Height.ToString();
+        WidthBox.Text = ConfigureWindows.GetMainWindow.MainImage.Source?.Width.ToString(CultureInfo.CurrentCulture);
+        HeightBox.Text = ConfigureWindows.GetMainWindow.MainImage?.Source?.Height.ToString(CultureInfo.CurrentCulture);
 
         var timer = new Timer(401) { AutoReset = false, Enabled = true };
         timer.Elapsed += delegate

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä