Fix startup bug when running for first time

This commit is contained in:
Tim Young 2017-07-28 18:06:41 -05:00
parent 5db0ffac9d
commit e0a65412dd
1 changed files with 7 additions and 1 deletions

View File

@ -43,7 +43,10 @@ namespace EduNetworkBuilder
{
if (FromClass == null) return; //Break if we are going to error out.
if (ToClass == null) return; //Break if we are going to error out.
//
//
if (Properties.Settings.Default.ScoreList == null)
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
ToClass.LastPath = FromClass.LastPath;
ToClass.AutoStartPuzzles = FromClass.AutoStartPuzzles;
ToClass.ChosenLanguage = FromClass.ChosenLanguage;
@ -84,6 +87,9 @@ namespace EduNetworkBuilder
}
else
{
if (Properties.Settings.Default.ScoreList == null)
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
LastPath = Properties.Settings.Default.LastPath;
AutoStartPuzzles = Properties.Settings.Default.AutoStartPuzzles;
ChosenLanguage = Properties.Settings.Default.ChosenLanguage;