mirror of
https://github.com/WiiDatabase/nusdownloader.git
synced 2024-11-23 10:49:16 +01:00
dev feature: ticket indication icon
This commit is contained in:
parent
d5565c7f63
commit
4cb10a59e7
@ -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?
|
||||
|
24
NUS Downloader/Form1.Designer.cs
generated
24
NUS Downloader/Form1.Designer.cs
generated
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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!");
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
@ -160,6 +160,10 @@
|
||||
<None Include="Resources\bin_closed.png" />
|
||||
<None Include="Resources\arrow_ticker.gif" />
|
||||
<None Include="Resources\folder.png" />
|
||||
<None Include="Resources\bullet_green-blue.png" />
|
||||
<None Include="Resources\bullet_orange-blue.png" />
|
||||
<None Include="Resources\bullet_redgreen-blue.png" />
|
||||
<None Include="Resources\bullet_redorange-blue.png" />
|
||||
<Content Include="Resources\key.png" />
|
||||
<None Include="Resources\page_white_magnify.png" />
|
||||
<None Include="Resources\server_link.png" />
|
||||
|
28
NUS Downloader/Properties/Resources.Designer.cs
generated
28
NUS Downloader/Properties/Resources.Designer.cs
generated
@ -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);
|
||||
|
@ -208,8 +208,20 @@
|
||||
<data name="information" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\information.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="wrench" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\wrench.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="bullet_green_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bullet_green-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bullet_orange_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bullet_orange-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bullet_redgreen_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bullet_redgreen-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="bullet_redorange_blue" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\bullet_redorange-blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue
Block a user