This commit is contained in:
Manuel Kamper 2024-08-23 15:28:05 +02:00
parent cb4fdd33ac
commit 192f65af54

View File

@ -55,7 +55,6 @@ namespace Mk0.Software.ImageSorter
{ {
if (e.IsLoading == false) if (e.IsLoading == false)
{ {
Console.WriteLine("finished loading page");
this.BeginInvoke(new Action(() => { this.BeginInvoke(new Action(() => {
CopyPasteImage(); CopyPasteImage();
})); }));
@ -69,21 +68,10 @@ namespace Mk0.Software.ImageSorter
Properties.Settings.Default.lastTopInpaint = Top; Properties.Settings.Default.lastTopInpaint = Top;
Properties.Settings.Default.lastLeftInpaint = Left; Properties.Settings.Default.lastLeftInpaint = Left;
Properties.Settings.Default.Save(); 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); 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();");
switch (res)
{
case DialogResult.Yes:
{
e.Cancel = true;
break;
}
case DialogResult.No:
{
break;
}
}
} }
} }
@ -124,7 +112,6 @@ namespace Mk0.Software.ImageSorter
private void CopyPasteImage() private void CopyPasteImage()
{ {
System.Threading.Thread.Sleep(125); System.Threading.Thread.Sleep(125);
Console.WriteLine("paste");
StringCollection c = new StringCollection StringCollection c = new StringCollection
{ {
file file