diff --git a/Mk0.Software.ImageSorter/Inpaint.cs b/Mk0.Software.ImageSorter/Inpaint.cs index 09633d6..a811abf 100644 --- a/Mk0.Software.ImageSorter/Inpaint.cs +++ b/Mk0.Software.ImageSorter/Inpaint.cs @@ -55,7 +55,6 @@ namespace Mk0.Software.ImageSorter { if (e.IsLoading == false) { - Console.WriteLine("finished loading page"); this.BeginInvoke(new Action(() => { CopyPasteImage(); })); @@ -69,21 +68,10 @@ namespace Mk0.Software.ImageSorter 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) + "_inpaint" + Path.GetExtension(file)))) + string inpaintFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "inpaint-tmp", Path.GetFileNameWithoutExtension(file) + "_inpaint" + Path.GetExtension(file)); + if (!File.Exists(inpaintFile)) { - 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); - switch (res) - { - case DialogResult.Yes: - { - e.Cancel = true; - break; - } - case DialogResult.No: - { - break; - } - } + browser.ExecuteScriptAsync("document.querySelector(\"#root > main > div.flex.w-screen.h-screen.justify-center.items-center > div.fixed.flex.bottom-5.border.px-4.py-2.rounded-\\\\[3rem\\\\].gap-8.items-center.justify-center.backdrop-filter.backdrop-blur-md.bg-background\\\\/70 > div > button:nth-child(5)\").click();"); } } @@ -124,7 +112,6 @@ namespace Mk0.Software.ImageSorter private void CopyPasteImage() { System.Threading.Thread.Sleep(125); - Console.WriteLine("paste"); StringCollection c = new StringCollection { file