Minor bug with incorrect dat showing when we select a homework

This commit is contained in:
Tim Young 2017-07-31 17:17:17 -05:00
parent 746e9edb36
commit e5512b06b0

View File

@ -85,6 +85,7 @@ namespace EduNetworkBuilder
CurrentUser.UserSettings.AutoStartPuzzles = false;
CurrentUser.UserSettings.ChosenLanguage = oldsettings.ChosenLanguage;
CurrentUser.UserSettings.LanguageHasBeenChosen = true;
}
else if (CurrentUser == null)
{
@ -108,6 +109,8 @@ namespace EduNetworkBuilder
tbHWSubmitted.LostFocus += SaveSchoolworkDataFromForm;
dtpHWDue.LostFocus += SaveSchoolworkDataFromForm;
tcTabControl.SelectedIndexChanged += UpdateFormFromSchoolwork;
//Make sure we update any profile settings they change
tbFullName.LostFocus += SaveUserInfoFromForm;
}
@ -289,6 +292,10 @@ namespace EduNetworkBuilder
ViewedSchoolwork.Name = tbHWName.Text;
ViewedSchoolwork.DueDate = dtpHWDue.Value;
}
private void UpdateFormFromSchoolwork(object sender, EventArgs e)
{
UpdateFormFromSchoolwork();
}
private void UpdateFormFromSchoolwork(SchoolworkClass What)
{
@ -323,7 +330,7 @@ namespace EduNetworkBuilder
else
{
tbHWSubmitted.Visible = false;
lblHWDue.Visible = false;
lblHWSubmitted.Visible = false;
}
if (ViewedSchoolwork.DueDate < dtpHWDue.MinDate) ViewedSchoolwork.DueDate = dtpHWDue.MinDate;
dtpHWDue.Value = ViewedSchoolwork.DueDate;