浏览代码

Fix lockscreen image function to not require console window

Ruben 1 年之前
父节点
当前提交
28af96229f

+ 37 - 0
src/PicView.Core/FileHandling/FileDeletionHelper.cs

@@ -27,4 +27,41 @@ public static class FileDeletionHelper
 
 
         return string.Empty;
         return string.Empty;
     }
     }
+
+    /// <summary>
+    /// Deletes the temporary files when an archived file has been opened
+    /// </summary>
+    public static void DeleteTempFiles()
+    {
+        if (!Directory.Exists(ArchiveHelper.TempFilePath))
+        {
+            return;
+        }
+
+        try
+        {
+            Array.ForEach(Directory.GetFiles(ArchiveHelper.TempFilePath), File.Delete);
+#if DEBUG
+            Trace.WriteLine("Temp zip files deleted");
+#endif
+        }
+        catch (Exception)
+        {
+            return;
+        }
+
+        try
+        {
+            Directory.Delete(ArchiveHelper.TempFilePath);
+#if DEBUG
+            Trace.WriteLine("Temp zip folder " + ArchiveHelper.TempFilePath + " deleted");
+#endif
+        }
+        catch (Exception)
+        {
+            return;
+        }
+
+        ArchiveHelper.TempZipFile = ArchiveHelper.TempFilePath = null;
+    }
 }
 }

+ 47 - 14
src/PicView.Core/FileHandling/FileHelper.cs

@@ -7,34 +7,25 @@ namespace PicView.Core.FileHandling;
 public static partial class FileHelper
 public static partial class FileHelper
 {
 {
     /// <summary>
     /// <summary>
-    /// RenameFile method renames a file.
+    /// Renames a file by moving it to a new path. Creates the destination directory if it does not exist.
     /// </summary>
     /// </summary>
-    /// <param name="path">The original path of the file.</param>
-    /// <param name="newPath">The new path of the file.</param>
+    /// <param name="path">The current path of the file.</param>
+    /// <param name="newPath">The new path to which the file will be moved.</param>
     /// <returns>
     /// <returns>
-    /// A boolean indicating whether the file was successfully renamed or not.
+    /// <c>true</c> if the file is successfully renamed; otherwise, <c>false</c>.
     /// </returns>
     /// </returns>
     public static bool RenameFile(string path, string newPath)
     public static bool RenameFile(string path, string newPath)
     {
     {
         try
         try
         {
         {
             new FileInfo(newPath).Directory.Create(); // create directory if not exists
             new FileInfo(newPath).Directory.Create(); // create directory if not exists
-        }
-        catch (Exception e)
-        {
-#if DEBUG
-            Trace.WriteLine(e.Message);
-#endif
-        }
 
 
-        try
-        {
             File.Move(path, newPath, true);
             File.Move(path, newPath, true);
         }
         }
         catch (Exception e)
         catch (Exception e)
         {
         {
 #if DEBUG
 #if DEBUG
-            Trace.WriteLine(e.Message);
+            Trace.WriteLine($"{nameof(RenameFile)} {path}, {newPath} exception: \n{e.Message}\n");
 #endif
 #endif
             return false;
             return false;
         }
         }
@@ -132,4 +123,46 @@ public static partial class FileHelper
             return string.Empty;
             return string.Empty;
         return File.Exists(ArchiveHelper.TempFilePath) ? ArchiveHelper.TempFilePath : string.Empty;
         return File.Exists(ArchiveHelper.TempFilePath) ? ArchiveHelper.TempFilePath : string.Empty;
     }
     }
+
+    /// <summary>
+    /// Generates a new filename with an incremented number inside parentheses to avoid duplication.
+    /// </summary>
+    /// <param name="currentFile">The path of the current file.</param>
+    /// <returns>
+    /// The path of the new file with an incremented number inside parentheses to avoid duplication.
+    /// </returns>
+    public static string DuplicateAndReturnFileName(string currentFile)
+    {
+        string newFile;
+        var dir = Path.GetDirectoryName(currentFile);
+        var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(currentFile);
+        var extension = Path.GetExtension(currentFile);
+
+        var i = 1;
+
+        // Check if the original filename already contains parentheses
+        if (fileNameWithoutExtension.Contains("(") && fileNameWithoutExtension.EndsWith(")"))
+        {
+            // Extract the number from the existing parentheses
+            var lastParenIndex = fileNameWithoutExtension.LastIndexOf("(", StringComparison.Ordinal);
+            var numberStr = fileNameWithoutExtension.Substring(lastParenIndex + 1,
+                fileNameWithoutExtension.Length - lastParenIndex - 2);
+
+            if (int.TryParse(numberStr, out var existingNumber))
+            {
+                i = existingNumber + 1;
+                fileNameWithoutExtension = fileNameWithoutExtension[..lastParenIndex].TrimEnd();
+            }
+        }
+
+        // Generate a new filename with an incremented number inside parentheses
+        do
+        {
+            newFile = Path.Combine(dir, $"{fileNameWithoutExtension}({i++}){extension}");
+        } while (File.Exists(newFile));
+
+        // Copy the file to the new location
+        File.Copy(currentFile, newFile);
+        return newFile;
+    }
 }
 }

