fix small glitch where it kept wanting us to select a new language.

This commit is contained in:
Tim Young 2017-07-31 16:36:07 -05:00
parent 857c8750ba
commit 60444ee81c
2 changed files with 15 additions and 3 deletions

View File

@ -227,11 +227,18 @@ namespace EduNetworkBuilder
{
if (Properties.Settings.Default.ScoreList == null)
Properties.Settings.Default.ScoreList = new System.Collections.Specialized.StringCollection();
if(NB.GetUser() == null)
{
Properties.Settings.Default.AutoStartPuzzles = AutoStartPuzzles;
Properties.Settings.Default.LanguageHasBeenChosen = LanguageHasBeenChosen;
}
else
{
Properties.Settings.Default.AutoStartPuzzles = AutoStartPuzzles;
Properties.Settings.Default.LanguageHasBeenChosen = LanguageHasBeenChosen;
}
Properties.Settings.Default.LastPath = LastPath;
Properties.Settings.Default.AutoStartPuzzles = AutoStartPuzzles;
Properties.Settings.Default.ChosenLanguage = ChosenLanguage;
Properties.Settings.Default.LanguageHasBeenChosen = LanguageHasBeenChosen;
Properties.Settings.Default.MainWindowX = MainWindowX;
Properties.Settings.Default.MainWindowY = MainWindowY;
Properties.Settings.Default.MainWindowHeight = MainWindowHeight;

View File

@ -62,6 +62,8 @@ namespace EduNetworkBuilder
if (CurrentUser == null && FileName == "")
{
//Prompt for a username
NBSettings oldsettings = NB.GetSettings(); //Grab the old settings.
String Dest = NB.TextPromptBox(NB.Translate("PPF_EnterUserName"));
if (Dest == "") { Close(); return; }//No name given or canceled.
if (Dest == null) { Close(); return; }
@ -76,6 +78,9 @@ namespace EduNetworkBuilder
OFD.FileName = NB.Translate("PPF_SelectThisFolder");
OFD.ShowDialog();
CurrentUser.filepath = Path.GetDirectoryName(OFD.FileName);
CurrentUser.UserSettings.AutoStartPuzzles = false;
CurrentUser.UserSettings.ChosenLanguage = oldsettings.ChosenLanguage;
CurrentUser.UserSettings.LanguageHasBeenChosen = true;
}
else if (CurrentUser == null)
{