Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show update version - code included #53

Open
mrdude2478 opened this issue Mar 10, 2020 · 0 comments
Open

Show update version - code included #53

mrdude2478 opened this issue Mar 10, 2020 · 0 comments

Comments

@mrdude2478
Copy link

mrdude2478 commented Mar 10, 2020

Please add this code to show what version update is present when reading the update nsp.

Example code below.

if (xmlVersion.Trim() == "")
                        {
                            TB_GameRev.Text = NACP.NACP_Datas[0].GameVer.Replace("\0", "");
                        }
                        else
                        {
                            //TB_GameRev.Text = NACP.NACP_Datas[0].GameVer.Replace("\0", "") + " (" + xmlVersion + ")";

                            TB_GameRev.Text = xmlVersion + " (" + NACP.NACP_Datas[0].GameVer.Replace("\0", "") + ")";
                            string stringToCheck = xmlVersion;

                            int maxupdates = 50; //max number of game updates
                            string[] stringArray = new string[maxupdates];
                            int val = 65536;

                            for (int i = 0; i < maxupdates; i++)
                            {
                                stringArray[i] = (val).ToString();
                                val = (val + 65536);
                            }


                            foreach (string x in stringArray)
                            {
                                if (stringToCheck.Contains(x))
                                {
                                    int number = System.Convert.ToInt32(x);
                                    int divideby = 65536;
                                    TB_GameRev.Text = "Update " + ((double)number / divideby) + " (" + xmlVersion + ")";
                                }
                            }

                        }
                        TB_ProdCode.Text = NACP.NACP_Datas[0].GameProd.Replace("\0", "");
                        if (TB_ProdCode.Text == "")
                        {
                            TB_ProdCode.Text = "No Prod. ID";
                        }

Cheers.

See screenshot (in red box), for what I mean...

GitHub Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant