Database updates continued.

Icon Changed.
This commit is contained in:
givememystuffplease 2010-07-10 02:55:06 +00:00
parent 999d8bd4cf
commit 15a7ad7893
11 changed files with 2032 additions and 1877 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -25,11 +25,11 @@ namespace NUS_Downloader
private string databaseString; private string databaseString;
private Image green = Properties.Resources.bullet_green; public static Image green = Properties.Resources.bullet_green;
private Image orange = Properties.Resources.bullet_orange; public static Image orange = Properties.Resources.bullet_orange;
private Image redorb = Properties.Resources.bullet_red; public static Image redorb = Properties.Resources.bullet_red;
private Image redgreen = Properties.Resources.bullet_redgreen; public static Image redgreen = Properties.Resources.bullet_redgreen;
private Image redorange = Properties.Resources.bullet_redorange; public static Image redorange = Properties.Resources.bullet_redorange;
public void LoadDatabaseToStream(string databaseFile) public void LoadDatabaseToStream(string databaseFile)
{ {
@ -57,6 +57,15 @@ namespace NUS_Downloader
return Attributes[0].Value; return Attributes[0].Value;
} }
public static string GetDatabaseVersion(string databaseString)
{
XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(databaseString);
XmlNodeList DatabaseList = xDoc.GetElementsByTagName("database");
XmlAttributeCollection Attributes = DatabaseList[0].Attributes;
return Attributes[0].Value;
}
public ToolStripMenuItem[] LoadSystemTitles() public ToolStripMenuItem[] LoadSystemTitles()
{ {
if (databaseString.Length < 1) if (databaseString.Length < 1)
@ -528,5 +537,42 @@ namespace NUS_Downloader
return null; return null;
} }
/// <summary>
/// Loads the region codes.
/// </summary>
public ToolStripMenuItem[] LoadRegionCodes()
{
/* TODO: make this check InvokeRequired...
if (this.InvokeRequired)
{
Debug.Write("TOLDYOUSO!");
BootChecksCallback bcc = new BootChecksCallback(LoadRegionCodes);
this.Invoke(bcc);
return;
}*/
if (databaseString.Length < 1)
{
throw new Exception("Load the database into a memory stream first!");
}
XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(databaseString);
XmlNodeList XMLRegionList = xDoc.GetElementsByTagName("REGIONS");
XmlNodeList ChildrenOfTheNode = XMLRegionList[0].ChildNodes;
ToolStripMenuItem[] regionItems = new ToolStripMenuItem[ChildrenOfTheNode.Count];
// For each child node (region node)
for (int z = 0; z < ChildrenOfTheNode.Count; z++)
{
regionItems[z] = new ToolStripMenuItem();
regionItems[z].Text = ChildrenOfTheNode[z].InnerText;
}
return regionItems;
}
} }
} }

View File

