parent
cad7522385
commit
50763e9b80
@ -23,6 +23,25 @@ namespace Mk0.Software.ImageSorter
|
|||||||
|
|
||||||
private void InitializeChromium()
|
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)
|
browser = new ChromiumWebBrowser(url)
|
||||||
{
|
{
|
||||||
DownloadHandler = new DownloadHandler(),
|
DownloadHandler = new DownloadHandler(),
|
||||||
@ -35,6 +54,11 @@ namespace Mk0.Software.ImageSorter
|
|||||||
|
|
||||||
private void Inpaint_FormClosing(object sender, FormClosingEventArgs e)
|
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))))
|
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);
|
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:
|
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;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2206,7 +2206,7 @@ namespace Mk0.Software.ImageSorter
|
|||||||
{
|
{
|
||||||
if (CheckInpaint())
|
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);
|
Inpaint ip = new Inpaint(Properties.Settings.Default.inpaintUrl, pictureBoxImage.ImageLocation);
|
||||||
ip.ShowDialog();
|
ip.ShowDialog();
|
||||||
|
Loading…
Reference in New Issue
Block a user