diff --git a/Mk0.Software.ImageSorter/Inpaint.cs b/Mk0.Software.ImageSorter/Inpaint.cs index 400c2fc..adeb8e9 100644 --- a/Mk0.Software.ImageSorter/Inpaint.cs +++ b/Mk0.Software.ImageSorter/Inpaint.cs @@ -23,6 +23,25 @@ namespace Mk0.Software.ImageSorter private void InitializeChromium() { +#if ANYCPU + //Only required for PlatformTarget of AnyCPU + CefRuntime.SubscribeAnyCpuAssemblyResolver(); +#endif + var settings = new CefSettings(); + settings.LogSeverity = LogSeverity.Disable; + if (!Cef.IsInitialized) + { + //Perform dependency check to make sure all relevant resources are in our output directory. + var initialized = Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null); + + if (!initialized) + { + MessageBox.Show("Cef.Initialized failed, check the log file for more details."); + + //Shutdown(); + } + } + browser = new ChromiumWebBrowser(url) { DownloadHandler = new DownloadHandler(), @@ -35,6 +54,11 @@ namespace Mk0.Software.ImageSorter private void Inpaint_FormClosing(object sender, FormClosingEventArgs e) { + Properties.Settings.Default.lastWidthInpaint = Width; + Properties.Settings.Default.lastHeightInpaint = Height; + Properties.Settings.Default.lastTopInpaint = Top; + Properties.Settings.Default.lastLeftInpaint = Left; + Properties.Settings.Default.Save(); if (!File.Exists(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "inpaint-tmp", Path.GetFileNameWithoutExtension(file) + "_cleanup" + Path.GetExtension(file)))) { DialogResult res = MessageBox.Show("Sie haben kein bearbeitetes Bild heruntergeladen. Klicken sie dazu auf den Downloadbutton am unteren Fensterrand.\n\nWollen sie die bearbeitete Datei doch noch herunterladen (Ja)?\n\nFalls sie ihre Ă„nderungen verwerfen wollen, Klicken sie (Nein).", "Inpaint Frage", MessageBoxButtons.YesNo, MessageBoxIcon.Question); @@ -47,13 +71,7 @@ namespace Mk0.Software.ImageSorter } case DialogResult.No: { - Properties.Settings.Default.lastWidthInpaint = Width; - Properties.Settings.Default.lastHeightInpaint = Height; - Properties.Settings.Default.lastTopInpaint = Top; - Properties.Settings.Default.lastLeftInpaint = Left; - Properties.Settings.Default.Save(); break; - } } } diff --git a/Mk0.Software.ImageSorter/Main.cs b/Mk0.Software.ImageSorter/Main.cs index 10ca0cc..db3ff69 100644 --- a/Mk0.Software.ImageSorter/Main.cs +++ b/Mk0.Software.ImageSorter/Main.cs @@ -2206,7 +2206,7 @@ namespace Mk0.Software.ImageSorter { if (CheckInpaint()) { - if (Path.GetExtension(pictureBoxImage.ImageLocation).ToLower() != "heic") + if (Path.GetExtension(pictureBoxImage.ImageLocation).ToLower() != ".heic") { Inpaint ip = new Inpaint(Properties.Settings.Default.inpaintUrl, pictureBoxImage.ImageLocation); ip.ShowDialog();