@ -43,7 +43,6 @@ namespace NUS_Downloader
this.NUSDownloader = new System.ComponentModel.BackgroundWorker(); this.NUSDownloader = new System.ComponentModel.BackgroundWorker();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.wadnamebox = new System.Windows.Forms.TextBox(); this.wadnamebox = new System.Windows.Forms.TextBox();
this.databaseButton = new System.Windows.Forms.Button();
this.databaseStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.databaseStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.SystemMenuList = new System.Windows.Forms.ToolStripMenuItem(); this.SystemMenuList = new System.Windows.Forms.ToolStripMenuItem();
this.IOSMenuList = new System.Windows.Forms.ToolStripMenuItem(); this.IOSMenuList = new System.Windows.Forms.ToolStripMenuItem();
@ -64,19 +63,14 @@ namespace NUS_Downloader
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.RegionCodesList = new System.Windows.Forms.ToolStripMenuItem(); this.RegionCodesList = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
this.updateDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.extrasStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.extrasStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.loadInfoFromTMDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.proxySettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.aboutNUSDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.proxyBox = new System.Windows.Forms.GroupBox(); this.proxyBox = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.ProxyUser = new System.Windows.Forms.TextBox(); this.ProxyUser = new System.Windows.Forms.TextBox();
this.SaveProxyBtn = new System.Windows.Forms.Button(); this.SaveProxyBtn = new System.Windows.Forms.Button();
this.ProxyAssistBtn = new System.Windows.Forms.Button();
this.ProxyURL = new System.Windows.Forms.TextBox(); this.ProxyURL = new System.Windows.Forms.TextBox();
this.ProxyVerifyBox = new System.Windows.Forms.GroupBox(); this.ProxyVerifyBox = new System.Windows.Forms.GroupBox();
this.SaveProxyPwdPermanentBtn = new System.Windows.Forms.Button(); this.SaveProxyPwdPermanentBtn = new System.Windows.Forms.Button();
@ -87,29 +81,36 @@ namespace NUS_Downloader
this.consoleCBox = new System.Windows.Forms.ComboBox(); this.consoleCBox = new System.Windows.Forms.ComboBox();
this.scriptsbutton = new System.Windows.Forms.Button(); this.scriptsbutton = new System.Windows.Forms.Button();
this.scriptsStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.scriptsStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.iosPatchGroupBox = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.iosPatchesListBox = new System.Windows.Forms.CheckedListBox();
this.iosPatchGroupBoxOKbtn = new System.Windows.Forms.Button();
this.richPanel = new System.Windows.Forms.Panel();
this.saveaswadbtn = new System.Windows.Forms.Button();
this.iosPatchCheckbox = new System.Windows.Forms.CheckBox();
this.ProxyAssistBtn = new System.Windows.Forms.Button();
this.databaseButton = new System.Windows.Forms.Button();
this.keepenccontents = new System.Windows.Forms.CheckBox();
this.clearButton = new System.Windows.Forms.Button();
this.packbox = new System.Windows.Forms.CheckBox();
this.decryptbox = new System.Windows.Forms.CheckBox();
this.localuse = new System.Windows.Forms.CheckBox();
this.updateDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.loadInfoFromTMDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.proxySettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.aboutNUSDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.scriptsLocalMenuEntry = new System.Windows.Forms.ToolStripMenuItem(); this.scriptsLocalMenuEntry = new System.Windows.Forms.ToolStripMenuItem();
this.scriptsDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.scriptsDatabaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.PALMassUpdate = new System.Windows.Forms.ToolStripMenuItem(); this.PALMassUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.NTSCMassUpdate = new System.Windows.Forms.ToolStripMenuItem(); this.NTSCMassUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.KoreaMassUpdate = new System.Windows.Forms.ToolStripMenuItem(); this.KoreaMassUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.loadNUSScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.loadNUSScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.emulateUpdate = new System.Windows.Forms.ToolStripMenuItem(); this.emulateUpdate = new System.Windows.Forms.ToolStripMenuItem();
this.uSANTSCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.uSANTSCToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.europePALToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.europePALToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.japanNTSCJToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.japanNTSCJToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.koreaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.koreaToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.iosPatchGroupBox = new System.Windows.Forms.GroupBox();
this.label2 = new System.Windows.Forms.Label();
this.iosPatchesListBox = new System.Windows.Forms.CheckedListBox();
this.iosPatchGroupBoxOKbtn = new System.Windows.Forms.Button();
this.iosPatchCheckbox = new System.Windows.Forms.CheckBox();
this.saveaswadbtn = new System.Windows.Forms.Button();
this.keepenccontents = new System.Windows.Forms.CheckBox();
this.clearButton = new System.Windows.Forms.Button();
this.packbox = new System.Windows.Forms.CheckBox();
this.decryptbox = new System.Windows.Forms.CheckBox();
this.localuse = new System.Windows.Forms.CheckBox();
this.titleversion = new wmgCMS.WaterMarkTextBox(); this.titleversion = new wmgCMS.WaterMarkTextBox();
this.titleidbox = new wmgCMS.WaterMarkTextBox(); this.titleidbox = new wmgCMS.WaterMarkTextBox();
this.dlprogress = new wyDay.Controls.Windows7ProgressBar(); this.dlprogress = new wyDay.Controls.Windows7ProgressBar();
@ -119,6 +120,7 @@ namespace NUS_Downloader
this.ProxyVerifyBox.SuspendLayout(); this.ProxyVerifyBox.SuspendLayout();
this.scriptsStrip.SuspendLayout(); this.scriptsStrip.SuspendLayout();
this.iosPatchGroupBox.SuspendLayout(); this.iosPatchGroupBox.SuspendLayout();
this.richPanel.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// Extrasbtn // Extrasbtn
@ -147,11 +149,11 @@ namespace NUS_Downloader
// //
this.statusbox.BackColor = System.Drawing.SystemColors.ControlLightLight; this.statusbox.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.statusbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.statusbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.statusbox.Location = new System.Drawing.Point(12, 116); this.statusbox.Location = new System.Drawing.Point(-2, -2);
this.statusbox.Name = "statusbox"; this.statusbox.Name = "statusbox";
this.statusbox.ReadOnly = true; this.statusbox.ReadOnly = true;
this.statusbox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; this.statusbox.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.None;
this.statusbox.Size = new System.Drawing.Size(250, 268); this.statusbox.Size = new System.Drawing.Size(252, 269);
this.statusbox.TabIndex = 5; this.statusbox.TabIndex = 5;
this.statusbox.Text = ""; this.statusbox.Text = "";
// //
@ -180,17 +182,6 @@ namespace NUS_Downloader
this.wadnamebox.Size = new System.Drawing.Size(159, 20); this.wadnamebox.Size = new System.Drawing.Size(159, 20);
this.wadnamebox.TabIndex = 17; this.wadnamebox.TabIndex = 17;
// //
// databaseButton
//
this.databaseButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.databaseButton.Location = new System.Drawing.Point(12, 5);
this.databaseButton.Name = "databaseButton";
this.databaseButton.Size = new System.Drawing.Size(85, 27);
this.databaseButton.TabIndex = 20;
this.databaseButton.Text = "Database...";
this.databaseButton.UseVisualStyleBackColor = true;
this.databaseButton.Click += new System.EventHandler(this.DatabaseButton_Click);
//
// databaseStrip // databaseStrip
// //
this.databaseStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.databaseStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -333,14 +324,6 @@ namespace NUS_Downloader
this.toolStripSeparator4.Name = "toolStripSeparator4"; this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(160, 6); this.toolStripSeparator4.Size = new System.Drawing.Size(160, 6);
// //
// updateDatabaseToolStripMenuItem
//
this.updateDatabaseToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.database_save;
this.updateDatabaseToolStripMenuItem.Name = "updateDatabaseToolStripMenuItem";
this.updateDatabaseToolStripMenuItem.Size = new System.Drawing.Size(163, 22);
this.updateDatabaseToolStripMenuItem.Text = "Update Database";
this.updateDatabaseToolStripMenuItem.Click += new System.EventHandler(this.updateDatabaseToolStripMenuItem_Click);
//
// extrasStrip // extrasStrip
// //
this.extrasStrip.AllowMerge = false; this.extrasStrip.AllowMerge = false;
@ -353,40 +336,16 @@ namespace NUS_Downloader
this.extrasStrip.Name = "extrasStrip"; this.extrasStrip.Name = "extrasStrip";
this.extrasStrip.Size = new System.Drawing.Size(183, 82); this.extrasStrip.Size = new System.Drawing.Size(183, 82);
// //
// loadInfoFromTMDToolStripMenuItem
//
this.loadInfoFromTMDToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.page_white_magnify;
this.loadInfoFromTMDToolStripMenuItem.Name = "loadInfoFromTMDToolStripMenuItem";
this.loadInfoFromTMDToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.loadInfoFromTMDToolStripMenuItem.Text = "Load Info from TMD";
this.loadInfoFromTMDToolStripMenuItem.Click += new System.EventHandler(this.loadInfoFromTMDToolStripMenuItem_Click);
//
// toolStripSeparator3 // toolStripSeparator3
// //
this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(179, 6); this.toolStripSeparator3.Size = new System.Drawing.Size(179, 6);
// //
// proxySettingsToolStripMenuItem
//
this.proxySettingsToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.server_link;
this.proxySettingsToolStripMenuItem.Name = "proxySettingsToolStripMenuItem";
this.proxySettingsToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.proxySettingsToolStripMenuItem.Text = "Proxy Settings";
this.proxySettingsToolStripMenuItem.Click += new System.EventHandler(this.proxySettingsToolStripMenuItem_Click);
//
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(179, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(179, 6);
// //
// aboutNUSDToolStripMenuItem
//
this.aboutNUSDToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.information;
this.aboutNUSDToolStripMenuItem.Name = "aboutNUSDToolStripMenuItem";
this.aboutNUSDToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.aboutNUSDToolStripMenuItem.Text = "About NUSD";
this.aboutNUSDToolStripMenuItem.Click += new System.EventHandler(this.aboutNUSDToolStripMenuItem_Click);
//
// proxyBox // proxyBox
// //
this.proxyBox.BackColor = System.Drawing.Color.White; this.proxyBox.BackColor = System.Drawing.Color.White;
@ -441,17 +400,6 @@ namespace NUS_Downloader
this.SaveProxyBtn.UseVisualStyleBackColor = true; this.SaveProxyBtn.UseVisualStyleBackColor = true;
this.SaveProxyBtn.Click += new System.EventHandler(this.SaveProxyBtn_Click); this.SaveProxyBtn.Click += new System.EventHandler(this.SaveProxyBtn_Click);
// //
// ProxyAssistBtn
//
this.ProxyAssistBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.ProxyAssistBtn.Image = global::NUS_Downloader.Properties.Resources.help;
this.ProxyAssistBtn.Location = new System.Drawing.Point(177, 79);
this.ProxyAssistBtn.Name = "ProxyAssistBtn";
this.ProxyAssistBtn.Size = new System.Drawing.Size(29, 26);
this.ProxyAssistBtn.TabIndex = 28;
this.ProxyAssistBtn.UseVisualStyleBackColor = true;
this.ProxyAssistBtn.Click += new System.EventHandler(this.ProxyAssistBtn_Click);
//
// ProxyURL // ProxyURL
// //
this.ProxyURL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ProxyURL.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@ -566,97 +514,11 @@ namespace NUS_Downloader
this.scriptsStrip.ShowItemToolTips = false; this.scriptsStrip.ShowItemToolTips = false;
this.scriptsStrip.Size = new System.Drawing.Size(220, 98); this.scriptsStrip.Size = new System.Drawing.Size(220, 98);
// //
// scriptsLocalMenuEntry
//
this.scriptsLocalMenuEntry.Enabled = false;
this.scriptsLocalMenuEntry.Image = global::NUS_Downloader.Properties.Resources.script_code;
this.scriptsLocalMenuEntry.Name = "scriptsLocalMenuEntry";
this.scriptsLocalMenuEntry.Size = new System.Drawing.Size(219, 22);
this.scriptsLocalMenuEntry.Text = "Scripts (Local)";
//
// scriptsDatabaseToolStripMenuItem
//
this.scriptsDatabaseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.PALMassUpdate,
this.NTSCMassUpdate,
this.KoreaMassUpdate});
this.scriptsDatabaseToolStripMenuItem.Enabled = false;
this.scriptsDatabaseToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.script_code_red;
this.scriptsDatabaseToolStripMenuItem.Name = "scriptsDatabaseToolStripMenuItem";
this.scriptsDatabaseToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
this.scriptsDatabaseToolStripMenuItem.Text = "Scripts (Database)";
//
// PALMassUpdate
//
this.PALMassUpdate.Enabled = false;
this.PALMassUpdate.Name = "PALMassUpdate";
this.PALMassUpdate.Size = new System.Drawing.Size(104, 22);
this.PALMassUpdate.Text = "PAL";
//
// NTSCMassUpdate
//
this.NTSCMassUpdate.Enabled = false;
this.NTSCMassUpdate.Name = "NTSCMassUpdate";
this.NTSCMassUpdate.Size = new System.Drawing.Size(104, 22);
this.NTSCMassUpdate.Text = "NTSC";
//
// KoreaMassUpdate
//
this.KoreaMassUpdate.Enabled = false;
this.KoreaMassUpdate.Name = "KoreaMassUpdate";
this.KoreaMassUpdate.Size = new System.Drawing.Size(104, 22);
this.KoreaMassUpdate.Text = "Korea";
//
// loadNUSScriptToolStripMenuItem
//
this.loadNUSScriptToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.script_go;
this.loadNUSScriptToolStripMenuItem.Name = "loadNUSScriptToolStripMenuItem";
this.loadNUSScriptToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
this.loadNUSScriptToolStripMenuItem.Text = "Load NUS Script";
this.loadNUSScriptToolStripMenuItem.Click += new System.EventHandler(this.loadNUSScriptToolStripMenuItem_Click);
//
// toolStripSeparator2 // toolStripSeparator2
// //
this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(216, 6); this.toolStripSeparator2.Size = new System.Drawing.Size(216, 6);
// //
// emulateUpdate
//
this.emulateUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.uSANTSCToolStripMenuItem,
this.europePALToolStripMenuItem,
this.japanNTSCJToolStripMenuItem,
this.koreaToolStripMenuItem});
this.emulateUpdate.Image = global::NUS_Downloader.Properties.Resources.server_connect;
this.emulateUpdate.Name = "emulateUpdate";
this.emulateUpdate.Size = new System.Drawing.Size(219, 22);
this.emulateUpdate.Text = "Emulate Wii System Update";
this.emulateUpdate.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.emulateUpdate_DropDownItemClicked);
//
// uSANTSCToolStripMenuItem
//
this.uSANTSCToolStripMenuItem.Name = "uSANTSCToolStripMenuItem";
this.uSANTSCToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.uSANTSCToolStripMenuItem.Text = "USA";
//
// europePALToolStripMenuItem
//
this.europePALToolStripMenuItem.Name = "europePALToolStripMenuItem";
this.europePALToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.europePALToolStripMenuItem.Text = "EUROPE";
//
// japanNTSCJToolStripMenuItem
//
this.japanNTSCJToolStripMenuItem.Name = "japanNTSCJToolStripMenuItem";
this.japanNTSCJToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.japanNTSCJToolStripMenuItem.Text = "JAPAN";
//
// koreaToolStripMenuItem
//
this.koreaToolStripMenuItem.Name = "koreaToolStripMenuItem";
this.koreaToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.koreaToolStripMenuItem.Text = "KOREA";
//
// iosPatchGroupBox // iosPatchGroupBox
// //
this.iosPatchGroupBox.Controls.Add(this.label2); this.iosPatchGroupBox.Controls.Add(this.label2);
@ -705,19 +567,14 @@ namespace NUS_Downloader
this.iosPatchGroupBoxOKbtn.UseVisualStyleBackColor = true; this.iosPatchGroupBoxOKbtn.UseVisualStyleBackColor = true;
this.iosPatchGroupBoxOKbtn.Click += new System.EventHandler(this.iosPatchGroupBoxOKbtn_Click); this.iosPatchGroupBoxOKbtn.Click += new System.EventHandler(this.iosPatchGroupBoxOKbtn_Click);
// //
// iosPatchCheckbox // richPanel
// //
this.iosPatchCheckbox.Enabled = false; this.richPanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.iosPatchCheckbox.Image = global::NUS_Downloader.Properties.Resources.bug_add; this.richPanel.Controls.Add(this.statusbox);
this.iosPatchCheckbox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.richPanel.Location = new System.Drawing.Point(12, 116);
this.iosPatchCheckbox.Location = new System.Drawing.Point(12, 488); this.richPanel.Name = "richPanel";
this.iosPatchCheckbox.Name = "iosPatchCheckbox"; this.richPanel.Size = new System.Drawing.Size(250, 268);
this.iosPatchCheckbox.Size = new System.Drawing.Size(104, 24); this.richPanel.TabIndex = 56;
this.iosPatchCheckbox.TabIndex = 54;
this.iosPatchCheckbox.Text = "Patch IOS...";
this.iosPatchCheckbox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.iosPatchCheckbox.UseVisualStyleBackColor = true;
this.iosPatchCheckbox.CheckedChanged += new System.EventHandler(this.iosPatchCheckbox_CheckedChanged);
// //
// saveaswadbtn // saveaswadbtn
// //
@ -741,6 +598,43 @@ namespace NUS_Downloader
this.saveaswadbtn.MouseEnter += new System.EventHandler(this.saveaswadbtn_MouseEnter); this.saveaswadbtn.MouseEnter += new System.EventHandler(this.saveaswadbtn_MouseEnter);
this.saveaswadbtn.MouseLeave += new System.EventHandler(this.saveaswadbtn_MouseLeave); this.saveaswadbtn.MouseLeave += new System.EventHandler(this.saveaswadbtn_MouseLeave);
// //
// iosPatchCheckbox
//
this.iosPatchCheckbox.Enabled = false;
this.iosPatchCheckbox.Image = global::NUS_Downloader.Properties.Resources.bug_add;
this.iosPatchCheckbox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.iosPatchCheckbox.Location = new System.Drawing.Point(12, 488);
this.iosPatchCheckbox.Name = "iosPatchCheckbox";
this.iosPatchCheckbox.Size = new System.Drawing.Size(104, 24);
this.iosPatchCheckbox.TabIndex = 54;
this.iosPatchCheckbox.Text = "Patch IOS...";
this.iosPatchCheckbox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.iosPatchCheckbox.UseVisualStyleBackColor = true;
this.iosPatchCheckbox.CheckedChanged += new System.EventHandler(this.iosPatchCheckbox_CheckedChanged);
//
// ProxyAssistBtn
//
this.ProxyAssistBtn.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.ProxyAssistBtn.Image = global::NUS_Downloader.Properties.Resources.help;
this.ProxyAssistBtn.Location = new System.Drawing.Point(177, 79);
this.ProxyAssistBtn.Name = "ProxyAssistBtn";
this.ProxyAssistBtn.Size = new System.Drawing.Size(29, 26);
this.ProxyAssistBtn.TabIndex = 28;
this.ProxyAssistBtn.UseVisualStyleBackColor = true;
this.ProxyAssistBtn.Click += new System.EventHandler(this.ProxyAssistBtn_Click);
//
// databaseButton
//
this.databaseButton.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.databaseButton.Location = new System.Drawing.Point(12, 5);
this.databaseButton.Name = "databaseButton";
this.databaseButton.Size = new System.Drawing.Size(85, 27);
this.databaseButton.TabIndex = 20;
this.databaseButton.Text = "Database...";
this.databaseButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.databaseButton.UseVisualStyleBackColor = true;
this.databaseButton.Click += new System.EventHandler(this.DatabaseButton_Click);
//
// keepenccontents // keepenccontents
// //
this.keepenccontents.Checked = true; this.keepenccontents.Checked = true;
@ -749,7 +643,7 @@ namespace NUS_Downloader
this.keepenccontents.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.keepenccontents.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.keepenccontents.Location = new System.Drawing.Point(12, 436); this.keepenccontents.Location = new System.Drawing.Point(12, 436);
this.keepenccontents.Name = "keepenccontents"; this.keepenccontents.Name = "keepenccontents";
this.keepenccontents.Size = new System.Drawing.Size(212, 26); this.keepenccontents.Size = new System.Drawing.Size(195, 26);
this.keepenccontents.TabIndex = 52; this.keepenccontents.TabIndex = 52;
this.keepenccontents.Text = "Keep Encrypted Contents"; this.keepenccontents.Text = "Keep Encrypted Contents";
this.keepenccontents.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.keepenccontents.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
@ -797,7 +691,7 @@ namespace NUS_Downloader
this.decryptbox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.decryptbox.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.decryptbox.Location = new System.Drawing.Point(12, 462); this.decryptbox.Location = new System.Drawing.Point(12, 462);
this.decryptbox.Name = "decryptbox"; this.decryptbox.Name = "decryptbox";
this.decryptbox.Size = new System.Drawing.Size(250, 26); this.decryptbox.Size = new System.Drawing.Size(195, 26);
this.decryptbox.TabIndex = 19; this.decryptbox.TabIndex = 19;
this.decryptbox.Text = "Create Decrypted Contents"; this.decryptbox.Text = "Create Decrypted Contents";
this.decryptbox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.decryptbox.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
@ -819,6 +713,124 @@ namespace NUS_Downloader
this.localuse.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.localuse.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.localuse.UseVisualStyleBackColor = true; this.localuse.UseVisualStyleBackColor = true;
// //
// updateDatabaseToolStripMenuItem
//
this.updateDatabaseToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.database_save;
this.updateDatabaseToolStripMenuItem.Name = "updateDatabaseToolStripMenuItem";
this.updateDatabaseToolStripMenuItem.Size = new System.Drawing.Size(163, 22);
this.updateDatabaseToolStripMenuItem.Text = "Update Database";
this.updateDatabaseToolStripMenuItem.Click += new System.EventHandler(this.updateDatabaseToolStripMenuItem_Click);
//
// loadInfoFromTMDToolStripMenuItem
//
this.loadInfoFromTMDToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.page_white_magnify;
this.loadInfoFromTMDToolStripMenuItem.Name = "loadInfoFromTMDToolStripMenuItem";
this.loadInfoFromTMDToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.loadInfoFromTMDToolStripMenuItem.Text = "Load Info from TMD";
this.loadInfoFromTMDToolStripMenuItem.Click += new System.EventHandler(this.loadInfoFromTMDToolStripMenuItem_Click);
//
// proxySettingsToolStripMenuItem
//
this.proxySettingsToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.server_link;
this.proxySettingsToolStripMenuItem.Name = "proxySettingsToolStripMenuItem";
this.proxySettingsToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.proxySettingsToolStripMenuItem.Text = "Proxy Settings";
this.proxySettingsToolStripMenuItem.Click += new System.EventHandler(this.proxySettingsToolStripMenuItem_Click);
//
// aboutNUSDToolStripMenuItem
//
this.aboutNUSDToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.information;
this.aboutNUSDToolStripMenuItem.Name = "aboutNUSDToolStripMenuItem";
this.aboutNUSDToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.aboutNUSDToolStripMenuItem.Text = "About NUSD";
this.aboutNUSDToolStripMenuItem.Click += new System.EventHandler(this.aboutNUSDToolStripMenuItem_Click);
//
// scriptsLocalMenuEntry
//
this.scriptsLocalMenuEntry.Enabled = false;
this.scriptsLocalMenuEntry.Image = global::NUS_Downloader.Properties.Resources.script_code;
this.scriptsLocalMenuEntry.Name = "scriptsLocalMenuEntry";
this.scriptsLocalMenuEntry.Size = new System.Drawing.Size(219, 22);
this.scriptsLocalMenuEntry.Text = "Scripts (Local)";
//
// scriptsDatabaseToolStripMenuItem
//
this.scriptsDatabaseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.PALMassUpdate,
this.NTSCMassUpdate,
this.KoreaMassUpdate});
this.scriptsDatabaseToolStripMenuItem.Enabled = false;
this.scriptsDatabaseToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.script_code_red;
this.scriptsDatabaseToolStripMenuItem.Name = "scriptsDatabaseToolStripMenuItem";
this.scriptsDatabaseToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
this.scriptsDatabaseToolStripMenuItem.Text = "Scripts (Database)";
//
// PALMassUpdate
//
this.PALMassUpdate.Enabled = false;
this.PALMassUpdate.Name = "PALMassUpdate";
this.PALMassUpdate.Size = new System.Drawing.Size(104, 22);
this.PALMassUpdate.Text = "PAL";
//
// NTSCMassUpdate
//
this.NTSCMassUpdate.Enabled = false;
this.NTSCMassUpdate.Name = "NTSCMassUpdate";
this.NTSCMassUpdate.Size = new System.Drawing.Size(104, 22);
this.NTSCMassUpdate.Text = "NTSC";
//
// KoreaMassUpdate
//
this.KoreaMassUpdate.Enabled = false;
this.KoreaMassUpdate.Name = "KoreaMassUpdate";
this.KoreaMassUpdate.Size = new System.Drawing.Size(104, 22);
this.KoreaMassUpdate.Text = "Korea";
//
// loadNUSScriptToolStripMenuItem
//
this.loadNUSScriptToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.script_go;
this.loadNUSScriptToolStripMenuItem.Name = "loadNUSScriptToolStripMenuItem";
this.loadNUSScriptToolStripMenuItem.Size = new System.Drawing.Size(219, 22);
this.loadNUSScriptToolStripMenuItem.Text = "Load NUS Script";
this.loadNUSScriptToolStripMenuItem.Click += new System.EventHandler(this.loadNUSScriptToolStripMenuItem_Click);
//
// emulateUpdate
//
this.emulateUpdate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.uSANTSCToolStripMenuItem,
this.europePALToolStripMenuItem,
this.japanNTSCJToolStripMenuItem,
this.koreaToolStripMenuItem});
this.emulateUpdate.Image = global::NUS_Downloader.Properties.Resources.server_connect;
this.emulateUpdate.Name = "emulateUpdate";
this.emulateUpdate.Size = new System.Drawing.Size(219, 22);
this.emulateUpdate.Text = "Emulate Wii System Update";
this.emulateUpdate.DropDownItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.emulateUpdate_DropDownItemClicked);
//
// uSANTSCToolStripMenuItem
//
this.uSANTSCToolStripMenuItem.Name = "uSANTSCToolStripMenuItem";
this.uSANTSCToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.uSANTSCToolStripMenuItem.Text = "USA";
//
// europePALToolStripMenuItem
//
this.europePALToolStripMenuItem.Name = "europePALToolStripMenuItem";
this.europePALToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.europePALToolStripMenuItem.Text = "EUROPE";
//
// japanNTSCJToolStripMenuItem
//
this.japanNTSCJToolStripMenuItem.Name = "japanNTSCJToolStripMenuItem";
this.japanNTSCJToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.japanNTSCJToolStripMenuItem.Text = "JAPAN";
//
// koreaToolStripMenuItem
//
this.koreaToolStripMenuItem.Name = "koreaToolStripMenuItem";
this.koreaToolStripMenuItem.Size = new System.Drawing.Size(117, 22);
this.koreaToolStripMenuItem.Text = "KOREA";
//
// titleversion // titleversion
// //
this.titleversion.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.titleversion.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -857,13 +869,13 @@ namespace NUS_Downloader
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(274, 516); this.ClientSize = new System.Drawing.Size(274, 516);
this.Controls.Add(this.saveaswadbtn);
this.Controls.Add(this.iosPatchGroupBox); this.Controls.Add(this.iosPatchGroupBox);
this.Controls.Add(this.iosPatchCheckbox); this.Controls.Add(this.iosPatchCheckbox);
this.Controls.Add(this.ProxyVerifyBox); this.Controls.Add(this.ProxyVerifyBox);
this.Controls.Add(this.proxyBox); this.Controls.Add(this.proxyBox);
this.Controls.Add(this.scriptsbutton); this.Controls.Add(this.scriptsbutton);
this.Controls.Add(this.titleversion); this.Controls.Add(this.titleversion);
this.Controls.Add(this.saveaswadbtn);
this.Controls.Add(this.titleidbox); this.Controls.Add(this.titleidbox);
this.Controls.Add(this.dlprogress); this.Controls.Add(this.dlprogress);
this.Controls.Add(this.consoleCBox); this.Controls.Add(this.consoleCBox);
@ -874,10 +886,10 @@ namespace NUS_Downloader
this.Controls.Add(this.wadnamebox); this.Controls.Add(this.wadnamebox);
this.Controls.Add(this.clearButton); this.Controls.Add(this.clearButton);
this.Controls.Add(this.Extrasbtn); this.Controls.Add(this.Extrasbtn);
this.Controls.Add(this.statusbox);
this.Controls.Add(this.packbox); this.Controls.Add(this.packbox);
this.Controls.Add(this.decryptbox); this.Controls.Add(this.decryptbox);
this.Controls.Add(this.localuse); this.Controls.Add(this.localuse);
this.Controls.Add(this.richPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false; this.MaximizeBox = false;
@ -894,6 +906,7 @@ namespace NUS_Downloader
this.scriptsStrip.ResumeLayout(false); this.scriptsStrip.ResumeLayout(false);
this.iosPatchGroupBox.ResumeLayout(false); this.iosPatchGroupBox.ResumeLayout(false);
this.iosPatchGroupBox.PerformLayout(); this.iosPatchGroupBox.PerformLayout();
this.richPanel.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -947,11 +960,8 @@ namespace NUS_Downloader
private System.Windows.Forms.TextBox ProxyPwdBox; private System.Windows.Forms.TextBox ProxyPwdBox;
private wyDay.Controls.Windows7ProgressBar dlprogress; private wyDay.Controls.Windows7ProgressBar dlprogress;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
//private System.Windows.Forms.ToolStripMenuItem getCommonKeyMenuItem;
private System.Windows.Forms.ContextMenuStrip C64MenuListDrop; private System.Windows.Forms.ContextMenuStrip C64MenuListDrop;
private System.Windows.Forms.ComboBox consoleCBox; private System.Windows.Forms.ComboBox consoleCBox;
//private System.Windows.Forms.ToolStripMenuItem commonKeykeybinToolStripMenuItem;
//private System.Windows.Forms.ToolStripMenuItem koreanKeykkeybinToolStripMenuItem;
private wmgCMS.WaterMarkTextBox titleidbox; private wmgCMS.WaterMarkTextBox titleidbox;
private wmgCMS.WaterMarkTextBox titleversion; private wmgCMS.WaterMarkTextBox titleversion;
private System.Windows.Forms.Button scriptsbutton; private System.Windows.Forms.Button scriptsbutton;
@ -980,6 +990,7 @@ namespace NUS_Downloader
private System.Windows.Forms.CheckedListBox iosPatchesListBox; private System.Windows.Forms.CheckedListBox iosPatchesListBox;
private System.Windows.Forms.Button iosPatchGroupBoxOKbtn; private System.Windows.Forms.Button iosPatchGroupBoxOKbtn;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel richPanel;
} }
} }