+ 14 - 5
src/PicView.Core/Localization/TranslationHelper.cs

@@ -1,7 +1,6 @@
-using System.Diagnostics;
-using System.IO;
+using PicView.Core.Config;
+using System.Diagnostics;
 using System.Text.Json;
 using System.Text.Json;
-using PicView.Core.Config;
 
 
 namespace PicView.Core.Localization;
 namespace PicView.Core.Localization;
 
 
@@ -12,7 +11,6 @@ public static class TranslationHelper
 {
 {
     public static string GetTranslation(string key)
     public static string GetTranslation(string key)
     {
     {
-        // ReSharper disable once InvertIf
         if (Language is null)
         if (Language is null)
             return string.Empty;
             return string.Empty;
 
 
@@ -41,7 +39,18 @@ public static class TranslationHelper
             }
             }
             else
             else
             {
             {
-                // TODO: Recreate English file?
+                var languagesDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Config/Languages/");
+
+                var file = Directory.GetFiles(languagesDirectory, "*.json").FirstOrDefault();
+                if (file != null)
+                {
+                    var text = await File.ReadAllTextAsync(file).ConfigureAwait(false);
+                    Language = JsonSerializer.Deserialize<Dictionary<string, string>>(text);
+                }
+                else
+                {
+                    throw new FileNotFoundException();
+                }
             }
             }
         }
         }
         catch (Exception exception)
         catch (Exception exception)

+ 0 - 31
src/PicView.Tools/LockScreenImage.cs

@@ -1,31 +0,0 @@
-using Microsoft.Win32;
-using System.Runtime.InteropServices;
-
-namespace PicView.Tools;
-
-public static class LockScreenHelper
-{
-    [DllImport("kernel32.dll", SetLastError = true)]
-    public static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr); //If on 64 bit, C# will replace "System32" with "SysWOW64". This disables that.
-
-    public static bool SetLockScreenImage(string path)
-    {
-        const string registryKey =
-            @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP";
-        var ptr = new IntPtr();
-        Wow64DisableWow64FsRedirection(ref ptr);
-
-        try
-        {
-            Registry.SetValue(registryKey, "LockScreenImageStatus", 1, RegistryValueKind.DWord);
-            Registry.SetValue(registryKey, "LockScreenImagePath", path, RegistryValueKind.String);
-            Registry.SetValue(registryKey, "LockScreenImageUrl", path, RegistryValueKind.String);
-        }
-        catch
-        {
-            return false;
-        }
-
-        return true;
-    }
-}

+ 0 - 18
src/PicView.Tools/PicView.Tools.csproj

@@ -1,18 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <OutputType>Exe</OutputType>
-    <TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
-    <ImplicitUsings>enable</ImplicitUsings>
-    <Nullable>enable</Nullable>
-    <PublishAot>true</PublishAot>
-    <InvariantGlobalization>true</InvariantGlobalization>
-    <PlatformTarget>x64</PlatformTarget>
-    <ProduceReferenceAssembly>False</ProduceReferenceAssembly>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <DebugType>none</DebugType>
-  </PropertyGroup>
-
-</Project>

+ 0 - 25
src/PicView.Tools/Program.cs

