From 69df13502547c910480785e2fdaad55307d45b1c Mon Sep 17 00:00:00 2001 From: Tim Young Date: Thu, 3 Aug 2017 11:46:27 -0500 Subject: [PATCH] Deal with "recent" files that get deleted. Show a file not found error. --- EduNetworkBuilder/NetworkBuilder.cs | 9 ++++++++- EduNetworkBuilder/Resources/languages/edustrings.resx | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/EduNetworkBuilder/NetworkBuilder.cs b/EduNetworkBuilder/NetworkBuilder.cs index 66232a4..1b7fb83 100644 --- a/EduNetworkBuilder/NetworkBuilder.cs +++ b/EduNetworkBuilder/NetworkBuilder.cs @@ -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(); diff --git a/EduNetworkBuilder/Resources/languages/edustrings.resx b/EduNetworkBuilder/Resources/languages/edustrings.resx index 0cb465e..98309a8 100644 --- a/EduNetworkBuilder/Resources/languages/edustrings.resx +++ b/EduNetworkBuilder/Resources/languages/edustrings.resx @@ -1773,6 +1773,10 @@ Mark As Graded NB_MarkGraded = Mark As Graded + + File does not exist: {0} + NB_NoSuchFile = File does not exist: {0} + This feature is not yet implimented. NB_NotImplimented = This feature is not yet implimented.