This commit is contained in:
Manuel Kamper 2024-08-23 14:40:16 +02:00
parent ee37249117
commit 0a431d2b8c

View File

@ -48,6 +48,18 @@ namespace Mk0.Software.ImageSorter
}; };
this.Controls.Add(browser); this.Controls.Add(browser);
browser.Dock = DockStyle.Fill; browser.Dock = DockStyle.Fill;
browser.LoadingStateChanged += Browser_LoadingStateChanged;
}
private void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e)
{
if (e.IsLoading == false)
{
Console.WriteLine("finished loading page");
this.BeginInvoke(new Action(() => {
CopyPasteImage();
}));
}
} }
private void Inpaint_FormClosing(object sender, FormClosingEventArgs e) private void Inpaint_FormClosing(object sender, FormClosingEventArgs e)
@ -93,7 +105,6 @@ namespace Mk0.Software.ImageSorter
{ {
Left = Properties.Settings.Default.lastLeftInpaint; Left = Properties.Settings.Default.lastLeftInpaint;
} }
CopyPasteImage();
ToolTip t1 = new ToolTip ToolTip t1 = new ToolTip
{ {
AutoPopDelay = 5000, AutoPopDelay = 5000,
@ -113,6 +124,7 @@ 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
@ -121,12 +133,6 @@ namespace Mk0.Software.ImageSorter
browser.Select(); browser.Select();
browser.Focus(); browser.Focus();
SendKeys.Send("^{v}"); SendKeys.Send("^{v}");
browser.Select();
browser.Focus();
SendKeys.Send("^{v}");
browser.Select();
browser.Focus();
SendKeys.Send("^{v}");
} }
private void ButtonPaste_Click(object sender, EventArgs e) private void ButtonPaste_Click(object sender, EventArgs e)