@@ -1,25 +0,0 @@
-using PicView.Tools;
-
-if (args.Length is 0)
-{
-    Environment.Exit(-1);
-}
-
-if (string.IsNullOrEmpty(args[0]))
-{
-    Environment.Exit(-1);
-}
-
-var arg = args[0];
-
-if (arg.StartsWith("lockscreen"))
-{
-    var path = arg[(arg.LastIndexOf(',') + 1)..];
-    path = Path.GetFullPath(path);
-    LockScreenHelper.SetLockScreenImage(path);
-
-#if DEBUG
-    Console.WriteLine(path);
-    Console.ReadKey();
-#endif
-}

+ 2 - 2
src/PicView.WPF/ChangeImage/ErrorHandling.cs

@@ -107,7 +107,7 @@ internal static class ErrorHandling
         }
         }
 
 
         PreLoader.Clear();
         PreLoader.Clear();
-        DeleteTempFiles();
+        FileDeletionHelper.DeleteTempFiles();
     }
     }
 
 
     /// <summary>
     /// <summary>
@@ -280,7 +280,7 @@ internal static class ErrorHandling
 
 
         if (!string.IsNullOrWhiteSpace(Core.FileHandling.ArchiveHelper.TempFilePath))
         if (!string.IsNullOrWhiteSpace(Core.FileHandling.ArchiveHelper.TempFilePath))
         {
         {
-            DeleteTempFiles();
+            FileDeletionHelper.DeleteTempFiles();
             Core.FileHandling.ArchiveHelper.TempFilePath = string.Empty;
             Core.FileHandling.ArchiveHelper.TempFilePath = string.Empty;
         }
         }
 
 

+ 2 - 1
src/PicView.WPF/ChangeImage/UpdateImage.cs

@@ -9,6 +9,7 @@ using System.Windows;
 using System.Windows.Input;
 using System.Windows.Input;
 using System.Windows.Media.Imaging;
 using System.Windows.Media.Imaging;
 using System.Windows.Threading;
 using System.Windows.Threading;
+using PicView.Core.FileHandling;
 using PicView.Core.Navigation;
 using PicView.Core.Navigation;
 using XamlAnimatedGif;
 using XamlAnimatedGif;
 using static PicView.WPF.ChangeImage.ErrorHandling;
 using static PicView.WPF.ChangeImage.ErrorHandling;
@@ -200,7 +201,7 @@ internal static class UpdateImage
         GalleryFunctions.Clear();
         GalleryFunctions.Clear();
         XWidth = XHeight = 0;
         XWidth = XHeight = 0;
 
 
