From cebb9df3ff0db80a431b950c176d3715e3b84dc5 Mon Sep 17 00:00:00 2001 From: givememystuffplease Date: Thu, 12 Aug 2010 01:08:25 +0000 Subject: [PATCH] Alphabatized database listings... form seems to be slowing during the process again, must be fixed... --- NUS Downloader/Form1.cs | 226 ++++++----------------- NUS Downloader/Latest/NUS Downloader.exe | Bin 427008 -> 427520 bytes NUS Downloader/NusClient.cs | 8 +- 3 files changed, 66 insertions(+), 168 deletions(-) diff --git a/NUS Downloader/Form1.cs b/NUS Downloader/Form1.cs index dc8b3ac..53aee10 100644 --- a/NUS Downloader/Form1.cs +++ b/NUS Downloader/Form1.cs @@ -924,149 +924,6 @@ namespace NUS_Downloader SetPropertyThreadSafe(WiiWareMenuList, true, "Visible"); worker.ReportProgress(100); - /* - // Load database.xml into memorystream to perhaps reduce disk reads? - string databasestr = File.ReadAllText(Path.Combine(CURRENT_DIR, "database.xml")); - System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); - byte[] databasebytes = encoding.GetBytes(databasestr); - - // Load the memory stream - MemoryStream databaseStream = new MemoryStream(databasebytes); - databaseStream.Seek(0, SeekOrigin.Begin); - - XmlDocument xDoc = new XmlDocument(); - xDoc.Load(databaseStream); - - // Variables - string[] XMLNodeTypes = new string[5] {"SYS", "IOS", "VC", "WW", "UPD"}; - - int totalLength = xDoc.SelectNodes("/database/*").Count; - int rnt = 0; - // Loop through XMLNodeTypes - for (int i = 0; i < XMLNodeTypes.Length; i++) - { - XmlNodeList XMLSpecificNodeTypeList = xDoc.GetElementsByTagName(XMLNodeTypes[i]); - - for (int x = 0; x < XMLSpecificNodeTypeList.Count; x++) - { - ToolStripMenuItem XMLToolStripItem = new ToolStripMenuItem(); - XmlAttributeCollection XMLAttributes = XMLSpecificNodeTypeList[x].Attributes; - - string titleID = ""; - string updateScript; - string descname = ""; - bool dangerous = false; - bool ticket = true; - - // Okay, so now report the progress... - rnt = rnt + 1; - float currentProgress = ((float) rnt/(float) totalLength)*(float) 100; - if (Convert.ToInt16(Math.Round(currentProgress))%10 == 0) - worker.ReportProgress(Convert.ToInt16(Math.Round(currentProgress))); - - // Lol. - XmlNodeList ChildrenOfTheNode = XMLSpecificNodeTypeList[x].ChildNodes; - - for (int z = 0; z < ChildrenOfTheNode.Count; z++) - { - switch (ChildrenOfTheNode[z].Name) - { - case "name": - descname = ChildrenOfTheNode[z].InnerText; - break; - case "titleID": - titleID = ChildrenOfTheNode[z].InnerText; - break; - case "titleIDs": - updateScript = ChildrenOfTheNode[z].InnerText; - XMLToolStripItem.AccessibleDescription = updateScript; - // TODO: Find somewhere better to put this. AND FAST. - break; - case "version": - string[] versions = ChildrenOfTheNode[z].InnerText.Split(','); - // Add to region things? - if (XMLToolStripItem.DropDownItems.Count > 0) - { - for (int b = 0; b < XMLToolStripItem.DropDownItems.Count; b++) - { - if (ChildrenOfTheNode[z].InnerText != "") - { - ToolStripMenuItem regitem = - (ToolStripMenuItem) XMLToolStripItem.DropDownItems[b]; - regitem.DropDownItems.Add("Latest Version"); - for (int y = 0; y < versions.Length; y++) - { - regitem.DropDownItems.Add("v" + versions[y]); - } - regitem.DropDownItemClicked += - new ToolStripItemClickedEventHandler(deepitem_clicked); - } - } - } - else - { - XMLToolStripItem.DropDownItems.Add("Latest Version"); - if (ChildrenOfTheNode[z].InnerText != "") - { - for (int y = 0; y < versions.Length; y++) - { - XMLToolStripItem.DropDownItems.Add("v" + versions[y]); - } - } - } - break; - case "region": - string[] regions = ChildrenOfTheNode[z].InnerText.Split(','); - if (ChildrenOfTheNode[z].InnerText != "") - { - for (int y = 0; y < regions.Length; y++) - { - XMLToolStripItem.DropDownItems.Add(RegionFromIndex(Convert.ToInt32(regions[y]), - xDoc)); - } - } - break; - default: - break; - case "ticket": - ticket = Convert.ToBoolean(ChildrenOfTheNode[z].InnerText); - break; - case "danger": - dangerous = true; - XMLToolStripItem.ToolTipText = ChildrenOfTheNode[z].InnerText; - break; - } - XMLToolStripItem.Image = SelectItemImage(ticket, dangerous); - - if (titleID != "") - { - XMLToolStripItem.Text = String.Format("{0} - {1}", titleID, descname); - } - else - { - XMLToolStripItem.Text = descname; - } - } - AddToolStripItemToStrip(i, XMLToolStripItem, XMLAttributes); - } - // Now enable the specific toolbar - switch (XMLNodeTypes[i]) - { - case "IOS": - //IOSMenuList.Enabled = true; - SetPropertyThreadSafe(IOSMenuList, true, "Enabled"); - break; - case "SYS": - - break; - case "VC": - SetPropertyThreadSafe(VCMenuList, true, "Enabled"); - break; - case "WW": - SetPropertyThreadSafe(WiiWareMenuList, true, "Enabled"); - break; - } - }*/ } /// @@ -1077,15 +934,52 @@ namespace NUS_Downloader /// The attributes. private void AddToolStripItemToStrip(ToolStripMenuItem menulist, ToolStripMenuItem additionitem) { + //Control.CheckForIllegalCrossThreadCalls = false; //Debug.WriteLine(String.Format("Adding item")); - + if (this.InvokeRequired) { //Debug.WriteLine("InvokeRequired..."); AddToolStripItemToStripCallback atsitsc = new AddToolStripItemToStripCallback(AddToolStripItemToStrip); - this.Invoke(atsitsc, new object[] {menulist, additionitem}); + this.Invoke(atsitsc, new object[] { menulist, additionitem }); return; } + + // Do not sort IOS menu (alphabetization fail) + if (menulist.Text == IOSMenuList.Text) + { + menulist.DropDownItems.Add(additionitem); + return; + } + + if (menulist.DropDownItems.Count < 1) + { + menulist.DropDownItems.Add(additionitem); + return; + } + + // Sorting of items by name 18 chars in... + //try + //{ + for (int a = 0; a < menulist.DropDownItems.Count; a++) + { + if (menulist.DropDownItems[a].Text + .Substring(18, menulist.DropDownItems[a].Text.Length - 19) + .CompareTo(additionitem.Text.Substring(18, additionitem.Text.Length - 19)) == 1) + { + menulist.DropDownItems.Insert((a), additionitem); + return; + } + + + } + //} + + //catch (Exception) + //{ + //Debug.WriteLine("Tryfail at : " + additionitem.Text); + //menulist.DropDownItems.Add(additionitem); + //} menulist.DropDownItems.Add(additionitem); } @@ -2529,33 +2423,33 @@ namespace NUS_Downloader { Debug.WriteLine("Delta: " + e.Delta.ToString()); - if (SystemMenuList.DropDown.DisplayRectangle.Contains(e.Location) || SystemMenuList.DropDown.Bounds.Contains(e.Location)) - { - if (e.Delta > 0) - System.Windows.Forms.SendKeys.Send("{UP}"); - else - System.Windows.Forms.SendKeys.Send("{DOWN}"); - //do what you want here - } - - if (WiiWareMenuList.DropDown.DisplayRectangle.Contains(e.Location) || WiiWareMenuList.DropDown.Bounds.Contains(e.Location)) + if (SystemMenuList.DropDown.DisplayRectangle.Contains(e.Location) || + SystemMenuList.DropDown.Bounds.Contains(e.Location) || + WiiWareMenuList.DropDown.DisplayRectangle.Contains(e.Location) || + WiiWareMenuList.DropDown.Bounds.Contains(e.Location) || + VCMenuList.DropDown.DisplayRectangle.Contains(e.Location) || + VCMenuList.DropDown.Bounds.Contains(e.Location) || + IOSMenuList.DropDown.DisplayRectangle.Contains(e.Location) || + IOSMenuList.DropDown.Bounds.Contains(e.Location)) { if (e.Delta > 0) + { System.Windows.Forms.SendKeys.Send("{UP}"); - else - System.Windows.Forms.SendKeys.Send("{DOWN}"); - //do what you want here - } - - if (VCMenuList.DropDown.DisplayRectangle.Contains(e.Location) || VCMenuList.DropDown.Bounds.Contains(e.Location)) - { - if (e.Delta > 0) System.Windows.Forms.SendKeys.Send("{UP}"); + System.Windows.Forms.SendKeys.Send("{UP}"); + System.Windows.Forms.SendKeys.Send("{UP}"); + System.Windows.Forms.SendKeys.Send("{UP}"); + } else + { System.Windows.Forms.SendKeys.Send("{DOWN}"); - //do what you want here - } - + System.Windows.Forms.SendKeys.Send("{DOWN}"); + System.Windows.Forms.SendKeys.Send("{DOWN}"); + System.Windows.Forms.SendKeys.Send("{DOWN}"); + System.Windows.Forms.SendKeys.Send("{DOWN}"); + } + + } } } } \ No newline at end of file diff --git a/NUS Downloader/Latest/NUS Downloader.exe b/NUS Downloader/Latest/NUS Downloader.exe index a44f7d721c626e9416019b6595c7d3b00de0c827..c232421a7c0f98fec166ec3d67b07a01afd52cf1 100644 GIT binary patch delta 20664 zcmd^nd3Y4X)_zsbOwW=8GB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Zo> lKOLuZ`oTEt{${6)jm=J(E-w>~v~N5&RO~~QgqMU@{}1D#Ow0fP diff --git a/NUS Downloader/NusClient.cs b/NUS Downloader/NusClient.cs index 3574e7d..9e7b194 100644 --- a/NUS Downloader/NusClient.cs +++ b/NUS Downloader/NusClient.cs @@ -370,8 +370,12 @@ namespace libWiiSharp fireProgress(10); // Parse Ticket - fireDebug(" Parsing Ticket..."); - Ticket tik = Ticket.Load(Path.Combine(outputDir, "cetk")); + Ticket tik = new Ticket(); + if (File.Exists(Path.Combine(outputDir, "cetk"))) + { + fireDebug(" Parsing Ticket..."); + tik = Ticket.Load(Path.Combine(outputDir, "cetk")); + } string[] encryptedContents = new string[tmd.NumOfContents];