diff --git a/NUS Downloader/Database.cs b/NUS Downloader/Database.cs index 029a95f..617c857 100644 --- a/NUS Downloader/Database.cs +++ b/NUS Downloader/Database.cs @@ -28,10 +28,14 @@ namespace NUS_Downloader public static Image green = Properties.Resources.bullet_green; public static Image orange = Properties.Resources.bullet_orange; - public static Image redorb = Properties.Resources.bullet_red; public static Image redgreen = Properties.Resources.bullet_redgreen; public static Image redorange = Properties.Resources.bullet_redorange; + public static Image green_blue = Properties.Resources.bullet_green_blue; + public static Image orange_blue = Properties.Resources.bullet_orange_blue; + public static Image redgreen_blue = Properties.Resources.bullet_redgreen_blue; + public static Image redorange_blue = Properties.Resources.bullet_redorange_blue; + public void LoadDatabaseToStream(string databaseFile) { // Does it exist? diff --git a/NUS Downloader/Form1.Designer.cs b/NUS Downloader/Form1.Designer.cs index 1432430..59a0f60 100644 --- a/NUS Downloader/Form1.Designer.cs +++ b/NUS Downloader/Form1.Designer.cs @@ -121,6 +121,8 @@ namespace NUS_Downloader this.titleversion = new wmgCMS.WaterMarkTextBox(); this.titleidbox = new wmgCMS.WaterMarkTextBox(); this.dlprogress = new wyDay.Controls.Windows7ProgressBar(); + this.databaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.localTicketInventoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.databaseStrip.SuspendLayout(); this.extrasStrip.SuspendLayout(); this.proxyBox.SuspendLayout(); @@ -384,7 +386,7 @@ namespace NUS_Downloader this.openNUSDDirectoryToolStripMenuItem, this.aboutNUSDToolStripMenuItem}); this.extrasStrip.Name = "extrasStrip"; - this.extrasStrip.Size = new System.Drawing.Size(178, 126); + this.extrasStrip.Size = new System.Drawing.Size(178, 148); this.extrasStrip.Text = "Hidden"; this.extrasStrip.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.anyStrip_Closed); this.extrasStrip.Opening += new System.ComponentModel.CancelEventHandler(this.extrasStrip_Opening); @@ -420,7 +422,8 @@ namespace NUS_Downloader this.moreExtrasToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.runFolderFixToolStripMenuItem, this.wiiBrewToolStripMenuItem, - this.removeNUSDFilesFoldersToolStripMenuItem}); + this.removeNUSDFilesFoldersToolStripMenuItem, + this.databaseToolStripMenuItem}); this.moreExtrasToolStripMenuItem.Image = global::NUS_Downloader.Properties.Resources.wrench; this.moreExtrasToolStripMenuItem.Name = "moreExtrasToolStripMenuItem"; this.moreExtrasToolStripMenuItem.Size = new System.Drawing.Size(177, 22); @@ -946,6 +949,21 @@ namespace NUS_Downloader this.dlprogress.Size = new System.Drawing.Size(250, 15); this.dlprogress.TabIndex = 47; // + // databaseToolStripMenuItem + // + this.databaseToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.localTicketInventoryToolStripMenuItem}); + this.databaseToolStripMenuItem.Name = "databaseToolStripMenuItem"; + this.databaseToolStripMenuItem.Size = new System.Drawing.Size(206, 22); + this.databaseToolStripMenuItem.Text = "Database"; + // + // localTicketInventoryToolStripMenuItem + // + this.localTicketInventoryToolStripMenuItem.Name = "localTicketInventoryToolStripMenuItem"; + this.localTicketInventoryToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.localTicketInventoryToolStripMenuItem.Text = "Local Ticket Inventory"; + this.localTicketInventoryToolStripMenuItem.Click += new System.EventHandler(this.localTicketInventoryToolStripMenuItem_Click); + // // Form1 // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -1080,6 +1098,8 @@ namespace NUS_Downloader private System.Windows.Forms.ToolStripMenuItem mainPageToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem databasePageToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem removeNUSDFilesFoldersToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem databaseToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem localTicketInventoryToolStripMenuItem; } } diff --git a/NUS Downloader/Form1.cs b/NUS Downloader/Form1.cs index 37e9dfa..9ddd8e1 100644 --- a/NUS Downloader/Form1.cs +++ b/NUS Downloader/Form1.cs @@ -2713,5 +2713,43 @@ namespace NUS_Downloader ((ContextMenuStrip)sender).Text = "Hidden"; //Debug.Write(((ContextMenuStrip)sender).Name); } + + private void localTicketInventoryToolStripMenuItem_Click(object sender, EventArgs e) + { + // Alters icons if tickets exist locally... + WriteStatus("Adding ticket information to database entries..."); + ToolStripMenuItem[] Lists = new ToolStripMenuItem[4] { SystemMenuList, IOSMenuList, VCMenuList, WiiWareMenuList }; + + for (int l = 0; l < Lists.Length; l++) + { + for (int a = 0; a < Lists[l].DropDownItems.Count; a++) + { + if (Lists[l].DropDownItems[a].Text.Length < 16) + continue; + + string itemTitleId = Lists[l].DropDownItems[a].Text.Substring(0, 16); + string itemDir = Path.Combine(Path.Combine(CURRENT_DIR, "titles"), itemTitleId); + + if (Directory.Exists(itemDir) == false) + continue; + + string[] files = Directory.GetFiles(itemDir, "cetk", SearchOption.AllDirectories); + if (files.Length > 0) + { + if (Lists[l].DropDownItems[a].Image == Database.green) + Lists[l].DropDownItems[a].Image = Database.green_blue; + if (Lists[l].DropDownItems[a].Image == Database.orange) + Lists[l].DropDownItems[a].Image = Database.orange_blue; + if (Lists[l].DropDownItems[a].Image == Database.redorange) + Lists[l].DropDownItems[a].Image = Database.redorange_blue; + if (Lists[l].DropDownItems[a].Image == Database.redgreen) + Lists[l].DropDownItems[a].Image = Database.redgreen_blue; + } + + + } + } + WriteStatus(" - Operation completed!"); + } } } \ No newline at end of file diff --git a/NUS Downloader/Latest/NUS Downloader.exe b/NUS Downloader/Latest/NUS Downloader.exe index 05e8a2f..b4fc142 100644 Binary files a/NUS Downloader/Latest/NUS Downloader.exe and b/NUS Downloader/Latest/NUS Downloader.exe differ diff --git a/NUS Downloader/NUS Downloader.csproj b/NUS Downloader/NUS Downloader.csproj index 56bd73b..d67e07b 100644 --- a/NUS Downloader/NUS Downloader.csproj +++ b/NUS Downloader/NUS Downloader.csproj @@ -160,6 +160,10 @@ + + + + diff --git a/NUS Downloader/Properties/Resources.Designer.cs b/NUS Downloader/Properties/Resources.Designer.cs index e5377e9..7b4a7d1 100644 --- a/NUS Downloader/Properties/Resources.Designer.cs +++ b/NUS Downloader/Properties/Resources.Designer.cs @@ -95,6 +95,13 @@ namespace NUS_Downloader.Properties { } } + internal static System.Drawing.Bitmap bullet_green_blue { + get { + object obj = ResourceManager.GetObject("bullet_green_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap bullet_orange { get { object obj = ResourceManager.GetObject("bullet_orange", resourceCulture); @@ -102,6 +109,13 @@ namespace NUS_Downloader.Properties { } } + internal static System.Drawing.Bitmap bullet_orange_blue { + get { + object obj = ResourceManager.GetObject("bullet_orange_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap bullet_red { get { object obj = ResourceManager.GetObject("bullet_red", resourceCulture); @@ -116,6 +130,13 @@ namespace NUS_Downloader.Properties { } } + internal static System.Drawing.Bitmap bullet_redgreen_blue { + get { + object obj = ResourceManager.GetObject("bullet_redgreen_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap bullet_redorange { get { object obj = ResourceManager.GetObject("bullet_redorange", resourceCulture); @@ -123,6 +144,13 @@ namespace NUS_Downloader.Properties { } } + internal static System.Drawing.Bitmap bullet_redorange_blue { + get { + object obj = ResourceManager.GetObject("bullet_redorange_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap connect { get { object obj = ResourceManager.GetObject("connect", resourceCulture); diff --git a/NUS Downloader/Properties/Resources.resx b/NUS Downloader/Properties/Resources.resx index 10f6c4e..a2551c5 100644 --- a/NUS Downloader/Properties/Resources.resx +++ b/NUS Downloader/Properties/Resources.resx @@ -208,8 +208,20 @@ ..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\wrench.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bullet_green-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bullet_orange-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bullet_redgreen-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bullet_redorange-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file