Skip to content

Commit

Permalink
shown-status are saved in library
Browse files Browse the repository at this point in the history
  • Loading branch information
cadon committed Mar 21, 2016
1 parent 66fea26 commit b92be6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ARKBreedingStats/CreatureCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ namespace ARKBreedingStats
[XmlArray]
public List<string> hiddenOwners = new List<string>(); // which owners are not selected to be shown
[XmlArray]
public bool[] shownStatus; // which status are selected to be shown
public bool[] shownStatus = new bool[2]; // which status are selected to be shown. 0: dead, 1: unavailable
}
}
6 changes: 6 additions & 0 deletions ARKBreedingStats/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,10 @@ private void loadCollectionFile(String fileName, bool keepCurrentCreatures = fal
currentFileName = fileName;
creatureBoxListView.Clear();
}
filterListAllowed = false;
checkBoxShowDead.Checked = creatureCollection.shownStatus[0];
checkBoxShowUnavailableCreatures.Checked = creatureCollection.shownStatus[1];
filterListAllowed = true;

setCollectionChanged(keepCurrentCreatures);
// creatures loaded.
Expand Down Expand Up @@ -1578,11 +1582,13 @@ private void listViewLibrary_SelectedIndexChanged(object sender, EventArgs e)

private void checkBoxShowDead_CheckedChanged(object sender, EventArgs e)
{
creatureCollection.shownStatus[0] = checkBoxShowDead.Checked;
filterLib();
}

private void checkBoxShowUnavailableCreatures_CheckedChanged(object sender, EventArgs e)
{
creatureCollection.shownStatus[1] = checkBoxShowUnavailableCreatures.Checked;
filterLib();
}

Expand Down

0 comments on commit b92be6d

Please sign in to comment.