-        DeleteFiles.DeleteTempFiles();
+        FileDeletionHelper.DeleteTempFiles();
 
 
         if (ConfigureWindows.GetImageInfoWindow is not null)
         if (ConfigureWindows.GetImageInfoWindow is not null)
         {
         {

+ 2 - 34
src/PicView.WPF/FileHandling/CopyPaste.cs

@@ -17,6 +17,7 @@ using static PicView.WPF.UILogic.Tooltip;
 using PicView.Core.Gallery;
 using PicView.Core.Gallery;
 using PicView.WPF.PicGallery;
 using PicView.WPF.PicGallery;
 using System;
 using System;
+using PicView.Core.FileHandling;
 
 
 namespace PicView.WPF.FileHandling;
 namespace PicView.WPF.FileHandling;
 
 
@@ -48,40 +49,7 @@ internal static class CopyPaste
 
 
         try
         try
         {
         {
-            string newFile =
-                await Task.Run(() =>
-                {
-                    var dir = Path.GetDirectoryName(currentFile);
-                    var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(currentFile);
-                    var extension = Path.GetExtension(currentFile);
-
-                    int i = 1;
-
-                    // Check if the original filename already contains parentheses
-                    if (fileNameWithoutExtension.Contains("(") && fileNameWithoutExtension.EndsWith(")"))
-                    {
-                        // Extract the number from the existing parentheses
-                        var lastParenIndex = fileNameWithoutExtension.LastIndexOf("(", StringComparison.Ordinal);
-                        var numberStr = fileNameWithoutExtension.Substring(lastParenIndex + 1,
-                            fileNameWithoutExtension.Length - lastParenIndex - 2);
-
-                        if (int.TryParse(numberStr, out int existingNumber))
-                        {
-                            i = existingNumber + 1;
-                            fileNameWithoutExtension = fileNameWithoutExtension[..lastParenIndex].TrimEnd();
-                        }
-                    }
-
-                    // Generate a new filename with an incremented number inside parentheses
-                    do
-                    {
-                        newFile = Path.Combine(dir, $"{fileNameWithoutExtension}({i++}){extension}");
-                    } while (File.Exists(newFile));
-
-                    // Copy the file to the new location
-                    File.Copy(currentFile, newFile);
-                    return newFile;
-                });
+            var newFile = await Task.FromResult(FileHelper.DuplicateAndReturnFileName(currentFile)).ConfigureAwait(false);
 
 
             // Add the new file to Pics and Gallery, clear Preloader to refresh cache
             // Add the new file to Pics and Gallery, clear Preloader to refresh cache
             var nextIndex = ImageIteration.GetNextIndex(NavigateTo.Next, Slideshow.SlideTimer != null, Pics, FolderIndex);
             var nextIndex = ImageIteration.GetNextIndex(NavigateTo.Next, Slideshow.SlideTimer != null, Pics, FolderIndex);

+ 1 - 42
src/PicView.WPF/FileHandling/DeleteFiles.cs

@@ -1,8 +1,4 @@
-using System.Diagnostics;
-using System.IO;
-using System.Windows;
-using Microsoft.VisualBasic.FileIO;
-using PicView.Core.FileHandling;
+using PicView.Core.FileHandling;
 using PicView.Core.Localization;
 using PicView.Core.Localization;
 using PicView.Core.Navigation;
 using PicView.Core.Navigation;
 using PicView.WPF.ChangeImage;
 using PicView.WPF.ChangeImage;
@@ -14,43 +10,6 @@ namespace PicView.WPF.FileHandling;
 
 
 internal static class DeleteFiles
 internal static class DeleteFiles
 {
 {
-    /// <summary>
-    /// Deletes the temporary files when an archived file has been opened
-    /// </summary>
-    internal static void DeleteTempFiles()
-    {
-        if (!Directory.Exists(Core.FileHandling.ArchiveHelper.TempFilePath))
-        {
-            return;
-        }
-
-        try
-        {
-            Array.ForEach(Directory.GetFiles(Core.FileHandling.ArchiveHelper.TempFilePath), File.Delete);
-#if DEBUG
-            Trace.WriteLine("Temp zip files deleted");
-#endif
-        }
-        catch (Exception)
-        {
-            return;
-        }
-
-        try
-        {
-            Directory.Delete(Core.FileHandling.ArchiveHelper.TempFilePath);
-#if DEBUG
-            Trace.WriteLine("Temp zip folder " + Core.FileHandling.ArchiveHelper.TempFilePath + " deleted");
-#endif
-        }
-        catch (Exception)
-        {
-            return;
-        }
-
-        Core.FileHandling.ArchiveHelper.TempZipFile = Core.FileHandling.ArchiveHelper.TempFilePath = null;
-    }
-
     /// <summary>
     /// <summary>
     /// Delete file or move it to recycle bin, navigate to next pic
     /// Delete file or move it to recycle bin, navigate to next pic
     /// and display information
     /// and display information

+ 30 - 4
src/PicView.WPF/SystemIntegration/LockScreenImage.cs

@@ -1,4 +1,5 @@
-using PicView.Core.FileHandling;
+using Microsoft.Win32;
+using PicView.Core.FileHandling;
 using PicView.Core.Localization;
 using PicView.Core.Localization;
 using PicView.WPF.ChangeImage;
 using PicView.WPF.ChangeImage;
 using PicView.WPF.ChangeTitlebar;
 using PicView.WPF.ChangeTitlebar;
@@ -7,6 +8,7 @@ using PicView.WPF.ProcessHandling;
 using PicView.WPF.UILogic;
 using PicView.WPF.UILogic;
 using System.Diagnostics;
 using System.Diagnostics;
 using System.IO;
 using System.IO;
+using System.Runtime.InteropServices;
 using System.Windows;
 using System.Windows;
 using System.Windows.Input;
 using System.Windows.Input;
 using System.Windows.Media.Imaging;
 using System.Windows.Media.Imaging;
@@ -87,7 +89,7 @@ public static class LockScreenHelper
         {
         {
             Tooltip.ShowTooltipMessage(TranslationHelper.GetTranslation("Applying"));
             Tooltip.ShowTooltipMessage(TranslationHelper.GetTranslation("Applying"));
 
 
-            ProcessLogic.RunElevated("PicView.Tools.exe", "lockscreen," + path);
+            ProcessLogic.RunElevated("PicView.exe", "lockscreen," + path);
         }
         }
         catch (Exception ex)
         catch (Exception ex)
         {
         {
@@ -99,7 +101,7 @@ public static class LockScreenHelper
             await ConfigureWindows.GetMainWindow.Dispatcher.InvokeAsync(() =>
             await ConfigureWindows.GetMainWindow.Dispatcher.InvokeAsync(() =>
             {
             {
                 SetTitle.SetTitleString();
                 SetTitle.SetTitleString();
-                Application.Current.MainWindow!.Cursor = Cursors.Arrow;
+                ConfigureWindows.GetMainWindow.Cursor = Cursors.Arrow;
             });
             });
             return false;
             return false;
         }
         }
@@ -117,9 +119,33 @@ public static class LockScreenHelper
                         : checkOutOfRange
                         : checkOutOfRange
                             ? Navigation.Pics[Navigation.FolderIndex]
                             ? Navigation.Pics[Navigation.FolderIndex]
                             : Application.Current.Resources["Image"] as string);
                             : Application.Current.Resources["Image"] as string);
-            Application.Current.MainWindow!.Cursor = Cursors.Arrow;
+            ConfigureWindows.GetMainWindow.Cursor = Cursors.Arrow;
         });
         });
 
 
         return true;
         return true;
     }
     }
