Better display of translated puzzle titles
This commit is contained in:
parent
c027a0335a
commit
827ed75240
@ -19,9 +19,13 @@ namespace EduNetworkBuilder
|
|||||||
{
|
{
|
||||||
public string Title;
|
public string Title;
|
||||||
public string PuzzleName;
|
public string PuzzleName;
|
||||||
|
public bool isdone = false;
|
||||||
|
public string level = "";
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return this.Title;
|
string donstr = "";
|
||||||
|
if (isdone) donstr = "* ";
|
||||||
|
return donstr + level + " " + this.Title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public partial class ListBoxWindow : Form
|
public partial class ListBoxWindow : Form
|
||||||
@ -251,7 +255,6 @@ namespace EduNetworkBuilder
|
|||||||
puzzle_name = pi.PuzzleName;
|
puzzle_name = pi.PuzzleName;
|
||||||
if (oursettings.CheckIfDone(str))
|
if (oursettings.CheckIfDone(str))
|
||||||
{
|
{
|
||||||
shown_name = "* " + shown_name;
|
|
||||||
wasfinished = true;
|
wasfinished = true;
|
||||||
}
|
}
|
||||||
foreach (string tag in pi.PuzzleTags)
|
foreach (string tag in pi.PuzzleTags)
|
||||||
@ -261,6 +264,8 @@ namespace EduNetworkBuilder
|
|||||||
MyPuzzleEntry MPE = new MyPuzzleEntry();
|
MyPuzzleEntry MPE = new MyPuzzleEntry();
|
||||||
MPE.PuzzleName = puzzle_name;
|
MPE.PuzzleName = puzzle_name;
|
||||||
MPE.Title = shown_name;
|
MPE.Title = shown_name;
|
||||||
|
MPE.isdone = wasfinished;
|
||||||
|
MPE.level = tag;
|
||||||
if(selected == "" && !wasfinished) selected = shown_name; //Select the first unfinished puzzle
|
if(selected == "" && !wasfinished) selected = shown_name; //Select the first unfinished puzzle
|
||||||
lbWindowData.Items.Add(MPE);
|
lbWindowData.Items.Add(MPE);
|
||||||
break;
|
break;
|
||||||
@ -276,12 +281,13 @@ namespace EduNetworkBuilder
|
|||||||
string localFilter = ".*" + FilterString + ".*";
|
string localFilter = ".*" + FilterString + ".*";
|
||||||
if (oursettings.ScoreList.Contains(str))
|
if (oursettings.ScoreList.Contains(str))
|
||||||
{
|
{
|
||||||
shown_name = "* " + shown_name;
|
|
||||||
wasfinished = true;
|
wasfinished = true;
|
||||||
}
|
}
|
||||||
MyPuzzleEntry MPE = new MyPuzzleEntry();
|
MyPuzzleEntry MPE = new MyPuzzleEntry();
|
||||||
MPE.PuzzleName = puzzle_name;
|
MPE.PuzzleName = puzzle_name;
|
||||||
MPE.Title = shown_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))
|
if (!added && pi.PuzzleName != null && Regex.IsMatch(pi.PuzzleName, localFilter, RegexOptions.IgnoreCase))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user