Deal with "recent" files that get deleted. Show a file not found error.

This commit is contained in:
Tim Young 2017-08-03 11:46:27 -05:00
parent e8c8369176
commit 69df135025
2 changed files with 12 additions and 1 deletions

View File

@ -1720,7 +1720,14 @@ namespace EduNetworkBuilder
if (filename == "")
{
MessageBox.Show(NB.Translate("NB_InvalidFile"));
Close();
//Close();
return;
}
if (!File.Exists(filename))
{
MessageBox.Show(string.Format(NB.Translate("NB_NoSuchFile"),filename));
//Close();
return;
}
//If it is a network file
string extension = Path.GetExtension(filename).ToLower();

View File

@ -1773,6 +1773,10 @@
<value>Mark As Graded</value>
<comment>NB_MarkGraded = Mark As Graded</comment>
</data>
<data name="NB_NoSuchFile" xml:space="preserve">
<value>File does not exist: {0}</value>
<comment>NB_NoSuchFile = File does not exist: {0}</comment>
</data>
<data name="NB_NotImplimented" xml:space="preserve">
<value>This feature is not yet implimented.</value>
<comment>NB_NotImplimented = This feature is not yet implimented.</comment>