Attempt to stop crash related to settings file when closing

master
Nathan Crawford 2018-06-03 13:38:47 -04:00
rodzic afd3e80907
commit 51bc553e73
2 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -479,7 +479,18 @@ namespace embroideryReader
settings.windowHeight = this.Height;
}
}
settings.save();
try
{
settings.save();
}
catch (System.IO.IOException /*ioex*/)
{
// Ignore IO exceptions when saving settings file, to deal with crashes caused by
// closing many windows at once.
// This isn't a great way to handle the problem, but it's better than getting
// the same automated error report over and over.
}
}
private string CurrentVersion()

Wyświetl plik

@ -135,6 +135,9 @@ namespace embroideryReader
// Save translation setting
settings.translation = availableTranslations[cmbLanguage.SelectedIndex].Item2;
// Save settings file
settings.save();
}
public Translation setTranslation