Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-12 06:54:02 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-02-12 06:54:16 +0300
commit7583fcbae1fb9ac58c52231e2439fff630e13c47 (patch)
tree0261d3451b338594efbd81458c36e4732fb10888 /NesMenuCollection.cs
parentab13256978013752786e6fd118d40a5a3856fea3 (diff)
Huge rework to add support for applications and non-NES games
Diffstat (limited to 'NesMenuCollection.cs')
-rw-r--r--NesMenuCollection.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/NesMenuCollection.cs b/NesMenuCollection.cs
index 70cde994..a4acb8fb 100644
--- a/NesMenuCollection.cs
+++ b/NesMenuCollection.cs
@@ -101,8 +101,8 @@ namespace com.clusterrr.hakchi_gui
root.Clear();
foreach (var coll in collections)
{
- var fname = alphaNum.Replace(coll.Where(o => (o is NesGame) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
- var lname = alphaNum.Replace(coll.Where(o => (o is NesGame) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
+ var fname = alphaNum.Replace(coll.Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
+ var lname = alphaNum.Replace(coll.Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
var folder = new NesMenuFolder() { ChildMenuCollection = coll, NameParts = new string[] { fname, lname }, Position = NesMenuFolder.Priority.Right };
coll.Add(new NesMenuFolder() { Name = Resources.FolderNameBack, ImageId = "folder_back", Position = NesMenuFolder.Priority.Back, ChildMenuCollection = root });
@@ -120,8 +120,8 @@ namespace com.clusterrr.hakchi_gui
{
for (int j = i - 1; j >= 0; j--)
{
- var fname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
- var lname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
+ var fname = alphaNum.Replace(collections[j].Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
+ var lname = alphaNum.Replace(collections[j].Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
var folder = new NesMenuFolder()
{
ChildMenuCollection = collections[j],
@@ -132,8 +132,8 @@ namespace com.clusterrr.hakchi_gui
}
for (int j = i + 1; j < collections.Count; j++)
{
- var fname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
- var lname = alphaNum.Replace(collections[j].Where(o => (o is NesGame) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
+ var fname = alphaNum.Replace(collections[j].Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).First().Name.ToUpper(), "");
+ var lname = alphaNum.Replace(collections[j].Where(o => (o is NesMiniApplication) || (o is NesDefaultGame)).Last().Name.ToUpper(), "");
var folder = new NesMenuFolder()
{
ChildMenuCollection = collections[j],
@@ -153,7 +153,7 @@ namespace com.clusterrr.hakchi_gui
letters['#'] = new NesMenuCollection();
foreach (var game in root)
{
- if (!(game is NesGame || game is NesDefaultGame)) continue;
+ if (!(game is NesMiniApplication || game is NesDefaultGame)) continue;
var letter = game.Name.Substring(0, 1).ToUpper()[0];
if (letter < 'A' || letter > 'Z')
letter = '#';