+
+    [DllImport("kernel32.dll", SetLastError = true)]
+    public static extern bool Wow64DisableWow64FsRedirection(ref IntPtr ptr); //If on 64 bit, C# will replace "System32" with "SysWOW64". This disables that.
+
+    public static bool SetLockScreenImage(string path)
+    {
+        const string registryKey =
+            @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP";
+        var ptr = new IntPtr();
+        Wow64DisableWow64FsRedirection(ref ptr);
+
+        try
+        {
+            Registry.SetValue(registryKey, "LockScreenImageStatus", 1, RegistryValueKind.DWord);
+            Registry.SetValue(registryKey, "LockScreenImagePath", path, RegistryValueKind.String);
+            Registry.SetValue(registryKey, "LockScreenImageUrl", path, RegistryValueKind.String);
+        }
+        catch
+        {
+            return false;
+        }
+
+        return true;
+    }
 }
 }

+ 22 - 1
src/PicView.WPF/UILogic/Loading/StartLoading.cs

@@ -7,6 +7,7 @@ using PicView.WPF.SystemIntegration;
 using PicView.WPF.UILogic.Sizing;
 using PicView.WPF.UILogic.Sizing;
 using PicView.WPF.Views.UserControls.Misc;
 using PicView.WPF.Views.UserControls.Misc;
 using PicView.WPF.Views.Windows;
 using PicView.WPF.Views.Windows;
+using System.IO;
 using System.Windows;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls;
 using static PicView.WPF.UILogic.Loading.LoadContextMenus;
 using static PicView.WPF.UILogic.Loading.LoadContextMenus;
@@ -38,6 +39,19 @@ internal static class StartLoading
         }
         }
 
 
         var args = Environment.GetCommandLineArgs();
         var args = Environment.GetCommandLineArgs();
+        if (args.Length > 1)
+        {
+            // Apply lockscreen and close
+            var arg = args[1];
+            if (arg.StartsWith("lockscreen"))
+            {
+                var path = arg[(arg.LastIndexOf(',') + 1)..];
+                path = Path.GetFullPath(path);
+                LockScreenHelper.SetLockScreenImage(path);
+                Environment.Exit(0);
+            }
+        }
+
         MainWindow? mainWindow = null;
         MainWindow? mainWindow = null;
         var language = SettingsHelper.Settings.UIProperties.UserLanguage;
         var language = SettingsHelper.Settings.UIProperties.UserLanguage;
         await Core.Localization.TranslationHelper.LoadLanguage(language).ConfigureAwait(false);
         await Core.Localization.TranslationHelper.LoadLanguage(language).ConfigureAwait(false);
@@ -132,7 +146,14 @@ internal static class StartLoading
             }
             }
         }
         }
 
 
