Error out if double-clicking a homework file. We need to load a user profile so the homework can be added to it.

This commit is contained in:
Tim Young 2017-07-31 19:54:00 -05:00
parent 2bd146857a
commit 83dfef6ad2
2 changed files with 12 additions and 0 deletions

View File

@ -1708,6 +1708,14 @@ namespace EduNetworkBuilder
CurrentUser = PPF.Edit(); //This does the form as dialog. When we come back, update the menu. CurrentUser = PPF.Edit(); //This does the form as dialog. When we come back, update the menu.
UpdateMenu(); UpdateMenu();
} }
else if (extension == ".enbh")
{
if(NB.GetUser() == null)
{
MessageBox.Show(NB.Translate("NB_LoadUserFirst"));
return;
}
}
else else
{ {
MessageBox.Show(NB.Translate("NB_InvalidFile")); MessageBox.Show(NB.Translate("NB_InvalidFile"));

View File

@ -1765,6 +1765,10 @@
<value>Are you sure you want to delete this homework?</value> <value>Are you sure you want to delete this homework?</value>
<comment>PPF_ConfirmHWDelete = Are you sure you want to delete this homework?</comment> <comment>PPF_ConfirmHWDelete = Are you sure you want to delete this homework?</comment>
</data> </data>
<data name="NB_LoadUserFirst" xml:space="preserve">
<value>You must load a user profile before you can open a homework file.</value>
<comment>NB_LoadUserFirst = You must load a user profile before you can open a homework file.</comment>
</data>
<data name="PPF_ChangePassword" xml:space="preserve"> <data name="PPF_ChangePassword" xml:space="preserve">
<value>Change Password</value> <value>Change Password</value>
<comment>PPF_ChangePassword = Change Password</comment> <comment>PPF_ChangePassword = Change Password</comment>