Better display of translated puzzle titles

This commit is contained in:
Tim Young 2017-10-16 10:31:20 -05:00
parent c027a0335a
commit 827ed75240

View File

@ -19,9 +19,13 @@ namespace EduNetworkBuilder
{
public string Title;
public string PuzzleName;
public bool isdone = false;
public string level = "";
public override string ToString()
{
return this.Title;
string donstr = "";
if (isdone) donstr = "* ";
return donstr + level + " " + this.Title;
}
}
public partial class ListBoxWindow : Form
@ -251,7 +255,6 @@ namespace EduNetworkBuilder
puzzle_name = pi.PuzzleName;
if (oursettings.CheckIfDone(str))
{
shown_name = "* " + shown_name;
wasfinished = true;
}
foreach (string tag in pi.PuzzleTags)
@ -261,6 +264,8 @@ namespace EduNetworkBuilder
MyPuzzleEntry MPE = new MyPuzzleEntry();
MPE.PuzzleName = puzzle_name;
MPE.Title = shown_name;
MPE.isdone = wasfinished;
MPE.level = tag;
if(selected == "" && !wasfinished) selected = shown_name; //Select the first unfinished puzzle
lbWindowData.Items.Add(MPE);
break;
@ -276,12 +281,13 @@ namespace EduNetworkBuilder
string localFilter = ".*" + FilterString + ".*";
if (oursettings.ScoreList.Contains(str))
{
shown_name = "* " + shown_name;
wasfinished = true;
}
MyPuzzleEntry MPE = new MyPuzzleEntry();
MPE.PuzzleName = puzzle_name;
MPE.Title = shown_name;
MPE.isdone = wasfinished;
MPE.level = "Level_" + pi.Level;
if (!added && pi.PuzzleName != null && Regex.IsMatch(pi.PuzzleName, localFilter, RegexOptions.IgnoreCase))
{