-        await mainWindow.Dispatcher.InvokeAsync(startupWindow.Close);
+        try
+        {
+            await mainWindow.Dispatcher.InvokeAsync(startupWindow.Close);
+        }
+        catch (Exception)
+        {
+            //
+        }
 
 
         ConfigColors.UpdateColor();
         ConfigColors.UpdateColor();
     }
     }

+ 2 - 1
src/PicView.WPF/UILogic/Sizing/WindowSizing.cs

@@ -8,6 +8,7 @@ using PicView.WPF.Views.UserControls.Buttons;
 using System.Diagnostics;
 using System.Diagnostics;
 using System.Windows;
 using System.Windows;
 using System.Windows.Input;
 using System.Windows.Input;
+using PicView.Core.FileHandling;
 using static PicView.WPF.UILogic.ConfigureWindows;
 using static PicView.WPF.UILogic.ConfigureWindows;
 using static PicView.WPF.UILogic.HideInterfaceLogic;
 using static PicView.WPF.UILogic.HideInterfaceLogic;
 using static PicView.WPF.UILogic.Sizing.ScaleImage;
 using static PicView.WPF.UILogic.Sizing.ScaleImage;
@@ -371,7 +372,7 @@ internal static class WindowSizing
         GetSettingsWindow?.Close();
         GetSettingsWindow?.Close();
 
 
         await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
         await SettingsHelper.SaveSettingsAsync().ConfigureAwait(false);
-        DeleteFiles.DeleteTempFiles();
+        FileDeletionHelper.DeleteTempFiles();
         FileHistoryNavigation.WriteToFile();
         FileHistoryNavigation.WriteToFile();
         // Update the keybindings.json file
         // Update the keybindings.json file
         await CustomKeybindings.UpdateKeyBindingsFile();
         await CustomKeybindings.UpdateKeyBindingsFile();

+ 2 - 11
src/PicView.sln

@@ -4,17 +4,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 VisualStudioVersion = 17.8.34112.27
 VisualStudioVersion = 17.8.34112.27
 MinimumVisualStudioVersion = 10.0.40219.1
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicView.WPF", "PicView.WPF\PicView.WPF.csproj", "{9B5425DC-4329-4A7A-A0C5-F93161F77245}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicView.WPF", "PicView.WPF\PicView.WPF.csproj", "{9B5425DC-4329-4A7A-A0C5-F93161F77245}"
-	ProjectSection(ProjectDependencies) = postProject
-		{47DE1EC3-CD33-43E1-857F-4820C6AD16B6} = {47DE1EC3-CD33-43E1-857F-4820C6AD16B6}
-	EndProjectSection
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicView.Tools", "PicView.Tools\PicView.Tools.csproj", "{47DE1EC3-CD33-43E1-857F-4820C6AD16B6}"
 EndProject
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XamlAnimatedGif", "XamlAnimatedGif\XamlAnimatedGif.csproj", "{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}"
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XamlAnimatedGif", "XamlAnimatedGif\XamlAnimatedGif.csproj", "{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PicView.Core", "PicView.Core\PicView.Core.csproj", "{17C701BC-1F25-4995-A7E5-1360EBC5904B}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicView.Core", "PicView.Core\PicView.Core.csproj", "{17C701BC-1F25-4995-A7E5-1360EBC5904B}"
 EndProject
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PicView.Avalonia", "PicView.Avalonia\PicView.Avalonia.csproj", "{E36E03B2-6CAB-407F-AD72-411F43CFC5A8}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PicView.Avalonia", "PicView.Avalonia\PicView.Avalonia.csproj", "{E36E03B2-6CAB-407F-AD72-411F43CFC5A8}"
 EndProject
 EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,10 +21,6 @@ Global
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Release|Any CPU.Build.0 = Release|Any CPU
 		{9B5425DC-4329-4A7A-A0C5-F93161F77245}.Release|Any CPU.Build.0 = Release|Any CPU
-		{47DE1EC3-CD33-43E1-857F-4820C6AD16B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{47DE1EC3-CD33-43E1-857F-4820C6AD16B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{47DE1EC3-CD33-43E1-857F-4820C6AD16B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{47DE1EC3-CD33-43E1-857F-4820C6AD16B6}.Release|Any CPU.Build.0 = Release|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{1D4E804D-33E8-46CC-B4FC-AC6A84F5085A}.Release|Any CPU.ActiveCfg = Release|Any CPU