View File

@ -36,7 +36,6 @@ using System.Threading;
using System.Text; using System.Text;
using System.Diagnostics; using System.Diagnostics;
namespace NUS_Downloader namespace NUS_Downloader
{ {
public partial class Form1 : Form public partial class Form1 : Form
@ -114,7 +113,7 @@ namespace NUS_Downloader
WriteStatus("!!!!! THIS IS A DEBUG BUILD FROM SVN !!!!!", warningcolor); WriteStatus("!!!!! THIS IS A DEBUG BUILD FROM SVN !!!!!", warningcolor);
WriteStatus("Features CAN and WILL be broken in this build", warningcolor); WriteStatus("Features CAN and WILL be broken in this build", warningcolor);
WriteStatus("REMEMBER TO CHANGE TO THE RELEASE CONFIGURATION AND CHANGE VERSION NUMBER BEFORE BUILDING!", warningcolor); WriteStatus("REMEMBER TO CHANGE TO THE RELEASE CONFIGURATION AND CHANGE VERSION NUMBER BEFORE BUILDING!", warningcolor);
WriteStatus("\r\n\r\n\r\n"); WriteStatus("\r\n");
} }
KoreaMassUpdate.DropDownItemClicked += new ToolStripItemClickedEventHandler(upditem_itemclicked); KoreaMassUpdate.DropDownItemClicked += new ToolStripItemClickedEventHandler(upditem_itemclicked);
NTSCMassUpdate.DropDownItemClicked += new ToolStripItemClickedEventHandler(upditem_itemclicked); NTSCMassUpdate.DropDownItemClicked += new ToolStripItemClickedEventHandler(upditem_itemclicked);
@ -206,12 +205,16 @@ namespace NUS_Downloader
} }
else else
{ {
string version = GetDatabaseVersion("database.xml"); Database db = new Database();
db.LoadDatabaseToStream(Path.Combine(CURRENT_DIR, "database.xml"));
string version = db.GetDatabaseVersion();
WriteStatus("Database.xml detected."); WriteStatus("Database.xml detected.");
WriteStatus(" - Version: " + version); WriteStatus(" - Version: " + version);
updateDatabaseToolStripMenuItem.Text = "Update Database"; updateDatabaseToolStripMenuItem.Text = "Update Database";
//databaseButton.Enabled = false; //databaseButton.Enabled = false;
databaseButton.Text = "DB Loading"; //databaseButton.Text = "DB Loading";
databaseButton.Text = " [ ]";
databaseButton.Image = Properties.Resources.arrow_ticker;
// Load it up... // Load it up...
this.fds.RunWorkerAsync(); this.fds.RunWorkerAsync();
} }
@ -255,6 +258,7 @@ namespace NUS_Downloader
{ {
//this.databaseButton.Enabled = true; //this.databaseButton.Enabled = true;
this.databaseButton.Text = "Database..."; this.databaseButton.Text = "Database...";
this.databaseButton.Image = null;
if (this.KoreaMassUpdate.HasDropDownItems || this.PALMassUpdate.HasDropDownItems || this.NTSCMassUpdate.HasDropDownItems) if (this.KoreaMassUpdate.HasDropDownItems || this.PALMassUpdate.HasDropDownItems || this.NTSCMassUpdate.HasDropDownItems)
{ {
this.scriptsbutton.Enabled = true; this.scriptsbutton.Enabled = true;
@ -263,7 +267,14 @@ namespace NUS_Downloader
private void DoAllDatabaseyStuff_ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e) private void DoAllDatabaseyStuff_ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e)
{ {
this.databaseButton.Text = "DB: " + e.ProgressPercentage + "%"; if (e.ProgressPercentage == 25)
databaseButton.Text = " [. ]";
else if (e.ProgressPercentage == 25)
databaseButton.Text = " [.. ]";
else if (e.ProgressPercentage == 75)
databaseButton.Text = " [... ]";
else if (e.ProgressPercentage == 100)
databaseButton.Text = " [....]";
} }
private void RunScriptOrganizer() private void RunScriptOrganizer()
@ -286,6 +297,7 @@ namespace NUS_Downloader
} }
} }
/*
/// <summary> /// <summary>
/// Gets the database version. /// Gets the database version.
/// </summary> /// </summary>
@ -311,7 +323,7 @@ namespace NUS_Downloader
XmlNodeList DatabaseList = xDoc.GetElementsByTagName("database"); XmlNodeList DatabaseList = xDoc.GetElementsByTagName("database");
XmlAttributeCollection Attributes = DatabaseList[0].Attributes; XmlAttributeCollection Attributes = DatabaseList[0].Attributes;
return Attributes[0].Value; return Attributes[0].Value;
} }*/
private void extrasMenuButton_Click(object sender, EventArgs e) private void extrasMenuButton_Click(object sender, EventArgs e)
{ {
@ -827,6 +839,8 @@ namespace NUS_Downloader
SetPropertyThreadSafe(SystemMenuList, true, "Enabled"); SetPropertyThreadSafe(SystemMenuList, true, "Enabled");
SetPropertyThreadSafe(SystemMenuList, true, "Visible"); SetPropertyThreadSafe(SystemMenuList, true, "Visible");
worker.ReportProgress(25);
ToolStripMenuItem[] iosItems = databaseObj.LoadIosTitles(); ToolStripMenuItem[] iosItems = databaseObj.LoadIosTitles();
for (int a = 0; a < iosItems.Length; a++) for (int a = 0; a < iosItems.Length; a++)
{ {
@ -837,6 +851,8 @@ namespace NUS_Downloader
SetPropertyThreadSafe(IOSMenuList, true, "Enabled"); SetPropertyThreadSafe(IOSMenuList, true, "Enabled");
SetPropertyThreadSafe(IOSMenuList, true, "Visible"); SetPropertyThreadSafe(IOSMenuList, true, "Visible");
worker.ReportProgress(50);
ToolStripMenuItem[][] vcItems = databaseObj.LoadVirtualConsoleTitles(); ToolStripMenuItem[][] vcItems = databaseObj.LoadVirtualConsoleTitles();
for (int a = 0; a < vcItems.Length; a++) for (int a = 0; a < vcItems.Length; a++)
{ {
@ -846,20 +862,25 @@ namespace NUS_Downloader
for (int c = 0; c < vcItems[a][b].DropDownItems.Count; c++) for (int c = 0; c < vcItems[a][b].DropDownItems.Count; c++)
{ {
ToolStripMenuItem lowerentry = (ToolStripMenuItem)vcItems[a][b].DropDownItems[c]; ToolStripMenuItem lowerentry = (ToolStripMenuItem)vcItems[a][b].DropDownItems[c];
if (lowerentry.DropDownItems.Count > 0)
{
lowerentry.DropDownItemClicked += new ToolStripItemClickedEventHandler(DatabaseItem_Clicked); lowerentry.DropDownItemClicked += new ToolStripItemClickedEventHandler(DatabaseItem_Clicked);
}
}
//Debug.WriteLine(a + " " + b + " " + c);
}
try
{
AddToolStripItemToStrip((ToolStripMenuItem)VCMenuList.DropDownItems[a], vcItems[a][b]); AddToolStripItemToStrip((ToolStripMenuItem)VCMenuList.DropDownItems[a], vcItems[a][b]);
//tsmi.DropDownItems.Add(vcItems[a][b]); }
catch (Exception)
{
Debug.WriteLine(a + " " + b + "FAIL");
}
} }
} }
SetPropertyThreadSafe(VCMenuList, true, "Enabled"); SetPropertyThreadSafe(VCMenuList, true, "Enabled");
SetPropertyThreadSafe(VCMenuList, true, "Visible"); SetPropertyThreadSafe(VCMenuList, true, "Visible");
worker.ReportProgress(75);
ToolStripMenuItem[] wwItems = databaseObj.LoadWiiWareTitles(); ToolStripMenuItem[] wwItems = databaseObj.LoadWiiWareTitles();
for (int a = 0; a < wwItems.Length; a++) for (int a = 0; a < wwItems.Length; a++)
{ {
@ -878,7 +899,7 @@ namespace NUS_Downloader
SetPropertyThreadSafe(WiiWareMenuList, true, "Enabled"); SetPropertyThreadSafe(WiiWareMenuList, true, "Enabled");
SetPropertyThreadSafe(WiiWareMenuList, true, "Visible"); SetPropertyThreadSafe(WiiWareMenuList, true, "Visible");
worker.ReportProgress(100);
/* /*
// Load database.xml into memorystream to perhaps reduce disk reads? // Load database.xml into memorystream to perhaps reduce disk reads?
string databasestr = File.ReadAllText(Path.Combine(CURRENT_DIR, "database.xml")); string databasestr = File.ReadAllText(Path.Combine(CURRENT_DIR, "database.xml"));
@ -1043,6 +1064,7 @@ namespace NUS_Downloader
} }
menulist.DropDownItems.Add(additionitem); menulist.DropDownItems.Add(additionitem);
/* /*
// Deal with VC list depth... // Deal with VC list depth...
if (type == 2) if (type == 2)
@ -1207,7 +1229,7 @@ namespace NUS_Downloader
statusbox.Text = String.Format(" --- {0} ---", values[1]); statusbox.Text = String.Format(" --- {0} ---", values[1]);
titleversion.Text = String.Empty; titleversion.Text = String.Empty;
if ((e.ClickedItem.Image) == (orange) || (e.ClickedItem.Image) == (redorange)) if ((e.ClickedItem.Image) == (Database.orange) || (e.ClickedItem.Image) == (Database.redorange))
{ {
WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!"); WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!");
packbox.Checked = false; packbox.Checked = false;
@ -1215,7 +1237,7 @@ namespace NUS_Downloader
} }
// Check for danger item // Check for danger item
if ((e.ClickedItem.Image) == (redgreen) || (e.ClickedItem.Image) == (redorange)) if ((e.ClickedItem.Image) == (Database.redgreen) || (e.ClickedItem.Image) == (Database.redorange))
WriteStatus("\n" + e.ClickedItem.ToolTipText); WriteStatus("\n" + e.ClickedItem.ToolTipText);
} }
@ -1231,7 +1253,7 @@ namespace NUS_Downloader
// Put 'XX' into title ID // Put 'XX' into title ID
titleidbox.Text = titleidbox.Text.Replace("XX", e.ClickedItem.Text.Substring(0, 2)); titleidbox.Text = titleidbox.Text.Replace("XX", e.ClickedItem.Text.Substring(0, 2));
if ((e.ClickedItem.OwnerItem.Image) == (orange) || (e.ClickedItem.OwnerItem.Image) == (redorange)) if ((e.ClickedItem.OwnerItem.Image) == (Database.orange) || (e.ClickedItem.OwnerItem.Image) == (Database.redorange))
{ {
WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!"); WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!");
packbox.Checked = false; packbox.Checked = false;
@ -1239,7 +1261,7 @@ namespace NUS_Downloader
} }
// Check for danger item // Check for danger item
if ((e.ClickedItem.OwnerItem.Image) == (redgreen) || (e.ClickedItem.OwnerItem.Image) == (redorange)) if ((e.ClickedItem.OwnerItem.Image) == (Database.redgreen) || (e.ClickedItem.OwnerItem.Image) == (Database.redorange))
WriteStatus("\n" + e.ClickedItem.OwnerItem.ToolTipText); WriteStatus("\n" + e.ClickedItem.OwnerItem.ToolTipText);
} }
@ -1272,6 +1294,33 @@ namespace NUS_Downloader
string[] version = e.ClickedItem.Text.Replace("v", "").Split(' '); string[] version = e.ClickedItem.Text.Replace("v", "").Split(' ');
titleversion.Text = version[0]; titleversion.Text = version[0];
} }
if (RegionEntry.IsMatch(e.ClickedItem.OwnerItem.Text))
{
if ((e.ClickedItem.OwnerItem.OwnerItem.Image) == (Database.orange) || (e.ClickedItem.OwnerItem.OwnerItem.Image) == (Database.redorange))
{
WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!");
packbox.Checked = false;
decryptbox.Checked = false;
}
// Check for danger item
if ((e.ClickedItem.OwnerItem.OwnerItem.Image) == (Database.redgreen) || (e.ClickedItem.OwnerItem.OwnerItem.Image) == (Database.redorange))
WriteStatus("\n" + e.ClickedItem.OwnerItem.OwnerItem.ToolTipText);
}
else
{
if ((e.ClickedItem.OwnerItem.Image) == (Database.orange) || (e.ClickedItem.OwnerItem.Image) == (Database.redorange))
{
WriteStatus("Note: This title has no ticket and cannot be packed/decrypted!");
packbox.Checked = false;
decryptbox.Checked = false;
}
// Check for danger item
if ((e.ClickedItem.OwnerItem.Image) == (Database.redgreen) || (e.ClickedItem.OwnerItem.Image) == (Database.redorange))
WriteStatus("\n" + e.ClickedItem.OwnerItem.ToolTipText);
}
} }
} }
@ -1331,16 +1380,16 @@ namespace NUS_Downloader
this.Invoke(bcc); this.Invoke(bcc);
return; return;
} }
XmlDocument xDoc = new XmlDocument();
xDoc.Load("database.xml");
XmlNodeList XMLRegionList = xDoc.GetElementsByTagName("REGIONS"); Database databaseObj = new Database();
XmlNodeList ChildrenOfTheNode = XMLRegionList[0].ChildNodes; databaseObj.LoadDatabaseToStream(Path.Combine(CURRENT_DIR, "database.xml"));
ToolStripMenuItem[] regionItems = databaseObj.LoadRegionCodes();
// For each child node (region node) // For each child node (region node)
for (int z = 0; z < ChildrenOfTheNode.Count; z++) for (int z = 0; z < regionItems.Length; z++)
{ {
RegionCodesList.DropDownItems.Add(ChildrenOfTheNode[z].InnerText); RegionCodesList.DropDownItems.Add(regionItems[z].Text);
} }
} }
@ -1619,8 +1668,10 @@ namespace NUS_Downloader
private void RetrieveNewDatabase_Completed(object sender, RunWorkerCompletedEventArgs e) private void RetrieveNewDatabase_Completed(object sender, RunWorkerCompletedEventArgs e)
{ {
string database = e.Result.ToString(); string database = e.Result.ToString();
string currentversion = GetDatabaseVersion("database.xml"); Database db = new Database();
string onlineversion = GetDatabaseVersion(database); db.LoadDatabaseToStream(Path.Combine(CURRENT_DIR, "database.xml"));
string currentversion = db.GetDatabaseVersion();
string onlineversion = Database.GetDatabaseVersion(database);
WriteStatus(" - Database successfully parsed!"); WriteStatus(" - Database successfully parsed!");
WriteStatus(" - Current Database Version: " + currentversion); WriteStatus(" - Current Database Version: " + currentversion);
WriteStatus(" - Online Database Version: " + onlineversion); WriteStatus(" - Online Database Version: " + onlineversion);
@ -2134,6 +2185,12 @@ namespace NUS_Downloader
databaseStrip.Items[a].Enabled = enabled; databaseStrip.Items[a].Enabled = enabled;
databaseStrip.Items[a].Visible = enabled; databaseStrip.Items[a].Visible = enabled;
} }
for (int b = 0; b < VCMenuList.DropDownItems.Count; b++)
{
VCMenuList.DropDownItems[b].Enabled = true;
VCMenuList.DropDownItems[b].Visible = true;
}
} }
void scriptsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) void scriptsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
@ -2207,13 +2264,12 @@ namespace NUS_Downloader
WriteStatus("NUS Downloader (NUSD)"); WriteStatus("NUS Downloader (NUSD)");
WriteStatus("You are running version: " + version); WriteStatus("You are running version: " + version);
if (version.StartsWith("SVN")) if (version.StartsWith("SVN"))
{ WriteStatus("SVN BUILD: DO NOT REPORT BROKEN FEATURES!");
WriteStatus("THIS IS A DIRECT FROM SVN BUILD! DO NOT REPORT BROKEN FEATURES!");
}
WriteStatus("This application created by WB3000"); WriteStatus("This application created by WB3000");
WriteStatus("Various sections contributed by lukegb"); WriteStatus("Various sections contributed by lukegb");
WriteStatus(""); WriteStatus(String.Empty);
/*
if (NUSDFileExists("key.bin") == false) if (NUSDFileExists("key.bin") == false)
WriteStatus("Wii Decryption: Need (key.bin)"); WriteStatus("Wii Decryption: Need (key.bin)");
else else
@ -2223,7 +2279,7 @@ namespace NUS_Downloader
WriteStatus("Wii Korea Decryption: Need (kkey.bin)"); WriteStatus("Wii Korea Decryption: Need (kkey.bin)");
else else
WriteStatus("Wii Korea Decryption: OK"); WriteStatus("Wii Korea Decryption: OK");
*/
if (NUSDFileExists("dsikey.bin") == false) if (NUSDFileExists("dsikey.bin") == false)
WriteStatus("DSi Decryption: Need (dsikey.bin)"); WriteStatus("DSi Decryption: Need (dsikey.bin)");
else else

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
<AssemblyName>NUS Downloader</AssemblyName> <AssemblyName>NUS Downloader</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ApplicationIcon>direction_down.ico</ApplicationIcon> <ApplicationIcon>Crystal_Clear_app_ark2.ico</ApplicationIcon>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<ManifestCertificateThumbprint>5828AACDBD1A48E3768B7E0465E90D0E96E2BE4C</ManifestCertificateThumbprint> <ManifestCertificateThumbprint>5828AACDBD1A48E3768B7E0465E90D0E96E2BE4C</ManifestCertificateThumbprint>
<ManifestKeyFile>NUS Downloader_TemporaryKey.pfx</ManifestKeyFile> <ManifestKeyFile>NUS Downloader_TemporaryKey.pfx</ManifestKeyFile>
@ -139,7 +139,7 @@
<None Include="Resources\dsi.png" /> <None Include="Resources\dsi.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="direction_down.ico" /> <Content Include="Crystal_Clear_app_ark2.ico" />
<None Include="Resources\script_start.png" /> <None Include="Resources\script_start.png" />
<None Include="Resources\package_green.png" /> <None Include="Resources\package_green.png" />
<None Include="Resources\package.png" /> <None Include="Resources\package.png" />
@ -155,6 +155,7 @@
<None Include="Resources\disk.png" /> <None Include="Resources\disk.png" />
<None Include="Resources\drive_disk.png" /> <None Include="Resources\drive_disk.png" />
<None Include="Resources\bin_closed.png" /> <None Include="Resources\bin_closed.png" />
<None Include="Resources\arrow_ticker.gif" />
<Content Include="Resources\key.png" /> <Content Include="Resources\key.png" />
<None Include="Resources\page_white_magnify.png" /> <None Include="Resources\page_white_magnify.png" />
<None Include="Resources\server_link.png" /> <None Include="Resources\server_link.png" />

View File

@ -60,6 +60,13 @@ namespace NUS_Downloader.Properties {
} }
} }
internal static System.Drawing.Bitmap arrow_ticker {
get {
object obj = ResourceManager.GetObject("arrow_ticker", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap bin_closed { internal static System.Drawing.Bitmap bin_closed {
get { get {
object obj = ResourceManager.GetObject("bin_closed", resourceCulture); object obj = ResourceManager.GetObject("bin_closed", resourceCulture);
@ -130,13 +137,6 @@ namespace NUS_Downloader.Properties {
} }
} }
internal static System.Drawing.Bitmap direction_down {
get {
object obj = ResourceManager.GetObject("direction_down", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap disk { internal static System.Drawing.Bitmap disk {
get { get {
object obj = ResourceManager.GetObject("disk", resourceCulture); object obj = ResourceManager.GetObject("disk", resourceCulture);

View File

@ -121,6 +121,9 @@
<data name="bullet_redorange" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bullet_redorange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_redorange.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\bullet_redorange.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="script_start" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\script_start.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="bullet_redgreen" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="bullet_redgreen" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\bullet_redgreen.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\bullet_redgreen.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -154,9 +157,6 @@
<data name="server_connect" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="server_connect" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\server_connect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\server_connect.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<data name="direction_down" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\direction_down.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="box" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="box" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\box.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\box.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
@ -203,7 +203,7 @@
<value>..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="script_start" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="arrow_ticker" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\script_start.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\Resources\arrow_ticker.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB