fixed #9
This commit is contained in:
Manuel Kamper 2024-08-17 08:44:36 +02:00
parent cad7522385
commit 50763e9b80
2 changed files with 25 additions and 7 deletions

View File

@ -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;
}
}
}

View File

@ -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();