Skip to content

Commit

Permalink
Im not sure what i did and i dont care
Browse files Browse the repository at this point in the history
  • Loading branch information
ekeleze committed Nov 16, 2023
1 parent bc9077c commit 3a1e7d6
Showing 1 changed file with 22 additions and 70 deletions.
92 changes: 22 additions & 70 deletions GoOS/GUI/Apps/GoStore/MainFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ public class MainFrame : Window
{
Button[] catagoryButtons = new Button[7];

readonly List<string> Catagories = new()
{
"Utilities",
"Games",
"Demos",
"Development",
"Updates",
"Office",
"Production",
};
readonly List<string> Catagories = new();
/*
* == RC Release Notice.
* TODO: This is bad practice as the list is stored on the client so as more categories are added the client will be unable to display apps from them.
Expand Down Expand Up @@ -74,9 +65,18 @@ public class MainFrame : Window
* TODO: Prevent Release Candidate or Release builds until this is resolved.
* - Owen2k6 DO NOT REMOVE.
*/

/*
* == RC Release Notice.
* TODO: Do it yourself, you added this part.
* TODO: I will only fix what I made badly, not what you made badly.
* - ekeleze DO NOT REMOVE
*/

public MainFrame()
{
Catagories = new List<string> { GetInfoFile(@"http://api.goos.owen2k6.com/GoOS/cat.gostore") };

// Get the file list from every repo
string[][] infoFiles =
{
Expand Down Expand Up @@ -203,36 +203,12 @@ private void dostuff()

int appCat = 0;

switch (repoFiles[i].Item6)
for (int ii = 0; ii < Catagories.Count; ii++)
{
case "Utilities":
appCat = 0;
break;
case "Games":
appCat = 1;
break;
case "Demos":
appCat = 2;
break;
case "Development":
appCat = 3;
break;
case "Updates":
appCat = 4;
break;
case "Office":
appCat = 5;
break;
case "Production":
appCat = 6;
break;

/*
* == RC Release Notice.
* TODO: This is bad practice as the list is stored on the client so as more categories are added the client will be unable to display apps from them.
* TODO: Prevent Release Candidate or Release builds until this is resolved.
* - Owen2k6 DO NOT REMOVE.
*/
if (repoFiles[i].Item6 == Catagories[ii])
{
appCat = ii;
}
}

if (Colum >= 3 && Line >= 6 && appCat == catagory)
Expand Down Expand Up @@ -430,40 +406,16 @@ private void repoFiles_Click(string i)

private void CatgoryAction(string name)
{
switch (name)
for (int ii = 0; ii < Catagories.Count; ii++)
{
case "Utilities":
catagory = 0;
break;
case "Games":
catagory = 1;
break;
case "Demos":
catagory = 2;
break;
case "Development":
catagory = 3;
break;
case "Updates":
catagory = 4;
break;
case "Office":
catagory = 5;
break;
case "Production":
catagory = 6;
break;

/*
* == RC Release Notice.
* TODO: This is bad practice as the list is stored on the client so as more categories are added the client will be unable to display apps from them.
* TODO: Prevent Release Candidate or Release builds until this is resolved.
* - Owen2k6 DO NOT REMOVE.
*/
if (name == Catagories[ii])
{
catagory = ii;
}
}

dostuff(); // 565

switch (name)
{
case "Utilities":
Expand All @@ -487,7 +439,7 @@ private void CatgoryAction(string name)
case "Production":
Contents.DrawString(33, 563, "Production", Font_1x, Color.White);
break;

/*
* == RC Release Notice.
* TODO: This is bad practice as the list is stored on the client so as more categories are added the client will be unable to display apps from them.
Expand Down

0 comments on commit 3a1e7d6

Please sign in to comment.