diff --git a/Photomator/Lib.cs b/Photomator/Lib.cs index c023214..a7d1336 100644 --- a/Photomator/Lib.cs +++ b/Photomator/Lib.cs @@ -1,25 +1,10 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.Formats.Webp; using SixLabors.ImageSharp.Processing; -using System.Runtime.InteropServices; namespace Photomator; public static class Lib { - const int SW_HIDE = 0; - const int SW_SHOW = 5; - readonly static IntPtr handle = GetConsoleWindow(); - [DllImport("kernel32.dll")] static extern IntPtr GetConsoleWindow(); - [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd,int nCmdShow); - - public static void HideConsole() { - ShowWindow(handle,SW_HIDE); - } - - public static void ShowConsole() { - ShowWindow(handle,SW_SHOW); - } - public static async Task Convert(string src, string dest, ConvertOptions options) { Image img = await Image.LoadAsync(src); img.Mutate(i => { diff --git a/Photomator/Photomator.csproj b/Photomator/Photomator.csproj index ab354ff..2ea263a 100644 --- a/Photomator/Photomator.csproj +++ b/Photomator/Photomator.csproj @@ -25,15 +25,21 @@ - - + - - + + + + + + + + + diff --git a/Photomator/Program.cs b/Photomator/Program.cs index 9e78051..a2e193f 100644 --- a/Photomator/Program.cs +++ b/Photomator/Program.cs @@ -11,7 +11,6 @@ public partial class Program { public static int Main() => new Program().Run(); public Program() { - Lib.HideConsole(); _application = Adw.Application.New("de.cantorgymnasium.Photomator", Gio.ApplicationFlags.FlagsNone); Gtk.Window.SetDefaultIconName("de.cantorgymnasium.Photomator"); string localPath = Path.GetFullPath(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!) + "/de.cantorgymnasium.Photomator.gresource";