From a45674adbbe6c83989c31b2d9192d729ce2c0ad2 Mon Sep 17 00:00:00 2001 From: Alexey 'Cluster' Avdyukhin Date: Fri, 6 Oct 2017 05:58:08 +0300 Subject: [PATCH] CheckBoxList replaced with ListView, group actions added. Release candindate #2. --- .gitignore | 1 + Apps/NesMiniApplication.cs | 8 +- ConfigIni.cs | 8 +- ConsoleSelectDialog.Designer.cs | 98 ++ ConsoleSelectDialog.cs | 43 + ConsoleSelectDialog.resx | 279 ++++++ FoldersManagerForm.cs | 6 +- MainForm.Designer.cs | 259 ++--- MainForm.cs | 387 +++---- MainForm.resx | 394 ++++---- Properties/AssemblyInfo.cs | 6 +- Properties/Resources.Designer.cs | 1606 ------------------------------ Properties/Resources.resx | 23 +- SearchForm.cs | 8 +- WorkerForm.cs | 154 ++- hakchi_gui.csproj | 240 ++++- 16 files changed, 1337 insertions(+), 2183 deletions(-) create mode 100644 ConsoleSelectDialog.Designer.cs create mode 100644 ConsoleSelectDialog.cs create mode 100644 ConsoleSelectDialog.resx delete mode 100644 Properties/Resources.Designer.cs diff --git a/.gitignore b/.gitignore index 4e836f7ac..069c00781 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ driver/usb_driver/ obj/ *.csproj.user *.pfx +Properties/Resources*.cs \ No newline at end of file diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs index c1ee4eb2c..a96f7b674 100644 --- a/Apps/NesMiniApplication.cs +++ b/Apps/NesMiniApplication.cs @@ -539,11 +539,7 @@ public long Size(string path = null) DirectoryInfo dir = new DirectoryInfo(path); if (!dir.Exists) - { - throw new DirectoryNotFoundException( - "Source directory does not exist or could not be found: " - + path); - } + return 0; DirectoryInfo[] dirs = dir.GetDirectories(); FileInfo[] files = dir.GetFiles(); @@ -604,6 +600,7 @@ public static Bitmap LoadBitmap(string path) public string[] CompressPossible() { + if (!Directory.Exists(GamePath)) return new string[0]; var result = new List(); var exec = Regex.Replace(Command, "['/\\\"]", " ") + " "; var files = Directory.GetFiles(GamePath, "*.*", SearchOption.TopDirectoryOnly); @@ -621,6 +618,7 @@ public string[] CompressPossible() public string[] DecompressPossible() { + if (!Directory.Exists(GamePath)) return new string[0]; var result = new List(); var exec = Regex.Replace(Command, "['/\\\"]", " ") + " "; var files = Directory.GetFiles(GamePath, "*.7z", SearchOption.TopDirectoryOnly); diff --git a/ConfigIni.cs b/ConfigIni.cs index ee3920d75..2bfe53dab 100644 --- a/ConfigIni.cs +++ b/ConfigIni.cs @@ -7,7 +7,7 @@ namespace com.clusterrr.hakchi_gui { public class ConfigIni { - public static bool FirstRun = true; + public static int RunCount = 0; public static string SelectedGamesNes = "default"; public static string SelectedGamesSnes = "default"; public static string HiddenGamesNes = ""; @@ -245,8 +245,8 @@ public static void Load() case "usefont": UseFont = !value.ToLower().Equals("false"); break; - case "firstrun": - FirstRun = !value.ToLower().Equals("false"); + case "runcount": + RunCount = int.Parse(value); break; case "antiarmetlevel": AntiArmetLevel = byte.Parse(value); @@ -318,7 +318,6 @@ public static void Save() configLines.Add(string.Format("ResetHack={0}", ResetHack)); configLines.Add(string.Format("AutofireHack={0}", AutofireHack)); configLines.Add(string.Format("AutofireXYHack={0}", AutofireXYHack)); - configLines.Add(string.Format("FirstRun={0}", FirstRun)); configLines.Add(string.Format("AntiArmetLevel={0}", AntiArmetLevel)); configLines.Add(string.Format("ResetCombination={0}", (byte)ResetCombination)); configLines.Add(string.Format("ConsoleType={0}", (byte)ConsoleType)); @@ -329,6 +328,7 @@ public static void Save() configLines.Add(string.Format("Compress={0}", Compress)); configLines.Add(string.Format("FtpServer={0}", FtpServer)); configLines.Add(string.Format("TelnetServer={0}", TelnetServer)); + configLines.Add(string.Format("RunCount={0}", RunCount)); configLines.Add(""); configLines.Add("[Presets]"); diff --git a/ConsoleSelectDialog.Designer.cs b/ConsoleSelectDialog.Designer.cs new file mode 100644 index 000000000..a4db0759d --- /dev/null +++ b/ConsoleSelectDialog.Designer.cs @@ -0,0 +1,98 @@ +namespace com.clusterrr.hakchi_gui +{ + partial class ConsoleSelectDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConsoleSelectDialog)); + this.labelSelectConsole = new System.Windows.Forms.Label(); + this.buttonNes = new System.Windows.Forms.Button(); + this.buttonFamicom = new System.Windows.Forms.Button(); + this.buttonSnes = new System.Windows.Forms.Button(); + this.buttonSuperFamicom = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // labelSelectConsole + // + resources.ApplyResources(this.labelSelectConsole, "labelSelectConsole"); + this.labelSelectConsole.Name = "labelSelectConsole"; + // + // buttonNes + // + resources.ApplyResources(this.buttonNes, "buttonNes"); + this.buttonNes.Name = "buttonNes"; + this.buttonNes.UseVisualStyleBackColor = true; + this.buttonNes.Click += new System.EventHandler(this.buttonNes_Click); + // + // buttonFamicom + // + resources.ApplyResources(this.buttonFamicom, "buttonFamicom"); + this.buttonFamicom.Name = "buttonFamicom"; + this.buttonFamicom.UseVisualStyleBackColor = true; + this.buttonFamicom.Click += new System.EventHandler(this.buttonFamicom_Click); + // + // buttonSnes + // + resources.ApplyResources(this.buttonSnes, "buttonSnes"); + this.buttonSnes.Name = "buttonSnes"; + this.buttonSnes.UseVisualStyleBackColor = true; + this.buttonSnes.Click += new System.EventHandler(this.buttonSnes_Click); + // + // buttonSuperFamicom + // + resources.ApplyResources(this.buttonSuperFamicom, "buttonSuperFamicom"); + this.buttonSuperFamicom.Name = "buttonSuperFamicom"; + this.buttonSuperFamicom.UseVisualStyleBackColor = true; + this.buttonSuperFamicom.Click += new System.EventHandler(this.buttonSuperFamicom_Click); + // + // ConsoleSelectDialog + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ControlBox = false; + this.Controls.Add(this.buttonSuperFamicom); + this.Controls.Add(this.buttonSnes); + this.Controls.Add(this.buttonFamicom); + this.Controls.Add(this.buttonNes); + this.Controls.Add(this.labelSelectConsole); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "ConsoleSelectDialog"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelSelectConsole; + private System.Windows.Forms.Button buttonNes; + private System.Windows.Forms.Button buttonFamicom; + private System.Windows.Forms.Button buttonSnes; + private System.Windows.Forms.Button buttonSuperFamicom; + } +} \ No newline at end of file diff --git a/ConsoleSelectDialog.cs b/ConsoleSelectDialog.cs new file mode 100644 index 000000000..114cead1d --- /dev/null +++ b/ConsoleSelectDialog.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace com.clusterrr.hakchi_gui +{ + public partial class ConsoleSelectDialog : Form + { + public ConsoleSelectDialog() + { + InitializeComponent(); + } + + private void buttonNes_Click(object sender, EventArgs e) + { + ConfigIni.ConsoleType = MainForm.ConsoleType.NES; + Close(); + } + + private void buttonFamicom_Click(object sender, EventArgs e) + { + ConfigIni.ConsoleType = MainForm.ConsoleType.Famicom; + Close(); + } + + private void buttonSnes_Click(object sender, EventArgs e) + { + ConfigIni.ConsoleType = MainForm.ConsoleType.SNES; + Close(); + } + + private void buttonSuperFamicom_Click(object sender, EventArgs e) + { + ConfigIni.ConsoleType = MainForm.ConsoleType.SuperFamicom; + Close(); + } + } +} diff --git a/ConsoleSelectDialog.resx b/ConsoleSelectDialog.resx new file mode 100644 index 000000000..b4f68e4c1 --- /dev/null +++ b/ConsoleSelectDialog.resx @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Top, Left, Right + + + + 12, 9 + + + 428, 43 + + + + 0 + + + Before we start please select your console. You can change it later using Settings menu if you want to use other console. + + + TopCenter + + + labelSelectConsole + + + System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 12, 55 + + + 205, 61 + + + 1 + + + NES Classic Mini + + + buttonNes + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + NoControl + + + 235, 55 + + + 205, 61 + + + 2 + + + Famicom Mini + + + buttonFamicom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + NoControl + + + 12, 129 + + + 205, 61 + + + 3 + + + SNES Classic Mini + + + buttonSnes + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + NoControl + + + 235, 129 + + + 205, 61 + + + 4 + + + Super Famicom Mini + + + buttonSuperFamicom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 452, 202 + + + CenterScreen + + + hakchi2 + + + ConsoleSelectDialog + + + System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/FoldersManagerForm.cs b/FoldersManagerForm.cs index 629f4ef7d..8a75c8f2b 100644 --- a/FoldersManagerForm.cs +++ b/FoldersManagerForm.cs @@ -846,10 +846,10 @@ void SaveTree() File.WriteAllText(FoldersXmlPath, TreeToXml()); if (mainForm != null) { - for (int i = 0; i < mainForm.checkedListBoxGames.Items.Count; i++) + for (int i = 1; i < mainForm.listViewGames.Items.Count; i++) { - if (deletedGames.Contains(mainForm.checkedListBoxGames.Items[i] as NesMiniApplication)) - mainForm.checkedListBoxGames.SetItemChecked(i, false); + if (deletedGames.Contains(mainForm.listViewGames.Items[i].Tag as NesMiniApplication)) + mainForm.listViewGames.Items[i].Checked = false; } for (int i = 0; i < mainForm.checkedListBoxDefaultGames.Items.Count; i++) { diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index 61063a8c9..f0e6bf396 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -39,7 +39,6 @@ private void InitializeComponent() this.deletePresetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.synchronizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.downloadCoversForAllGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.kernelToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -65,14 +64,6 @@ private void InitializeComponent() this.famicomMiniToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sNESMiniToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.superFamicomMiniToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.cloverconHackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.resetUsingCombinationOfButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.selectButtonCombinationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.enableAutofireToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.useXYOnClassicControllerAsAutofireABToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.upABStartOnSecondControllerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.useExtendedFontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.epilepsyProtectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pagesfoldersTypeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.disablePagefoldersToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); @@ -99,7 +90,15 @@ private void InitializeComponent() this.max100toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator(); this.customToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cloverconHackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.resetUsingCombinationOfButtonsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.selectButtonCombinationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.enableAutofireToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.useXYOnClassicControllerAsAutofireABToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.upABStartOnSecondControllerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.compressGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.useExtendedFontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.epilepsyProtectionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.globalCommandLineArgumentsexpertsOnluToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator(); this.saveSettingsToNESMiniNowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -116,8 +115,8 @@ private void InitializeComponent() this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.gitHubPageWithActualReleasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fAQToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.donateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.checkedListBoxGames = new System.Windows.Forms.CheckedListBox(); this.groupBoxOptions = new System.Windows.Forms.GroupBox(); this.labelSize = new System.Windows.Forms.Label(); this.checkBoxCompressed = new System.Windows.Forms.CheckBox(); @@ -150,9 +149,10 @@ private void InitializeComponent() this.toolStripProgressBar = new System.Windows.Forms.ToolStripProgressBar(); this.openFileDialogNes = new System.Windows.Forms.OpenFileDialog(); this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); - this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.unselectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.deleteGameToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.downloadBoxArtForSelectedGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.compressSelectedGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.decompressSelectedGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteSelectedGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openFileDialogImage = new System.Windows.Forms.OpenFileDialog(); this.buttonStart = new System.Windows.Forms.Button(); this.groupBoxDefaultGames = new System.Windows.Forms.GroupBox(); @@ -161,6 +161,8 @@ private void InitializeComponent() this.timerConnectionCheck = new System.Windows.Forms.Timer(this.components); this.saveDumpFileDialog = new System.Windows.Forms.SaveFileDialog(); this.openDumpFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.listViewGames = new System.Windows.Forms.ListView(); + this.gameName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.menuStrip.SuspendLayout(); this.groupBoxOptions.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBoxArt)).BeginInit(); @@ -188,7 +190,6 @@ private void InitializeComponent() this.presetsToolStripMenuItem, this.synchronizeToolStripMenuItem, this.searchToolStripMenuItem, - this.downloadCoversForAllGamesToolStripMenuItem, this.toolStripMenuItem1, this.exitToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; @@ -237,12 +238,6 @@ private void InitializeComponent() resources.ApplyResources(this.searchToolStripMenuItem, "searchToolStripMenuItem"); this.searchToolStripMenuItem.Click += new System.EventHandler(this.searchToolStripMenuItem_Click); // - // downloadCoversForAllGamesToolStripMenuItem - // - this.downloadCoversForAllGamesToolStripMenuItem.Name = "downloadCoversForAllGamesToolStripMenuItem"; - resources.ApplyResources(this.downloadCoversForAllGamesToolStripMenuItem, "downloadCoversForAllGamesToolStripMenuItem"); - this.downloadCoversForAllGamesToolStripMenuItem.Click += new System.EventHandler(this.downloadCoversForAllGamesToolStripMenuItem_Click); - // // toolStripMenuItem1 // this.toolStripMenuItem1.Name = "toolStripMenuItem1"; @@ -366,11 +361,11 @@ private void InitializeComponent() this.settingsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.languageToolStripMenuItem, this.consoleTypeToolStripMenuItem, + this.pagesfoldersTypeToolStripMenuItem, this.cloverconHackToolStripMenuItem, + this.compressGamesToolStripMenuItem, this.useExtendedFontToolStripMenuItem, this.epilepsyProtectionToolStripMenuItem, - this.pagesfoldersTypeToolStripMenuItem, - this.compressGamesToolStripMenuItem, this.globalCommandLineArgumentsexpertsOnluToolStripMenuItem, this.toolStripMenuItem5, this.saveSettingsToNESMiniNowToolStripMenuItem}); @@ -418,69 +413,6 @@ private void InitializeComponent() resources.ApplyResources(this.superFamicomMiniToolStripMenuItem, "superFamicomMiniToolStripMenuItem"); this.superFamicomMiniToolStripMenuItem.Click += new System.EventHandler(this.superFamicomMiniToolStripMenuItem_Click); // - // cloverconHackToolStripMenuItem - // - this.cloverconHackToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.resetUsingCombinationOfButtonsToolStripMenuItem, - this.selectButtonCombinationToolStripMenuItem, - this.enableAutofireToolStripMenuItem, - this.useXYOnClassicControllerAsAutofireABToolStripMenuItem, - this.upABStartOnSecondControllerToolStripMenuItem}); - this.cloverconHackToolStripMenuItem.Name = "cloverconHackToolStripMenuItem"; - resources.ApplyResources(this.cloverconHackToolStripMenuItem, "cloverconHackToolStripMenuItem"); - // - // resetUsingCombinationOfButtonsToolStripMenuItem - // - this.resetUsingCombinationOfButtonsToolStripMenuItem.Checked = true; - this.resetUsingCombinationOfButtonsToolStripMenuItem.CheckOnClick = true; - this.resetUsingCombinationOfButtonsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.resetUsingCombinationOfButtonsToolStripMenuItem.Name = "resetUsingCombinationOfButtonsToolStripMenuItem"; - resources.ApplyResources(this.resetUsingCombinationOfButtonsToolStripMenuItem, "resetUsingCombinationOfButtonsToolStripMenuItem"); - this.resetUsingCombinationOfButtonsToolStripMenuItem.Click += new System.EventHandler(this.cloverconHackToolStripMenuItem_Click); - // - // selectButtonCombinationToolStripMenuItem - // - this.selectButtonCombinationToolStripMenuItem.Name = "selectButtonCombinationToolStripMenuItem"; - resources.ApplyResources(this.selectButtonCombinationToolStripMenuItem, "selectButtonCombinationToolStripMenuItem"); - this.selectButtonCombinationToolStripMenuItem.Click += new System.EventHandler(this.selectButtonCombinationToolStripMenuItem_Click); - // - // enableAutofireToolStripMenuItem - // - this.enableAutofireToolStripMenuItem.CheckOnClick = true; - this.enableAutofireToolStripMenuItem.Name = "enableAutofireToolStripMenuItem"; - resources.ApplyResources(this.enableAutofireToolStripMenuItem, "enableAutofireToolStripMenuItem"); - this.enableAutofireToolStripMenuItem.Click += new System.EventHandler(this.enableAutofireToolStripMenuItem_Click); - // - // useXYOnClassicControllerAsAutofireABToolStripMenuItem - // - this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.CheckOnClick = true; - this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.Name = "useXYOnClassicControllerAsAutofireABToolStripMenuItem"; - resources.ApplyResources(this.useXYOnClassicControllerAsAutofireABToolStripMenuItem, "useXYOnClassicControllerAsAutofireABToolStripMenuItem"); - this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.Click += new System.EventHandler(this.useXYOnClassicControllerAsAutofireABToolStripMenuItem_Click); - // - // upABStartOnSecondControllerToolStripMenuItem - // - this.upABStartOnSecondControllerToolStripMenuItem.CheckOnClick = true; - this.upABStartOnSecondControllerToolStripMenuItem.Name = "upABStartOnSecondControllerToolStripMenuItem"; - resources.ApplyResources(this.upABStartOnSecondControllerToolStripMenuItem, "upABStartOnSecondControllerToolStripMenuItem"); - this.upABStartOnSecondControllerToolStripMenuItem.Click += new System.EventHandler(this.upABStartOnSecondControllerToolStripMenuItem_Click); - // - // useExtendedFontToolStripMenuItem - // - this.useExtendedFontToolStripMenuItem.Checked = true; - this.useExtendedFontToolStripMenuItem.CheckOnClick = true; - this.useExtendedFontToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; - this.useExtendedFontToolStripMenuItem.Name = "useExtendedFontToolStripMenuItem"; - resources.ApplyResources(this.useExtendedFontToolStripMenuItem, "useExtendedFontToolStripMenuItem"); - this.useExtendedFontToolStripMenuItem.Click += new System.EventHandler(this.useExtendedFontToolStripMenuItem_Click); - // - // epilepsyProtectionToolStripMenuItem - // - this.epilepsyProtectionToolStripMenuItem.CheckOnClick = true; - this.epilepsyProtectionToolStripMenuItem.Name = "epilepsyProtectionToolStripMenuItem"; - resources.ApplyResources(this.epilepsyProtectionToolStripMenuItem, "epilepsyProtectionToolStripMenuItem"); - this.epilepsyProtectionToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItemArmet_Click); - // // pagesfoldersTypeToolStripMenuItem // this.pagesfoldersTypeToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -672,6 +604,53 @@ private void InitializeComponent() this.customToolStripMenuItem.Tag = "99"; this.customToolStripMenuItem.Click += new System.EventHandler(this.pagesModefoldersToolStripMenuItem_Click); // + // cloverconHackToolStripMenuItem + // + this.cloverconHackToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.resetUsingCombinationOfButtonsToolStripMenuItem, + this.selectButtonCombinationToolStripMenuItem, + this.enableAutofireToolStripMenuItem, + this.useXYOnClassicControllerAsAutofireABToolStripMenuItem, + this.upABStartOnSecondControllerToolStripMenuItem}); + this.cloverconHackToolStripMenuItem.Name = "cloverconHackToolStripMenuItem"; + resources.ApplyResources(this.cloverconHackToolStripMenuItem, "cloverconHackToolStripMenuItem"); + // + // resetUsingCombinationOfButtonsToolStripMenuItem + // + this.resetUsingCombinationOfButtonsToolStripMenuItem.Checked = true; + this.resetUsingCombinationOfButtonsToolStripMenuItem.CheckOnClick = true; + this.resetUsingCombinationOfButtonsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.resetUsingCombinationOfButtonsToolStripMenuItem.Name = "resetUsingCombinationOfButtonsToolStripMenuItem"; + resources.ApplyResources(this.resetUsingCombinationOfButtonsToolStripMenuItem, "resetUsingCombinationOfButtonsToolStripMenuItem"); + this.resetUsingCombinationOfButtonsToolStripMenuItem.Click += new System.EventHandler(this.cloverconHackToolStripMenuItem_Click); + // + // selectButtonCombinationToolStripMenuItem + // + this.selectButtonCombinationToolStripMenuItem.Name = "selectButtonCombinationToolStripMenuItem"; + resources.ApplyResources(this.selectButtonCombinationToolStripMenuItem, "selectButtonCombinationToolStripMenuItem"); + this.selectButtonCombinationToolStripMenuItem.Click += new System.EventHandler(this.selectButtonCombinationToolStripMenuItem_Click); + // + // enableAutofireToolStripMenuItem + // + this.enableAutofireToolStripMenuItem.CheckOnClick = true; + this.enableAutofireToolStripMenuItem.Name = "enableAutofireToolStripMenuItem"; + resources.ApplyResources(this.enableAutofireToolStripMenuItem, "enableAutofireToolStripMenuItem"); + this.enableAutofireToolStripMenuItem.Click += new System.EventHandler(this.enableAutofireToolStripMenuItem_Click); + // + // useXYOnClassicControllerAsAutofireABToolStripMenuItem + // + this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.CheckOnClick = true; + this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.Name = "useXYOnClassicControllerAsAutofireABToolStripMenuItem"; + resources.ApplyResources(this.useXYOnClassicControllerAsAutofireABToolStripMenuItem, "useXYOnClassicControllerAsAutofireABToolStripMenuItem"); + this.useXYOnClassicControllerAsAutofireABToolStripMenuItem.Click += new System.EventHandler(this.useXYOnClassicControllerAsAutofireABToolStripMenuItem_Click); + // + // upABStartOnSecondControllerToolStripMenuItem + // + this.upABStartOnSecondControllerToolStripMenuItem.CheckOnClick = true; + this.upABStartOnSecondControllerToolStripMenuItem.Name = "upABStartOnSecondControllerToolStripMenuItem"; + resources.ApplyResources(this.upABStartOnSecondControllerToolStripMenuItem, "upABStartOnSecondControllerToolStripMenuItem"); + this.upABStartOnSecondControllerToolStripMenuItem.Click += new System.EventHandler(this.upABStartOnSecondControllerToolStripMenuItem_Click); + // // compressGamesToolStripMenuItem // this.compressGamesToolStripMenuItem.Checked = true; @@ -681,6 +660,22 @@ private void InitializeComponent() resources.ApplyResources(this.compressGamesToolStripMenuItem, "compressGamesToolStripMenuItem"); this.compressGamesToolStripMenuItem.Click += new System.EventHandler(this.compressGamesToolStripMenuItem_Click); // + // useExtendedFontToolStripMenuItem + // + this.useExtendedFontToolStripMenuItem.Checked = true; + this.useExtendedFontToolStripMenuItem.CheckOnClick = true; + this.useExtendedFontToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked; + this.useExtendedFontToolStripMenuItem.Name = "useExtendedFontToolStripMenuItem"; + resources.ApplyResources(this.useExtendedFontToolStripMenuItem, "useExtendedFontToolStripMenuItem"); + this.useExtendedFontToolStripMenuItem.Click += new System.EventHandler(this.useExtendedFontToolStripMenuItem_Click); + // + // epilepsyProtectionToolStripMenuItem + // + this.epilepsyProtectionToolStripMenuItem.CheckOnClick = true; + this.epilepsyProtectionToolStripMenuItem.Name = "epilepsyProtectionToolStripMenuItem"; + resources.ApplyResources(this.epilepsyProtectionToolStripMenuItem, "epilepsyProtectionToolStripMenuItem"); + this.epilepsyProtectionToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItemArmet_Click); + // // globalCommandLineArgumentsexpertsOnluToolStripMenuItem // this.globalCommandLineArgumentsexpertsOnluToolStripMenuItem.Name = "globalCommandLineArgumentsexpertsOnluToolStripMenuItem"; @@ -771,6 +766,7 @@ private void InitializeComponent() this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.gitHubPageWithActualReleasesToolStripMenuItem, this.fAQToolStripMenuItem, + this.donateToolStripMenuItem, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); @@ -787,21 +783,18 @@ private void InitializeComponent() resources.ApplyResources(this.fAQToolStripMenuItem, "fAQToolStripMenuItem"); this.fAQToolStripMenuItem.Click += new System.EventHandler(this.fAQToolStripMenuItem_Click); // + // donateToolStripMenuItem + // + this.donateToolStripMenuItem.Name = "donateToolStripMenuItem"; + resources.ApplyResources(this.donateToolStripMenuItem, "donateToolStripMenuItem"); + this.donateToolStripMenuItem.Click += new System.EventHandler(this.donateToolStripMenuItem_Click); + // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; resources.ApplyResources(this.aboutToolStripMenuItem, "aboutToolStripMenuItem"); this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // - // checkedListBoxGames - // - resources.ApplyResources(this.checkedListBoxGames, "checkedListBoxGames"); - this.checkedListBoxGames.Name = "checkedListBoxGames"; - this.checkedListBoxGames.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBoxGames_ItemCheck); - this.checkedListBoxGames.SelectedIndexChanged += new System.EventHandler(this.checkedListBoxGames_SelectedIndexChanged); - this.checkedListBoxGames.KeyDown += new System.Windows.Forms.KeyEventHandler(this.checkedListBoxGames_KeyDown); - this.checkedListBoxGames.MouseDown += new System.Windows.Forms.MouseEventHandler(this.checkedListBoxGames_MouseDown); - // // groupBoxOptions // resources.ApplyResources(this.groupBoxOptions, "groupBoxOptions"); @@ -840,7 +833,7 @@ private void InitializeComponent() resources.ApplyResources(this.checkBoxCompressed, "checkBoxCompressed"); this.checkBoxCompressed.Name = "checkBoxCompressed"; this.checkBoxCompressed.UseVisualStyleBackColor = true; - this.checkBoxCompressed.CheckedChanged += new System.EventHandler(this.checkBoxCompressed_CheckedChanged); + this.checkBoxCompressed.Click += new System.EventHandler(this.checkBoxCompressed_CheckedChanged); // // buttonShowGameGenieDatabase // @@ -1024,29 +1017,36 @@ private void InitializeComponent() // contextMenuStrip // this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.selectAllToolStripMenuItem, - this.unselectAllToolStripMenuItem, - this.deleteGameToolStripMenuItem}); + this.downloadBoxArtForSelectedGamesToolStripMenuItem, + this.compressSelectedGamesToolStripMenuItem, + this.decompressSelectedGamesToolStripMenuItem, + this.deleteSelectedGamesToolStripMenuItem}); this.contextMenuStrip.Name = "contextMenuStrip"; resources.ApplyResources(this.contextMenuStrip, "contextMenuStrip"); // - // selectAllToolStripMenuItem + // downloadBoxArtForSelectedGamesToolStripMenuItem + // + this.downloadBoxArtForSelectedGamesToolStripMenuItem.Name = "downloadBoxArtForSelectedGamesToolStripMenuItem"; + resources.ApplyResources(this.downloadBoxArtForSelectedGamesToolStripMenuItem, "downloadBoxArtForSelectedGamesToolStripMenuItem"); + this.downloadBoxArtForSelectedGamesToolStripMenuItem.Click += new System.EventHandler(this.downloadBoxArtForSelectedGamesToolStripMenuItem_Click); + // + // compressSelectedGamesToolStripMenuItem // - this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem"; - resources.ApplyResources(this.selectAllToolStripMenuItem, "selectAllToolStripMenuItem"); - this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click); + this.compressSelectedGamesToolStripMenuItem.Name = "compressSelectedGamesToolStripMenuItem"; + resources.ApplyResources(this.compressSelectedGamesToolStripMenuItem, "compressSelectedGamesToolStripMenuItem"); + this.compressSelectedGamesToolStripMenuItem.Click += new System.EventHandler(this.compressSelectedGamesToolStripMenuItem_Click); // - // unselectAllToolStripMenuItem + // decompressSelectedGamesToolStripMenuItem // - this.unselectAllToolStripMenuItem.Name = "unselectAllToolStripMenuItem"; - resources.ApplyResources(this.unselectAllToolStripMenuItem, "unselectAllToolStripMenuItem"); - this.unselectAllToolStripMenuItem.Click += new System.EventHandler(this.unselectAllToolStripMenuItem_Click); + this.decompressSelectedGamesToolStripMenuItem.Name = "decompressSelectedGamesToolStripMenuItem"; + resources.ApplyResources(this.decompressSelectedGamesToolStripMenuItem, "decompressSelectedGamesToolStripMenuItem"); + this.decompressSelectedGamesToolStripMenuItem.Click += new System.EventHandler(this.decompressSelectedGamesToolStripMenuItem_Click); // - // deleteGameToolStripMenuItem + // deleteSelectedGamesToolStripMenuItem // - this.deleteGameToolStripMenuItem.Name = "deleteGameToolStripMenuItem"; - resources.ApplyResources(this.deleteGameToolStripMenuItem, "deleteGameToolStripMenuItem"); - this.deleteGameToolStripMenuItem.Click += new System.EventHandler(this.deleteGameToolStripMenuItem_Click); + this.deleteSelectedGamesToolStripMenuItem.Name = "deleteSelectedGamesToolStripMenuItem"; + resources.ApplyResources(this.deleteSelectedGamesToolStripMenuItem, "deleteSelectedGamesToolStripMenuItem"); + this.deleteSelectedGamesToolStripMenuItem.Click += new System.EventHandler(this.deleteSelectedGamesToolStripMenuItem_Click); // // openFileDialogImage // @@ -1072,7 +1072,6 @@ private void InitializeComponent() this.checkedListBoxDefaultGames.FormattingEnabled = true; this.checkedListBoxDefaultGames.Name = "checkedListBoxDefaultGames"; this.checkedListBoxDefaultGames.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBoxDefaultGames_ItemCheck); - this.checkedListBoxDefaultGames.MouseDown += new System.Windows.Forms.MouseEventHandler(this.checkedListBoxDefaultGames_MouseDown); // // timerCalculateGames // @@ -1096,6 +1095,26 @@ private void InitializeComponent() // this.openDumpFileDialog.FileName = "..."; // + // listViewGames + // + resources.ApplyResources(this.listViewGames, "listViewGames"); + this.listViewGames.CheckBoxes = true; + this.listViewGames.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.gameName}); + this.listViewGames.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; + this.listViewGames.HideSelection = false; + this.listViewGames.Name = "listViewGames"; + this.listViewGames.UseCompatibleStateImageBehavior = false; + this.listViewGames.View = System.Windows.Forms.View.Details; + this.listViewGames.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.listViewGames_ItemCheck); + this.listViewGames.SelectedIndexChanged += new System.EventHandler(this.listViewGames_SelectedIndexChanged); + this.listViewGames.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewGames_KeyDown); + this.listViewGames.MouseDown += new System.Windows.Forms.MouseEventHandler(this.listViewGames_MouseDown); + // + // gameName + // + resources.ApplyResources(this.gameName, "gameName"); + // // MainForm // this.AllowDrop = true; @@ -1105,10 +1124,10 @@ private void InitializeComponent() this.Controls.Add(this.statusStrip); this.Controls.Add(this.buttonAddGames); this.Controls.Add(this.label5); - this.Controls.Add(this.checkedListBoxGames); this.Controls.Add(this.menuStrip); this.Controls.Add(this.groupBoxOptions); this.Controls.Add(this.groupBoxDefaultGames); + this.Controls.Add(this.listViewGames); this.Cursor = System.Windows.Forms.Cursors.Default; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.KeyPreview = true; @@ -1117,8 +1136,8 @@ private void InitializeComponent() this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); this.Shown += new System.EventHandler(this.MainForm_Shown); - this.DragDrop += new System.Windows.Forms.DragEventHandler(this.checkedListBoxGames_DragDrop); - this.DragEnter += new System.Windows.Forms.DragEventHandler(this.checkedListBoxGames_DragEnter); + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.dragDrop); + this.DragEnter += new System.Windows.Forms.DragEventHandler(this.dragEnter); this.menuStrip.ResumeLayout(false); this.menuStrip.PerformLayout(); this.groupBoxOptions.ResumeLayout(false); @@ -1161,7 +1180,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabelSelected; private System.Windows.Forms.OpenFileDialog openFileDialogNes; private System.Windows.Forms.ContextMenuStrip contextMenuStrip; - private System.Windows.Forms.ToolStripMenuItem deleteGameToolStripMenuItem; private System.Windows.Forms.OpenFileDialog openFileDialogImage; private System.Windows.Forms.Button buttonStart; private System.Windows.Forms.ToolStripMenuItem kernelToolStripMenuItem; @@ -1173,8 +1191,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem; private System.Windows.Forms.GroupBox groupBoxDefaultGames; private System.Windows.Forms.Timer timerCalculateGames; - private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem unselectAllToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem uninstallToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; @@ -1185,7 +1201,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem addPresetToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem deletePresetToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2; - protected internal System.Windows.Forms.CheckedListBox checkedListBoxGames; private System.Windows.Forms.ToolStripMenuItem searchToolStripMenuItem; private System.Windows.Forms.TextBox textBoxGameGenie; private System.Windows.Forms.Label label7; @@ -1199,7 +1214,6 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripMenuItem enableAutofireToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem globalCommandLineArgumentsexpertsOnluToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem upABStartOnSecondControllerToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem downloadCoversForAllGamesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem pagesfoldersTypeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem pagesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem disablePagefoldersToolStripMenuItem; @@ -1266,6 +1280,13 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxCompressed; private System.Windows.Forms.Label labelSize; private System.Windows.Forms.ToolStripMenuItem compressGamesToolStripMenuItem; + internal System.Windows.Forms.ListView listViewGames; + private System.Windows.Forms.ColumnHeader gameName; + private System.Windows.Forms.ToolStripMenuItem compressSelectedGamesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteSelectedGamesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem decompressSelectedGamesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem downloadBoxArtForSelectedGamesToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem donateToolStripMenuItem; } } diff --git a/MainForm.cs b/MainForm.cs index c97587721..dcc524c0b 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -3,6 +3,7 @@ using com.clusterrr.hakchi_gui.Properties; using SevenZip; using System; +using System.Collections; using System.Collections.Generic; using System.Deployment.Application; using System.Diagnostics; @@ -213,6 +214,8 @@ void FormInitialize() max90toolStripMenuItem.Checked = ConfigIni.MaxGamesPerFolder == 90; max100toolStripMenuItem.Checked = ConfigIni.MaxGamesPerFolder == 100; + listViewGames.ListViewItemSorter = new GamesSorter(); + // Little tweak for easy translation var tbl = textBoxName.Left; textBoxName.Left = labelName.Left + labelName.Width; @@ -352,11 +355,17 @@ public void LoadGames() } var gamesSorted = games.OrderBy(o => o.Name); - checkedListBoxGames.Items.Clear(); - checkedListBoxGames.Items.Add(Resources.Default30games, selected.Contains("default")); + listViewGames.Items.Clear(); + var listViewItem = new ListViewItem(Resources.Default30games); + listViewItem.Tag = "default"; + listViewItem.Checked = selected.Contains("default"); + listViewGames.Items.Add(listViewItem); foreach (var game in gamesSorted) { - checkedListBoxGames.Items.Add(game, selected.Contains(game.Code)); + listViewItem = new ListViewItem(game.Name); + listViewItem.Tag = game; + listViewItem.Checked = selected.Contains(game.Code); + listViewGames.Items.Add(listViewItem); } RecalculateSelectedGames(); ShowSelected(); @@ -364,7 +373,9 @@ public void LoadGames() public void ShowSelected() { - var selected = checkedListBoxGames.SelectedItem; + object selected = null; + var selectedAll = listViewGames.SelectedItems; + if (selectedAll.Count == 1) selected = selectedAll[0].Tag; if (selected == null) { groupBoxDefaultGames.Visible = false; @@ -389,7 +400,7 @@ public void ShowSelected() { groupBoxDefaultGames.Visible = true; groupBoxOptions.Visible = false; - groupBoxDefaultGames.Enabled = checkedListBoxGames.CheckedIndices.Contains(0); + groupBoxDefaultGames.Enabled = listViewGames.CheckedIndices.Contains(0); } else { @@ -473,10 +484,8 @@ void LoadPresets() ConfigIni.HiddenGames = cols[1]; var selected = ConfigIni.SelectedGames.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); var hide = ConfigIni.HiddenGames.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); - checkedListBoxGames.SetItemChecked(0, selected.Contains("default")); - for (int j = 1; j < checkedListBoxGames.Items.Count; j++) - checkedListBoxGames.SetItemChecked(j, - selected.Contains((checkedListBoxGames.Items[j] as NesMiniApplication).Code)); + for (int j = 1; j < listViewGames.Items.Count; j++) + listViewGames.Items[j].Checked = selected.Contains((listViewGames.Items[j].Tag as NesMiniApplication).Code); for (int j = 0; j < checkedListBoxDefaultGames.Items.Count; j++) checkedListBoxDefaultGames.SetItemChecked(j, !hide.Contains(((NesDefaultGame)checkedListBoxDefaultGames.Items[j]).Code)); @@ -561,14 +570,15 @@ void AddPreset(object sender, EventArgs e) } } - private void checkedListBoxGames_SelectedIndexChanged(object sender, EventArgs e) + private void listViewGames_SelectedIndexChanged(object sender, EventArgs e) { ShowSelected(); } void SetImageForSelectedGame(string fileName) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); game.Image = NesMiniApplication.LoadBitmap(fileName); @@ -587,7 +597,8 @@ private void buttonBrowseImage_Click(object sender, EventArgs e) private void buttonGoogle_Click(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); var googler = new ImageGooglerForm(game); @@ -601,15 +612,18 @@ private void buttonGoogle_Click(object sender, EventArgs e) private void textBoxName_TextChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selectedItem = listViewGames.SelectedItems[0]; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); - game.Name = textBoxName.Text; + selectedItem.Text = game.Name = textBoxName.Text; } private void radioButtonOne_CheckedChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); game.Players = (byte)(radioButtonOne.Checked ? 1 : 2); @@ -618,7 +632,8 @@ private void radioButtonOne_CheckedChanged(object sender, EventArgs e) private void textBoxPublisher_TextChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); game.Publisher = textBoxPublisher.Text.ToUpper(); @@ -626,7 +641,8 @@ private void textBoxPublisher_TextChanged(object sender, EventArgs e) private void textBoxArguments_TextChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); game.Command = textBoxArguments.Text; @@ -634,7 +650,8 @@ private void textBoxArguments_TextChanged(object sender, EventArgs e) private void maskedTextBoxReleaseDate_TextChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesMiniApplication)) return; var game = (selected as NesMiniApplication); game.ReleaseDate = maskedTextBoxReleaseDate.Text; @@ -642,7 +659,8 @@ private void maskedTextBoxReleaseDate_TextChanged(object sender, EventArgs e) private void textBoxGameGenie_TextChanged(object sender, EventArgs e) { - var selected = checkedListBoxGames.SelectedItem; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; if (selected == null || !(selected is NesGame)) return; var game = (selected as NesGame); game.GameGenie = textBoxGameGenie.Text; @@ -651,10 +669,10 @@ private void textBoxGameGenie_TextChanged(object sender, EventArgs e) private void SaveSelectedGames() { var selected = new List(); - foreach (var game in checkedListBoxGames.CheckedItems) + foreach (ListViewItem game in listViewGames.CheckedItems) { - if (game is NesMiniApplication) - selected.Add((game as NesMiniApplication).Code); + if (game.Tag is NesMiniApplication) + selected.Add((game.Tag as NesMiniApplication).Code); else selected.Add("default"); } @@ -672,16 +690,15 @@ private void SaveConfig() { SaveSelectedGames(); ConfigIni.Save(); - for (int i = 0; i < checkedListBoxGames.Items.Count; i++) + foreach (ListViewItem game in listViewGames.Items) { - var game = checkedListBoxGames.Items[i]; try { - if (game is NesMiniApplication) + if (game.Tag is NesMiniApplication) { // Maybe type was changed? Need to reload games - if ((game as NesMiniApplication).Save()) - checkedListBoxGames.Items[i] = NesMiniApplication.FromDirectory((game as NesMiniApplication).GamePath); + if ((game.Tag as NesMiniApplication).Save()) + game.Tag = NesMiniApplication.FromDirectory((game.Tag as NesMiniApplication).GamePath); } } catch (Exception ex) @@ -728,7 +745,16 @@ CountResult RecalculateSelectedGames() CountResult stats; stats.Count = 0; stats.Size = 0; - foreach (var game in checkedListBoxGames.CheckedItems) + if (!this.IsHandleCreated) + return new CountResult(); ; + var checkedGames = (IEnumerable)Invoke(new Func>(delegate + { + var r = new List(); + foreach (ListViewItem o in listViewGames.CheckedItems) + r.Add(o.Tag); + return r; + })); + foreach (var game in checkedGames) { if (game is NesMiniApplication) { @@ -776,29 +802,6 @@ private void buttonAddGames_Click(object sender, EventArgs e) } } - private void checkedListBoxGames_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button == System.Windows.Forms.MouseButtons.Right) - { - var i = checkedListBoxGames.IndexFromPoint(e.X, e.Y); - selectAllToolStripMenuItem.Tag = unselectAllToolStripMenuItem.Tag = 0; - deleteGameToolStripMenuItem.Tag = i; - deleteGameToolStripMenuItem.Enabled = i > 0; - contextMenuStrip.Show(sender as Control, e.X, e.Y); - } - } - - private void checkedListBoxDefaultGames_MouseDown(object sender, MouseEventArgs e) - { - if (e.Button == System.Windows.Forms.MouseButtons.Right) - { - var i = checkedListBoxGames.IndexFromPoint(e.X, e.Y); - selectAllToolStripMenuItem.Tag = unselectAllToolStripMenuItem.Tag = 1; - deleteGameToolStripMenuItem.Enabled = false; - contextMenuStrip.Show(sender as Control, e.X, e.Y); - } - } - DialogResult RequireKernelDump() { if (File.Exists(WorkerForm.KernelDumpPath)) return DialogResult.OK; // OK - already dumped @@ -878,7 +881,7 @@ bool DoNandFlash() if (openDumpFileDialog.ShowDialog() != DialogResult.OK) return false; var workerForm = new WorkerForm(this); - workerForm.Text = "..."; + workerForm.Text = "Bricking your console"; workerForm.Task = WorkerForm.Tasks.FlashNand; workerForm.NandDump = openDumpFileDialog.FileName; workerForm.Start(); @@ -951,10 +954,10 @@ bool UploadGames() workerForm.Config = ConfigIni.GetConfigDictionary(); workerForm.Games = new NesMenuCollection(); bool needOriginal = false; - foreach (var game in checkedListBoxGames.CheckedItems) + foreach (ListViewItem game in listViewGames.CheckedItems) { - if (game is NesMiniApplication) - workerForm.Games.Add(game as NesMiniApplication); + if (game.Tag is NesMiniApplication) + workerForm.Games.Add(game.Tag as NesMiniApplication); else needOriginal = true; } @@ -983,45 +986,30 @@ void AddGames(IEnumerable files) if (addedApps != null) { + foreach (ListViewItem item in listViewGames.Items) + item.Selected = false; // Add games, only new ones var newApps = addedApps.Distinct(new NesMiniApplication.NesMiniAppEqualityComparer()); var newCodes = from app in newApps select app.Code; - var oldAppsReplaced = from app in checkedListBoxGames.Items.Cast().ToArray() - where (app is NesMiniApplication) && newCodes.Contains((app as NesMiniApplication).Code) + var oldAppsReplaced = from app in listViewGames.Items.Cast().ToArray() + where (app.Tag is NesMiniApplication) && newCodes.Contains((app.Tag as NesMiniApplication).Code) select app; foreach (var replaced in oldAppsReplaced) - checkedListBoxGames.Items.Remove(replaced); - checkedListBoxGames.Items.AddRange(newApps.ToArray()); - var first = checkedListBoxGames.Items[0]; - bool originalChecked = (checkedListBoxGames.CheckedItems.Contains(first)); - checkedListBoxGames.Items.Remove(first); - checkedListBoxGames.Sorted = true; - checkedListBoxGames.Sorted = false; - checkedListBoxGames.Items.Insert(0, first); - checkedListBoxGames.SetItemChecked(0, originalChecked); + listViewGames.Items.Remove(replaced); + foreach (var newApp in newApps) + { + var item = new ListViewItem(newApp.Name); + item.Tag = newApp; + item.Selected = true; + item.Checked = true; + listViewGames.Items.Add(item); + } } else { // Reload all games (maybe process was terminated?) LoadGames(); } - if (addedApps != null) // if added only one game select it - { - bool first = true; - foreach (var addedApp in addedApps) - { - for (int i = 0; i < checkedListBoxGames.Items.Count; i++) - if ((checkedListBoxGames.Items[i] is NesMiniApplication) && - (checkedListBoxGames.Items[i] as NesMiniApplication).Code == addedApp.Code) - { - if (first) - checkedListBoxGames.SelectedIndex = i; - first = false; - checkedListBoxGames.SetItemChecked(i, true); - break; - } - } - } // Schedule recalculation timerCalculateGames.Enabled = false; timerCalculateGames.Enabled = true; @@ -1075,20 +1063,6 @@ bool UninstallMods(string[] mods) return workerForm.DialogResult == DialogResult.OK; } - bool DownloadAllCovers() - { - var workerForm = new WorkerForm(this); - workerForm.Text = Resources.DownloadAllCoversTitle; - workerForm.Task = WorkerForm.Tasks.DownloadAllCovers; - workerForm.Games = new NesMenuCollection(); - foreach (var game in checkedListBoxGames.Items) - { - if (game is NesMiniApplication) - workerForm.Games.Add(game as NesMiniApplication); - } - return workerForm.Start() == DialogResult.OK; - } - private void dumpKernelToolStripMenuItem_Click(object sender, EventArgs e) { if (File.Exists(WorkerForm.KernelDumpPath)) @@ -1110,8 +1084,9 @@ private void dumpTheWholeNANDToolStripMenuItem_Click(object sender, EventArgs e) private void toolFlashTheWholeNANDStripMenuItem_Click(object sender, EventArgs e) { - if (MessageBox.Show("...", Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) - == System.Windows.Forms.DialogResult.Yes) + // Maybe I'll fix it one day... + if (MessageBox.Show("It will brick your console. Do you want to continue? :)", Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) + == DialogResult.Yes) { DoNandFlash(); } @@ -1126,7 +1101,7 @@ private void dumpNANDBToolStripMenuItem_Click(object sender, EventArgs e) private void flashCustomKernelToolStripMenuItem_Click(object sender, EventArgs e) { if (MessageBox.Show(Resources.CustomKernelQ, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) - == System.Windows.Forms.DialogResult.Yes) + == DialogResult.Yes) { if (FlashCustomKernel()) MessageBox.Show(Resources.DoneYouCanUpload, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -1200,6 +1175,11 @@ private void fAQToolStripMenuItem_Click(object sender, EventArgs e) Process.Start("https://github.com/ClusterM/hakchi2/wiki/FAQ"); } + private void donateToolStripMenuItem_Click(object sender, EventArgs e) + { + Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=clusterrr%40clusterrr%2ecom&lc=RU&item_name=Cluster¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted"); + } + private void exitToolStripMenuItem_Click(object sender, EventArgs e) { Close(); @@ -1310,7 +1290,7 @@ private void timerCalculateGames_Tick(object sender, EventArgs e) timerCalculateGames.Enabled = false; // We don't need to count games repetedly } - private void checkedListBoxGames_ItemCheck(object sender, ItemCheckEventArgs e) + private void listViewGames_ItemCheck(object sender, ItemCheckEventArgs e) { if (e.Index == 0) groupBoxDefaultGames.Enabled = e.NewValue == CheckState.Checked; @@ -1328,66 +1308,27 @@ private void checkedListBoxDefaultGames_ItemCheck(object sender, ItemCheckEventA private void MainForm_Shown(object sender, EventArgs e) { - if (ConfigIni.FirstRun && !File.Exists(WorkerForm.KernelDumpPath)) + ConfigIni.RunCount++; + if (ConfigIni.RunCount == 1) { - MessageBox.Show(this, Resources.FirstRun + "\r\n\r\n" + Resources.Donate, Resources.Hello, MessageBoxButtons.OK, MessageBoxIcon.Information); - ConfigIni.FirstRun = false; - ConfigIni.Save(); - } - } - - private void deleteGameToolStripMenuItem_Click(object sender, EventArgs e) - { - deleteGame((int)(sender as ToolStripMenuItem).Tag); - } - - private void deleteGame(int pos) - { - try - { - var game = checkedListBoxGames.Items[pos] as NesMiniApplication; - if (MessageBox.Show(this, string.Format(Resources.DeleteGame, game.Name), Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes) - { - Directory.Delete(game.GamePath, true); - checkedListBoxGames.Items.RemoveAt(pos); - } + new ConsoleSelectDialog().ShowDialog(); + SyncConsoleType(); + MessageBox.Show(this, Resources.FirstRun, Resources.Hello, MessageBoxButtons.OK, MessageBoxIcon.Information); } - catch (Exception ex) + if (ConfigIni.RunCount == 10 && !string.IsNullOrEmpty(Resources.Donate.Trim())) { - Debug.WriteLine(ex.Message + ex.StackTrace); - MessageBox.Show(this, ex.Message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(this, Resources.Donate, Resources.Hello, MessageBoxButtons.OK, MessageBoxIcon.Information); } - // Schedule recalculation - timerCalculateGames.Enabled = false; - timerCalculateGames.Enabled = true; } - private void selectAllToolStripMenuItem_Click(object sender, EventArgs e) - { - if ((int)(sender as ToolStripMenuItem).Tag == 0) - for (int i = 0; i < checkedListBoxGames.Items.Count; i++) - checkedListBoxGames.SetItemChecked(i, true); - else - for (int i = 0; i < checkedListBoxDefaultGames.Items.Count; i++) - checkedListBoxDefaultGames.SetItemChecked(i, true); - } - - private void unselectAllToolStripMenuItem_Click(object sender, EventArgs e) - { - if ((int)(sender as ToolStripMenuItem).Tag == 0) - for (int i = 0; i < checkedListBoxGames.Items.Count; i++) - checkedListBoxGames.SetItemChecked(i, false); - else for (int i = 0; i < checkedListBoxDefaultGames.Items.Count; i++) - checkedListBoxDefaultGames.SetItemChecked(i, false); - } - private void checkedListBoxGames_DragEnter(object sender, DragEventArgs e) + private void dragEnter(object sender, DragEventArgs e) { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; } - private void checkedListBoxGames_DragDrop(object sender, DragEventArgs e) + private void dragDrop(object sender, DragEventArgs e) { var files = (string[])e.Data.GetData(DataFormats.FileDrop); @@ -1448,20 +1389,6 @@ private void searchToolStripMenuItem_Click(object sender, EventArgs e) searchForm.Show(); } - private void downloadCoversForAllGamesToolStripMenuItem_Click(object sender, EventArgs e) - { - if (DownloadAllCovers()) - MessageBox.Show(this, Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); - ShowSelected(); - timerCalculateGames.Enabled = true; - } - - private void checkedListBoxGames_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyCode == Keys.Delete && checkedListBoxGames.SelectedIndex > 0) - deleteGame(checkedListBoxGames.SelectedIndex); - } - private void toolStripMenuMaxGamesPerFolder_Click(object sender, EventArgs e) { ConfigIni.MaxGamesPerFolder = byte.Parse((sender as ToolStripMenuItem).Text); @@ -1478,7 +1405,7 @@ private void toolStripMenuMaxGamesPerFolder_Click(object sender, EventArgs e) max90toolStripMenuItem.Checked = ConfigIni.MaxGamesPerFolder == 90; max100toolStripMenuItem.Checked = ConfigIni.MaxGamesPerFolder == 100; } - + private void compressGamesToolStripMenuItem_Click(object sender, EventArgs e) { ConfigIni.Compress = compressGamesToolStripMenuItem.Checked; @@ -1486,10 +1413,12 @@ private void compressGamesToolStripMenuItem_Click(object sender, EventArgs e) private void buttonShowGameGenieDatabase_Click(object sender, EventArgs e) { - if (!(checkedListBoxGames.SelectedItem is ISupportsGameGenie)) return; - NesMiniApplication nesGame = checkedListBoxGames.SelectedItem as NesMiniApplication; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; + if (!(selected is ISupportsGameGenie)) return; + NesMiniApplication nesGame = selected as NesMiniApplication; GameGenieCodeForm lFrm = new GameGenieCodeForm(nesGame); - if (lFrm.ShowDialog() == System.Windows.Forms.DialogResult.OK) + if (lFrm.ShowDialog() == DialogResult.OK) textBoxGameGenie.Text = (nesGame as ISupportsGameGenie).GameGenie; } @@ -1581,10 +1510,10 @@ private void saveStateManagerToolStripMenuItem_Click(object sender, EventArgs e) gameNames[game.Code] = game.Name; foreach (var game in defaultSuperFamicomGames) gameNames[game.Code] = game.Name; - foreach (var game in checkedListBoxGames.Items) + foreach (ListViewItem item in listViewGames.Items) { - if (game is NesMiniApplication) - gameNames[(game as NesMiniApplication).Code] = (game as NesMiniApplication).Name; + if (item.Tag is NesMiniApplication) + gameNames[(item.Tag as NesMiniApplication).Code] = (item.Tag as NesMiniApplication).Name; } var form = new SaveStateManager(gameNames); form.ShowDialog(); @@ -1735,14 +1664,14 @@ private void checkBoxCompressed_CheckedChanged(object sender, EventArgs e) { try { - if (!(checkedListBoxGames.SelectedItem is NesMiniApplication)) return; - var selected = checkedListBoxGames.SelectedItem as NesMiniApplication; + if (listViewGames.SelectedItems.Count != 1) return; + var selected = listViewGames.SelectedItems[0].Tag; checkBoxCompressed.Enabled = false; if (checkBoxCompressed.Checked) - selected.Compress(); + (selected as NesMiniApplication).Compress(); else - selected.Decompress(); - selected.Save(); + (selected as NesMiniApplication).Decompress(); + (selected as NesMiniApplication).Save(); timerCalculateGames.Enabled = true; ShowSelected(); } @@ -1752,5 +1681,113 @@ private void checkBoxCompressed_CheckedChanged(object sender, EventArgs e) MessageBox.Show(this, ex.Message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); } } + + private class GamesSorter : IComparer + { + public int Compare(object o1, object o2) + { + if (o1 is ListViewItem) + o1 = (o1 as ListViewItem).Tag; + if (o2 is ListViewItem) + o2 = (o2 as ListViewItem).Tag; + if (!(o1 is NesMiniApplication)) + return -1; + if (!(o2 is NesMiniApplication)) + return 1; + return ((o1 as NesMiniApplication).Name.CompareTo((o2 as NesMiniApplication).Name)); + } + } + + bool GroupTaskWithSelected(WorkerForm.Tasks task) + { + var workerForm = new WorkerForm(this); + switch (task) + { + case WorkerForm.Tasks.DownloadCovers: + workerForm.Text = Resources.DownloadAllCoversTitle; + break; + case WorkerForm.Tasks.CompressGames: + workerForm.Text = Resources.CompressingGames; + break; + case WorkerForm.Tasks.DecompressGames: + workerForm.Text = Resources.DecompressingGames; + break; + case WorkerForm.Tasks.DeleteGames: + workerForm.Text = Resources.RemovingGames; + break; + } + workerForm.Task = task; + workerForm.Games = new NesMenuCollection(); + foreach (ListViewItem game in listViewGames.SelectedItems) + { + if (game.Tag is NesMiniApplication) + workerForm.Games.Add(game.Tag as NesMiniApplication); + } + return workerForm.Start() == DialogResult.OK; + } + + private void downloadBoxArtForSelectedGamesToolStripMenuItem_Click(object sender, EventArgs e) + { + if (GroupTaskWithSelected(WorkerForm.Tasks.DownloadCovers)) + MessageBox.Show(this, Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); + ShowSelected(); + timerCalculateGames.Enabled = true; + } + + private void compressSelectedGamesToolStripMenuItem_Click(object sender, EventArgs e) + { + if (GroupTaskWithSelected(WorkerForm.Tasks.CompressGames)) + MessageBox.Show(this, Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); + ShowSelected(); + timerCalculateGames.Enabled = true; + } + + private void decompressSelectedGamesToolStripMenuItem_Click(object sender, EventArgs e) + { + if (GroupTaskWithSelected(WorkerForm.Tasks.DecompressGames)) + MessageBox.Show(this, Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); + ShowSelected(); + timerCalculateGames.Enabled = true; + } + + private void DeleteSelectedGames() + { + if (MessageBox.Show(this, Resources.DeleteSelectedGamesQ, Resources.AreYouSure, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == System.Windows.Forms.DialogResult.Yes) + { + if (GroupTaskWithSelected(WorkerForm.Tasks.DeleteGames)) + { + foreach (ListViewItem item in listViewGames.SelectedItems) + if (item.Tag is NesMiniApplication) + listViewGames.Items.Remove(item); + //MessageBox.Show(this, Resources.Done, Resources.Wow, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else LoadGames(); + timerCalculateGames.Enabled = true; + } + } + + private void deleteSelectedGamesToolStripMenuItem_Click(object sender, EventArgs e) + { + DeleteSelectedGames(); + } + + private void listViewGames_MouseDown(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + downloadBoxArtForSelectedGamesToolStripMenuItem.Enabled = + compressSelectedGamesToolStripMenuItem.Enabled = + decompressSelectedGamesToolStripMenuItem.Enabled = + deleteSelectedGamesToolStripMenuItem.Enabled = + (listViewGames.SelectedItems.Count > 1) || (listViewGames.SelectedItems.Count == 1 && listViewGames.SelectedItems[0].Tag is NesMiniApplication); + contextMenuStrip.Show(sender as Control, e.X, e.Y); + } + } + + private void listViewGames_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete && ((listViewGames.SelectedItems.Count > 1) ||(listViewGames.SelectedItems.Count == 1 && listViewGames.SelectedItems[0].Tag is NesMiniApplication))) + DeleteSelectedGames(); + } } } diff --git a/MainForm.resx b/MainForm.resx index 005adb168..0dd07c055 100644 --- a/MainForm.resx +++ b/MainForm.resx @@ -165,18 +165,54 @@ Language + + 184, 22 + + + NES Classic Mini + + + 184, 22 + + + Famicom Mini + + + 184, 22 + + + SNES Classic Mini + + + 184, 22 + + + Super Famicom Mini + 327, 22 Console type + + 327, 22 + + + Pages/folders structure + 327, 22 Controller hacks + + 327, 22 + + + Compress games when adding + 327, 22 @@ -189,18 +225,6 @@ Disable epilepsy protection - - 327, 22 - - - Pages/folders structure - - - 327, 22 - - - Compress games when adding - 327, 22 @@ -260,20 +284,20 @@ $this - 6 + 5 Ctrl+O - 238, 22 + 208, 22 Add more &games - 238, 22 + 208, 22 Selection presets @@ -297,7 +321,7 @@ F5 - 238, 22 + 208, 22 Synchronize @@ -306,22 +330,16 @@ Ctrl+F - 238, 22 + 208, 22 Search - - 238, 22 - - - Download box art for all games - - 235, 6 + 205, 6 - 238, 22 + 208, 22 &Exit @@ -404,60 +422,6 @@ Uninstall extra modules - - 184, 22 - - - NES Mini - - - 184, 22 - - - Famicom Mini - - - 184, 22 - - - SNES Mini - - - 184, 22 - - - Super Famicom Mini - - - 308, 22 - - - Use button combination to reset - - - 308, 22 - - - Select reset button combination - - - 308, 22 - - - Use "Select+A/B" to enable autofire on A/B - - - 308, 22 - - - Use X/Y on Classic Controller as autofire A/B - - - 308, 22 - - - "Up+A+B = Start" on 2nd controller - 356, 22 @@ -608,6 +572,36 @@ Custom - show Folders Manager every time + + 308, 22 + + + Use button combination to reset + + + 308, 22 + + + Select reset button combination + + + 308, 22 + + + Use "Select+A/B" to enable autofire on A/B + + + 308, 22 + + + Use X/Y on Classic Controller as autofire A/B + + + 308, 22 + + + "Up+A+B = Start" on 2nd controller + 331, 22 @@ -671,36 +665,18 @@ FAQ + + 246, 22 + + + Donate + 246, 22 About... - - None - - - 12, 57 - - - 282, 499 - - - 1 - - - checkedListBoxGames - - - System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - None @@ -990,10 +966,7 @@ $this - 7 - - - True + 6 NoControl @@ -1002,7 +975,7 @@ 15, 73 - 30, 13 + 82, 41 19 @@ -1674,7 +1647,7 @@ 638, 17 - 141, 70 + 270, 92 contextMenuStrip @@ -1682,23 +1655,32 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 140, 22 + + 269, 22 + + + Download box art for selected games - - Select all + + 269, 22 - - 140, 22 + + Compress selected games - - Unselect all + + 269, 22 - - 140, 22 + + Decompress selected games - - Delete game + + Del + + + 269, 22 + + + Delete selected games 17, 98 @@ -1776,7 +1758,7 @@ $this - 8 + 7 Top, Bottom, Left, Right @@ -1817,6 +1799,36 @@ 164, 17 + + None + + + 12, 57 + + + 282, 499 + + + 7 + + + listViewGames + + + System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 8 + + + Game name + + + 253 + True @@ -3024,12 +3036,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - downloadCoversForAllGamesToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - toolStripMenuItem1 @@ -3180,54 +3186,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cloverconHackToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - resetUsingCombinationOfButtonsToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - selectButtonCombinationToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - enableAutofireToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - useXYOnClassicControllerAsAutofireABToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - upABStartOnSecondControllerToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - useExtendedFontToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - epilepsyProtectionToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - pagesfoldersTypeToolStripMenuItem @@ -3384,12 +3342,60 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cloverconHackToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + resetUsingCombinationOfButtonsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + selectButtonCombinationToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + enableAutofireToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + useXYOnClassicControllerAsAutofireABToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + upABStartOnSecondControllerToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + compressGamesToolStripMenuItem System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + useExtendedFontToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + epilepsyProtectionToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + globalCommandLineArgumentsexpertsOnluToolStripMenuItem @@ -3486,6 +3492,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + donateToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + aboutToolStripMenuItem @@ -3522,22 +3534,28 @@ System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - selectAllToolStripMenuItem + + downloadBoxArtForSelectedGamesToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + compressSelectedGamesToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - unselectAllToolStripMenuItem + + decompressSelectedGamesToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - deleteGameToolStripMenuItem + + deleteSelectedGamesToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -3570,6 +3588,12 @@ System.Windows.Forms.OpenFileDialog, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gameName + + + System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + MainForm diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index be189bb59..6f6962152 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("hakchi2")] -[assembly: AssemblyDescription("Based on hakchi by madmonkey.\r\n\r\nTranslators:\r\nBritish English: Jhynjhiruu Rekrap\r\nFrench: Ac_K\r\nSpanish of Spain: Naiki (https://twitter.com/___naiki___)\r\nSpanish of Argentina: KNTRO (kntro@msn.com)\r\nGerman: Peamur\r\nItalian: student\r\nCatalan: Truchen (tarduschl@hotmail.com)\r\nDutch: Mark Dekker - Mad Mega\r\nSlovak: Patrik Žec aka PATWIST\r\nGerman: Peamur\r\nGreek: MiLToS_666 (miltos.arpazopoulos@gmail.com)\r\nFinnish: Luoti-Lasse\r\nBulgarian: Jelmer de Groot\r\nChinese: 九五二七 <3q.9527.tw>\r\nUkrainian: Пестренко Олекса \r\n\r\nSpecial thanks:\r\nxsnake for Japanese font.\r\nPete Batard/Akeo for Zadig.\r\npbatard for libwdi.\r\nThomas Bleeker for WinUSBNet lib.\r\nbootgod for cartridge database.\r\nMarkovtsev Vadim for SevenZipSharp lib.\r\nNeoRame for Graphics.\r\nNhakin for Game Genie database.\r\nmooware for mooftpserv.\r\nNintendo for my childhood.\r\n\r\nMy site: http://clusterrr.com\r\nEmail: clusterrr@clusterrr.com\r\nPayPal for donations: clusterrr@clusterrr.com")] +[assembly: AssemblyDescription("Based on hakchi by madmonkey.\r\n\r\nTranslators:\r\nBritish English: Jhynjhiruu Rekrap\r\nFrench: Ac_K\r\nSpanish of Spain: Naiki (https://twitter.com/___naiki___)\r\nSpanish of Argentina: KNTRO (kntro@msn.com)\r\nGerman: Peamur\r\nItalian: student\r\nCatalan: Truchen (tarduschl@hotmail.com)\r\nDutch: Mark Dekker - Mad Mega\r\nSlovak: Patrik Žec aka PATWIST\r\nGerman: Peamur\r\nGreek: MiLToS_666 (miltos.arpazopoulos@gmail.com)\r\nFinnish: Luoti-Lasse\r\nBulgarian: Jelmer de Groot\r\nChinese: 九五二七 <3q.9527.tw>\r\nUkrainian: Пестренко Олекса \r\n\r\nSpecial thanks:\r\nmadmonkey and pcm720 for great help with everything.\r\nxsnake for Japanese font.\r\nPete Batard/Akeo for Zadig.\r\npbatard for libwdi.\r\nThomas Bleeker for WinUSBNet lib.\r\nbootgod for cartridge database.\r\nMarkovtsev Vadim for SevenZipSharp lib.\r\nNeoRame for Graphics.\r\nNhakin for Game Genie database.\r\nmooware for mooftpserv.\r\nNintendo for my childhood.\r\n\r\nMy site: http://clusterrr.com\r\nEmail: clusterrr@clusterrr.com\r\nPayPal for donations: clusterrr@clusterrr.com")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Alexey 'Cluster' Avdyukhin")] [assembly: AssemblyProduct("hakchi2")] @@ -33,6 +33,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.20.1")] -[assembly: AssemblyFileVersion("2.0.20.1")] +[assembly: AssemblyVersion("2.0.20.2")] +[assembly: AssemblyFileVersion("2.0.20.2")] [assembly: NeutralResourcesLanguageAttribute("en-US")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs deleted file mode 100644 index 7acdef171..000000000 --- a/Properties/Resources.Designer.cs +++ /dev/null @@ -1,1606 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace com.clusterrr.hakchi_gui.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("com.clusterrr.hakchi_gui.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Processing games, please wait.... - /// - internal static string AddingGames { - get { - return ResourceManager.GetString("AddingGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to All files. - /// - internal static string AllFiles { - get { - return ResourceManager.GetString("AllFiles", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Are you sure?. - /// - internal static string AreYouSure { - get { - return ResourceManager.GetString("AreYouSure", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Data automatically filled for {0} game(s).. - /// - internal static string AutofillResult { - get { - return ResourceManager.GetString("AutofillResult", resourceCulture); - } - } - /// - /// Looks up a localized string similar to Data automatically filled for {0} game(s).. - /// - internal static string Size - { - get - { - return ResourceManager.GetString("Size", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hold Select+A/B for a second to enable/disable autofire A/B.. - /// - internal static string AutofireHelp1 { - get { - return ResourceManager.GetString("AutofireHelp1", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_2600 { - get { - object obj = ResourceManager.GetObject("blank_2600", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - internal static System.Drawing.Bitmap blank_snes_eu_jp - { - get - { - object obj = ResourceManager.GetObject("blank_snes_eu_jp", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_32x { - get { - object obj = ResourceManager.GetObject("blank_32x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_app { - get { - object obj = ResourceManager.GetObject("blank_app", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_arcade { - get { - object obj = ResourceManager.GetObject("blank_arcade", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_fds { - get { - object obj = ResourceManager.GetObject("blank_fds", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_gb { - get { - object obj = ResourceManager.GetObject("blank_gb", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_gba { - get { - object obj = ResourceManager.GetObject("blank_gba", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_gbc { - get { - object obj = ResourceManager.GetObject("blank_gbc", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_genesis { - get { - object obj = ResourceManager.GetObject("blank_genesis", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_gg { - get { - object obj = ResourceManager.GetObject("blank_gg", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_jp { - get { - object obj = ResourceManager.GetObject("blank_jp", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_n64 { - get { - object obj = ResourceManager.GetObject("blank_n64", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_neogeo { - get { - object obj = ResourceManager.GetObject("blank_neogeo", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_nes { - get { - object obj = ResourceManager.GetObject("blank_nes", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_pce { - get { - object obj = ResourceManager.GetObject("blank_pce", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_sms { - get { - object obj = ResourceManager.GetObject("blank_sms", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap blank_snes_us { - get { - object obj = ResourceManager.GetObject("blank_snes_us", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to Building the custom kernel image.... - /// - internal static string BuildingCustom { - get { - return ResourceManager.GetString("BuildingCustom", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Building the folder structure.... - /// - internal static string BuildingFolders { - get { - return ResourceManager.GetString("BuildingFolders", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Congratulations!. - /// - internal static string Congratulations { - get { - return ResourceManager.GetString("Congratulations", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Custom kernel. - /// - internal static string CustomKernel { - get { - return ResourceManager.GetString("CustomKernel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to flash the custom kernel?. - /// - internal static string CustomKernelQ { - get { - return ResourceManager.GetString("CustomKernelQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Now you need to flash the custom kernel to your NES Mini. This is only required once. Do you want to continue?. - /// - internal static string CustomWarning { - get { - return ResourceManager.GetString("CustomWarning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Original 30 games. - /// - internal static string Default30games { - get { - return ResourceManager.GetString("Default30games", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete "{0}"?. - /// - internal static string DeleteElement { - get { - return ResourceManager.GetString("DeleteElement", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete {0} elements?. - /// - internal static string DeleteElements { - get { - return ResourceManager.GetString("DeleteElements", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete "{0}" game?. - /// - internal static string DeleteGame { - get { - return ResourceManager.GetString("DeleteGame", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete the "{0}" preset?. - /// - internal static string DeletePreset { - get { - return ResourceManager.GetString("DeletePreset", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to delete those save-states?. - /// - internal static string DeleteSavesQ { - get { - return ResourceManager.GetString("DeleteSavesQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to P.S. If you like it, you can donate to me. You can find my PayPal in the "About" box.. - /// - internal static string Donate { - get { - return ResourceManager.GetString("Donate", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done!. - /// - internal static string Done { - get { - return ResourceManager.GetString("Done", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done! Wait until the power LED goes out and restart your NES Mini.. - /// - internal static string DoneUploaded { - get { - return ResourceManager.GetString("DoneUploaded", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done! You can upload games to your NES Mini now.. - /// - internal static string DoneYouCanUpload { - get { - return ResourceManager.GetString("DoneYouCanUpload", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Downloading box art for all games (I'm feeling lucky!). - /// - internal static string DownloadAllCoversTitle { - get { - return ResourceManager.GetString("DownloadAllCoversTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to cancel the current operation?. - /// - internal static string DoYouWantCancel { - get { - return ResourceManager.GetString("DoYouWantCancel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to continue?. - /// - internal static string DoYouWantToContinue { - get { - return ResourceManager.GetString("DoYouWantToContinue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dumping kernel.... - /// - internal static string DumpingKernel { - get { - return ResourceManager.GetString("DumpingKernel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Dumping kernel.... - /// - internal static string DumpingNand - { - get - { - return ResourceManager.GetString("DumpingNand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to dump the kernel?. - /// - internal static string DumpKernelQ { - get { - return ResourceManager.GetString("DumpKernelQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to dump the kernel?. - /// - internal static string DumpNandQ - { - get - { - return ResourceManager.GetString("DumpNandQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Error. - /// - internal static string Error { - get { - return ResourceManager.GetString("Error", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Executing command:. - /// - internal static string ExecutingCommand { - get { - return ResourceManager.GetString("ExecutingCommand", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Executing fes1.... - /// - internal static string ExecutingFes1 { - get { - return ResourceManager.GetString("ExecutingFes1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You can add global command-line arguments which will be appended to all games including the original 30. This is only for experts!. - /// - internal static string ExtraArgsInfo { - get { - return ResourceManager.GetString("ExtraArgsInfo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Extra command-line arguments. - /// - internal static string ExtraArgsTitle { - get { - return ResourceManager.GetString("ExtraArgsTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Hello there! I'm very glad that you are using hakchi2. It's very simple to use. Just click "Add more games", select some ROMs, press "Synchronize" and follow the instructions. Good luck!. - /// - internal static string FirstRun { - get { - return ResourceManager.GetString("FirstRun", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Flashing custom kernel.... - /// - internal static string FlasingCustom { - get { - return ResourceManager.GetString("FlasingCustom", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Flashing original kernel.... - /// - internal static string FlasingOriginal { - get { - return ResourceManager.GetString("FlasingOriginal", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder { - get { - object obj = ResourceManager.GetObject("folder", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_a { - get { - object obj = ResourceManager.GetObject("folder_a", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_b { - get { - object obj = ResourceManager.GetObject("folder_b", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_back { - get { - object obj = ResourceManager.GetObject("folder_back", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_c { - get { - object obj = ResourceManager.GetObject("folder_c", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_d { - get { - object obj = ResourceManager.GetObject("folder_d", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_e { - get { - object obj = ResourceManager.GetObject("folder_e", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_f { - get { - object obj = ResourceManager.GetObject("folder_f", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_g { - get { - object obj = ResourceManager.GetObject("folder_g", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_h { - get { - object obj = ResourceManager.GetObject("folder_h", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_i { - get { - object obj = ResourceManager.GetObject("folder_i", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_j { - get { - object obj = ResourceManager.GetObject("folder_j", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_k { - get { - object obj = ResourceManager.GetObject("folder_k", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_l { - get { - object obj = ResourceManager.GetObject("folder_l", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_m { - get { - object obj = ResourceManager.GetObject("folder_m", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_n { - get { - object obj = ResourceManager.GetObject("folder_n", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_number { - get { - object obj = ResourceManager.GetObject("folder_number", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_o { - get { - object obj = ResourceManager.GetObject("folder_o", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_p { - get { - object obj = ResourceManager.GetObject("folder_p", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_q { - get { - object obj = ResourceManager.GetObject("folder_q", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_r { - get { - object obj = ResourceManager.GetObject("folder_r", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_s { - get { - object obj = ResourceManager.GetObject("folder_s", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_t { - get { - object obj = ResourceManager.GetObject("folder_t", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_u { - get { - object obj = ResourceManager.GetObject("folder_u", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_v { - get { - object obj = ResourceManager.GetObject("folder_v", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_w { - get { - object obj = ResourceManager.GetObject("folder_w", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_x { - get { - object obj = ResourceManager.GetObject("folder_x", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_y { - get { - object obj = ResourceManager.GetObject("folder_y", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap folder_z { - get { - object obj = ResourceManager.GetObject("folder_z", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to Deleted content will be moved to the Recycle Bin. You can delete this folder permanently or move the games to other folders.. - /// - internal static string FolderContent { - get { - return ResourceManager.GetString("FolderContent", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Back. - /// - internal static string FolderNameBack { - get { - return ResourceManager.GetString("FolderNameBack", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to More games.... - /// - internal static string FolderNameMoreGames { - get { - return ResourceManager.GetString("FolderNameMoreGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New folder. - /// - internal static string FolderNameNewFolder { - get { - return ResourceManager.GetString("FolderNameNewFolder", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Original 30 games. - /// - internal static string FolderNameOriginalGames { - get { - return ResourceManager.GetString("FolderNameOriginalGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Recycle Bin. - /// - internal static string FolderNameTrashBin { - get { - return ResourceManager.GetString("FolderNameTrashBin", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unsorted. - /// - internal static string FolderNameUnsorted { - get { - return ResourceManager.GetString("FolderNameUnsorted", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Membooting. - /// - internal static string Membooting - { - get - { - return ResourceManager.GetString("Membooting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to save this folder structure?. - /// - internal static string FoldersSaveQ { - get { - return ResourceManager.GetString("FoldersSaveQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Folder "{0}" contains {1} elements.. - /// - internal static string FolderStatistics { - get { - return ResourceManager.GetString("FolderStatistics", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sorry, {0} uses four-screen mode (i.e. the game has additional VRAM memory in the cartridge), and this feature is not supported by the NES Mini. The game will probably not start. But it should work if other emulator's module installed. Do you want to add this game anyway?. - /// - internal static string FourScreenNotSupported { - get { - return ResourceManager.GetString("FourScreenNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid Game Genie code "{0}" for game "{1}".. - /// - internal static string GameGenieFormatError { - get { - return ResourceManager.GetString("GameGenieFormatError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Can't apply Game Genie code "{0}" to game "{1}" - value not found. Maybe this code is for another game?. - /// - internal static string GameGenieNotFound { - get { - return ResourceManager.GetString("GameGenieNotFound", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap gamepad { - get { - object obj = ResourceManager.GetObject("gamepad", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to Games and apps. - /// - internal static string GamesAndApps { - get { - return ResourceManager.GetString("GamesAndApps", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to games(s) selected. - /// - internal static string GamesSelected { - get { - return ResourceManager.GetString("GamesSelected", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sorry, game "{0}" is too big.. - /// - internal static string GameTooBig { - get { - return ResourceManager.GetString("GameTooBig", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to delete "{0}" code?. - /// - internal static string GGCodeDelete { - get { - return ResourceManager.GetString("GGCodeDelete", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You must enter a code!. - /// - internal static string GGCodeEmpty { - get { - return ResourceManager.GetString("GGCodeEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to This code already exists. Do you want to edit it?. - /// - internal static string GGCodeExists { - get { - return ResourceManager.GetString("GGCodeExists", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to You must enter a description!. - /// - internal static string GGDescriptionEmpty { - get { - return ResourceManager.GetString("GGDescriptionEmpty", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Googling for . - /// - internal static string GooglingFor { - get { - return ResourceManager.GetString("GooglingFor", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap green { - get { - object obj = ResourceManager.GetObject("green", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to Hello. - /// - internal static string Hello { - get { - return ResourceManager.GetString("Hello", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Images. - /// - internal static string Images { - get { - return ResourceManager.GetString("Images", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please input a preset name for the current games selection.. - /// - internal static string InputPreset { - get { - return ResourceManager.GetString("InputPreset", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Installing mods.... - /// - internal static string InstallingMods { - get { - return ResourceManager.GetString("InstallingMods", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid kernel header.. - /// - internal static string InvalidKernelHeader { - get { - return ResourceManager.GetString("InvalidKernelHeader", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid kernel size:. - /// - internal static string InvalidKernelSize { - get { - return ResourceManager.GetString("InvalidKernelSize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your original kernel is saved in the "dump" folder. Do not lose it. . - /// - internal static string KernelDumped { - get { - return ResourceManager.GetString("KernelDumped", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Your original kernel is saved in the "dump" folder. Do not lose it. . - /// - internal static string NandDumped - { - get - { - return ResourceManager.GetString("NandDumped", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Loading games.... - /// - internal static string LoadingGames { - get { - return ResourceManager.GetString("LoadingGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to HOME Menu. - /// - internal static string MainMenu { - get { - return ResourceManager.GetString("MainMenu", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sorry, "{0}" uses mapper #{1} but this mapper is not supported by the NES Mini and the game will probably not start with the default emulator. But it should work if other emulator's module installed. Do you want to add this game?. - /// - internal static string MapperNotSupported { - get { - return ResourceManager.GetString("MapperNotSupported", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kernel dumped but the MD5 checksum is unknown:. - /// - internal static string MD5Failed { - get { - return ResourceManager.GetString("MD5Failed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to The kernel is already patched or it's an unknown revision. Please send this message to me (press Ctrl+C). Continue at your own risk.. - /// - internal static string MD5Failed2 { - get { - return ResourceManager.GetString("MD5Failed2", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Sorry, there are {0}MBytes of games, it's too much.. - /// - internal static string MemoryFull { - get { - return ResourceManager.GetString("MemoryFull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Total writable memory size: {0:F1}MBytes|Available memory for games: {1:F1}MBytes|Used by saves: {2:F1}MBytes|Used by other files: {3:F1}MBytes. - /// - internal static string MemoryStats { - get { - return ResourceManager.GetString("MemoryStats", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New games are moved to the "Unsorted" folder.. - /// - internal static string NewGamesUnsorted { - get { - return ResourceManager.GetString("NewGamesUnsorted", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to New selection preset. - /// - internal static string NewPreset { - get { - return ResourceManager.GetString("NewPreset", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No. - /// - internal static string No { - get { - return ResourceManager.GetString("No", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No for all. - /// - internal static string NoForAll { - get { - return ResourceManager.GetString("NoForAll", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No kernel dump found. - /// - internal static string NoKernel { - get { - return ResourceManager.GetString("NoKernel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to First, dump the kernel image of your NES Mini. You only need to do this once. Do you want to continue?. - /// - internal static string NoKernelWarning { - get { - return ResourceManager.GetString("NoKernelWarning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to No kernel dump found. You need to dump the kernel first.. - /// - internal static string NoKernelYouNeed { - get { - return ResourceManager.GetString("NoKernelYouNeed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Can't start Telnet client, seems like it's disabled. You need to enable it first, you can do it in “Control Panel“ -> “Programs“ -> "Turn Windows features on or off".. - /// - internal static string NoTelnet { - get { - return ResourceManager.GetString("NoTelnet", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Not found:. - /// - internal static string NotFound { - get { - return ResourceManager.GetString("NotFound", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you want to flash the original kernel?. - /// - internal static string OriginalKernelQ { - get { - return ResourceManager.GetString("OriginalKernelQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Don't worry! Everything is fine. There are just too many ROMs to transfer at once. Please wait until power LED goes out, press OK and follow the instructions to continue.. - /// - internal static string ParticallyBody { - get { - return ResourceManager.GetString("ParticallyBody", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Too many ROMs. - /// - internal static string ParticallyTitle { - get { - return ResourceManager.GetString("ParticallyTitle", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Patch available. - /// - internal static string PatchAvailable { - get { - return ResourceManager.GetString("PatchAvailable", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to There is patch for "{0}". Do you want to patch this game?. - /// - internal static string PatchQ { - get { - return ResourceManager.GetString("PatchQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to If this problem persists, try using another USB port or cable.. - /// - internal static string PleaseTryAgainUSB { - get { - return ResourceManager.GetString("PleaseTryAgainUSB", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Please wait.... - /// - internal static string PleaseWait { - get { - return ResourceManager.GetString("PleaseWait", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Press OK to continue.. - /// - internal static string PressOkToContinue { - get { - return ResourceManager.GetString("PressOkToContinue", resourceCulture); - } - } - - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap red { - get { - object obj = ResourceManager.GetObject("red", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// - /// Looks up a localized string similar to You already have the kernel dump. If you REALLY want to replace the backup of your kernel and you REALLY understand what you are doing, delete the "dump" folder manually.. - /// - internal static string ReplaceKernelQ { - get { - return ResourceManager.GetString("ReplaceKernelQ", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to NES Mini save-state backups. - /// - internal static string SavesFlterName { - get { - return ResourceManager.GetString("SavesFlterName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select at least one game.. - /// - internal static string SelectAtLeast { - get { - return ResourceManager.GetString("SelectAtLeast", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select at least two buttons.. - /// - internal static string SelectAtLeastTwo { - get { - return ResourceManager.GetString("SelectAtLeastTwo", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the modules to install on your NES Mini.. - /// - internal static string SelectModsInstall { - get { - return ResourceManager.GetString("SelectModsInstall", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Select the modules to remove from your NES Mini.. - /// - internal static string SelectModsUninstall { - get { - return ResourceManager.GetString("SelectModsUninstall", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Size of selected save-states: {0}KB. - /// - internal static string SizeOfSaves { - get { - return ResourceManager.GetString("SizeOfSaves", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Don't forget to perform a factory reset if you want to delete all Suspend Points.. - /// - internal static string UninstallFactoryNote { - get { - return ResourceManager.GetString("UninstallFactoryNote", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uninstalling.... - /// - internal static string Uninstalling { - get { - return ResourceManager.GetString("Uninstalling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uninstalling mods.... - /// - internal static string UninstallingMods { - get { - return ResourceManager.GetString("UninstallingMods", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Do you really want to remove all traces of hakchi2 and return your NES Mini to its original state?. - /// - internal static string UninstallQ1 { - get { - return ResourceManager.GetString("UninstallQ1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Done. Wait until the power LED goes out. You also need to flash the original kernel. Do you want to flash the original kernel now?. - /// - internal static string UninstallQ2 { - get { - return ResourceManager.GetString("UninstallQ2", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Unknown game. - /// - internal static string UnknownGame { - get { - return ResourceManager.GetString("UnknownGame", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uploading new config.... - /// - internal static string UploadingConfig { - get { - return ResourceManager.GetString("UploadingConfig", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uploading and running FES-1.... - /// - internal static string UploadingFes1 { - get { - return ResourceManager.GetString("UploadingFes1", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uploading games.... - /// - internal static string UploadingGames { - get { - return ResourceManager.GetString("UploadingGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Uploading the kernel.... - /// - internal static string UploadingKernel { - get { - return ResourceManager.GetString("UploadingKernel", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Processing original games.... - /// - internal static string UploadingOriginalGames { - get { - return ResourceManager.GetString("UploadingOriginalGames", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Verify failed :O This is not good.. - /// - internal static string VerifyFailed { - get { - return ResourceManager.GetString("VerifyFailed", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Verifying.... - /// - internal static string Verifying { - get { - return ResourceManager.GetString("Verifying", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Waiting for the device.... - /// - internal static string WaitingForDevice { - get { - return ResourceManager.GetString("WaitingForDevice", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Warning!. - /// - internal static string Warning { - get { - return ResourceManager.GetString("Warning", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Wow. - /// - internal static string Wow { - get { - return ResourceManager.GetString("Wow", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Yes. - /// - internal static string Yes { - get { - return ResourceManager.GetString("Yes", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Yes for all. - /// - internal static string YesForAll { - get { - return ResourceManager.GetString("YesForAll", resourceCulture); - } - } - } -} diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 366b80df9..30d574d5a 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -304,7 +304,7 @@ Downloading box art for all games (I'm feeling lucky!) - Googling for + Googling for Not found: @@ -658,4 +658,25 @@ Size: + + Compressing {0}... + + + Compressing games... + + + Decompressing {0}... + + + Decompressing games... + + + Delete selected game(s)? + + + Removing {0}... + + + Removing games... + \ No newline at end of file diff --git a/SearchForm.cs b/SearchForm.cs index 15ae4fdf3..5acf6988b 100644 --- a/SearchForm.cs +++ b/SearchForm.cs @@ -17,11 +17,13 @@ private void textBoxSearch_TextChanged(object sender, EventArgs e) { if (textBoxSearch.Text.Length > 0) { - for (int i = 1; i < mainForm.checkedListBoxGames.Items.Count; i++) - if ((mainForm.checkedListBoxGames.Items[i] as NesMiniApplication).Name. + for (int i = 1; i < mainForm.listViewGames.Items.Count; i++) + if ((mainForm.listViewGames.Items[i].Tag as NesMiniApplication).Name. ToLower().StartsWith(textBoxSearch.Text.ToLower())) { - mainForm.checkedListBoxGames.SelectedIndex = i; + for (int j = 1; j < mainForm.listViewGames.Items.Count; j++) + mainForm.listViewGames.Items[j].Selected = i == j; + mainForm.listViewGames.EnsureVisible(i); break; } } diff --git a/WorkerForm.cs b/WorkerForm.cs index c1bea20dd..045a14624 100644 --- a/WorkerForm.cs +++ b/WorkerForm.cs @@ -19,7 +19,7 @@ namespace com.clusterrr.hakchi_gui { public partial class WorkerForm : Form { - public enum Tasks { DumpKernel, FlashKernel, DumpNand, FlashNand, DumpNandB, Memboot, UploadGames, DownloadAllCovers, AddGames }; + public enum Tasks { DumpKernel, FlashKernel, DumpNand, FlashNand, DumpNandB, Memboot, UploadGames, DownloadCovers, AddGames, CompressGames, DecompressGames, DeleteGames }; public Tasks Task; //public string UBootDump; public static string KernelDumpPath @@ -125,7 +125,7 @@ public WorkerForm(MainForm parentForm) "d76c2a091ebe7b4614589fc6954653a5", // SNES Mini (EUR) "449b711238575763c6701f5958323d48" // SNES Mini (USA) }; - correctKernels[MainForm.ConsoleType.SuperFamicom] = new string[] { "632e179db63d9bcd42281f776a030c14"}; // Super Famicom Mini (JAP) + correctKernels[MainForm.ConsoleType.SuperFamicom] = new string[] { "632e179db63d9bcd42281f776a030c14" }; // Super Famicom Mini (JAP) correctKeys[MainForm.ConsoleType.NES] = new string[] { "bb8f49e0ae5acc8d5f9b7fa40efbd3e7" }; correctKeys[MainForm.ConsoleType.SNES] = new string[] { "c5dbb6e29ea57046579cfd50b124c9e1" }; } @@ -262,12 +262,21 @@ public void StartThread() case Tasks.Memboot: Memboot(); break; - case Tasks.DownloadAllCovers: - DownloadAllCovers(); - break; case Tasks.AddGames: AddGames(GamesToAdd); break; + case Tasks.DownloadCovers: + DownloadCovers(); + break; + case Tasks.CompressGames: + CompressGames(); + break; + case Tasks.DecompressGames: + DecompressGames(); + break; + case Tasks.DeleteGames: + DeleteGames(); + break; } if (DialogResult == DialogResult.None) DialogResult = DialogResult.OK; @@ -421,7 +430,7 @@ public bool DoKernelDump(string dumpPath = null, int maxProgress = 80, int progr var matchedKernels = from k in correctKernels where k.Value.Contains(hash) select k.Key; if (matchedKernels.Count() == 0) { - if (MessageBoxFromThread(this, Resources.MD5Failed + " " + hash + "\r\n" + Resources.MD5Failed2 + + if (MessageBoxFromThread(this, Resources.MD5Failed + " " + hash + /*"\r\n" + Resources.MD5Failed2 +*/ "\r\n" + Resources.DoYouWantToContinue, Resources.Warning, MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1, false) == DialogResult.No) @@ -831,7 +840,8 @@ public void UploadGames() case MainForm.ConsoleType.SNES: case MainForm.ConsoleType.SuperFamicom: originalSyncCode = $"mkdir -p \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" && " + - $"rsync -ac \"{gamesPath}/{originalCode}/\" \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\""; + $"rsync -ac \"{gamesPath}/{originalCode}/\" \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" &&"+ + $"sed -i -e 's/\\/usr\\/bin\\/clover-canoe-shvc/\\/bin\\/clover-canoe-shvc-wr/g' \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/{originalCode}.desktop\""; /* // With compression but very slow originalSyncCode = $"mkdir -p \"{rootFsPath}{gamesPath}/{originalGames[originalCode]}/{originalCode}/\" && " + @@ -1080,53 +1090,6 @@ private byte[] CreatePatchedKernel(string kernelPath = null) return result; } - void DownloadAllCovers() - { - if (Games == null) return; - int i = 0; - foreach (NesMiniApplication game in Games) - { - SetStatus(Resources.GooglingFor.Trim() + " " + game.Name); - string[] urls = null; - for (int tries = 0; tries < 5; tries++) - { - if (urls == null) - { - try - { - urls = ImageGooglerForm.GetImageUrls(game); - break; - } - catch (Exception ex) - { - SetStatus(Resources.Error + ": " + ex.Message); - Thread.Sleep(1500); - continue; - } - } - } - if (urls != null && urls.Length == 0) - SetStatus(Resources.NotFound + " " + game.Name); - for (int tries = 0; urls != null && tries < 5 && tries < urls.Length; tries++) - { - try - { - var cover = ImageGooglerForm.DownloadImage(urls[tries]); - game.Image = cover; - break; - } - catch (Exception ex) - { - SetStatus(Resources.Error + ": " + ex.Message); - Thread.Sleep(1500); - continue; - } - } - SetProgress(++i, Games.Count); - Thread.Sleep(500); // not so fast, Google don't like it - } - } - private class GamesTreeStats { public List allMenus = new List(); @@ -1378,6 +1341,89 @@ public ICollection AddGames(IEnumerable files, Form return apps; // Added games/apps } + void DownloadCovers() + { + if (Games == null) return; + int i = 0; + foreach (NesMiniApplication game in Games) + { + SetStatus(Resources.GooglingFor.Trim() + " " + game.Name + "..."); + string[] urls = null; + for (int tries = 0; tries < 5; tries++) + { + if (urls == null) + { + try + { + urls = ImageGooglerForm.GetImageUrls(game); + break; + } + catch (Exception ex) + { + SetStatus(Resources.Error + ": " + ex.Message); + Thread.Sleep(1500); + continue; + } + } + } + if (urls != null && urls.Length == 0) + SetStatus(Resources.NotFound + " " + game.Name); + for (int tries = 0; urls != null && tries < 5 && tries < urls.Length; tries++) + { + try + { + var cover = ImageGooglerForm.DownloadImage(urls[tries]); + game.Image = cover; + break; + } + catch (Exception ex) + { + SetStatus(Resources.Error + ": " + ex.Message); + Thread.Sleep(1500); + continue; + } + } + SetProgress(++i, Games.Count); + Thread.Sleep(500); // not so fast, Google don't like it + } + } + + void CompressGames() + { + if (Games == null) return; + int i = 0; + foreach (NesMiniApplication game in Games) + { + SetStatus(string.Format(Resources.Compressing, game.Name)); + game.Compress(); + SetProgress(++i, Games.Count); + } + } + + void DecompressGames() + { + if (Games == null) return; + int i = 0; + foreach (NesMiniApplication game in Games) + { + SetStatus(string.Format(Resources.Decompressing, game.Name)); + game.Decompress(); + SetProgress(++i, Games.Count); + } + } + + void DeleteGames() + { + if (Games == null) return; + int i = 0; + foreach (NesMiniApplication game in Games) + { + SetStatus(string.Format(Resources.Removing, game.Name)); + Directory.Delete(game.GamePath, true); + SetProgress(++i, Games.Count); + } + } + private void WorkerForm_FormClosing(object sender, FormClosingEventArgs e) { if ((thread != null) && (e.CloseReason == CloseReason.UserClosing)) diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj index 50392ead8..fcaaee552 100644 --- a/hakchi_gui.csproj +++ b/hakchi_gui.csproj @@ -31,8 +31,8 @@ Alexey %27Cluster%27 Avdyukhin true index.html - 1 - 2.0.20.1 + 2 + 2.0.20.2 false true true @@ -140,6 +140,12 @@ + + Form + + + ConsoleSelectDialog.cs + Form @@ -323,7 +329,121 @@ - + + True + True + Resources.bg-BG.resx + + + True + True + Resources.ca-ES.resx + + + True + True + Resources.da-DK.resx + + + True + True + Resources.de-DE.resx + + + True + True + Resources.el-GR.resx + + + True + True + Resources.en-GB.resx + + + True + True + Resources.es-AR.resx + + + True + True + Resources.es-ES.resx + + + True + True + Resources.fi-FI.resx + + + True + True + Resources.fr-FR.resx + + + True + True + Resources.id-ID.resx + + + True + True + Resources.it-IT.resx + + + True + True + Resources.nl.resx + + + True + True + Resources.pl-PL.resx + + + True + True + Resources.pt-PT.resx + + + True + True + Resources.ru-RU.resx + + + True + True + Resources.sk-SK.resx + + + True + True + Resources.sv-SE.resx + + + True + True + Resources.uk-UA.resx + + + True + True + Resources.zh-CHS.resx + + + True + True + Resources.zh-CHT.resx + + + True + True + Resources.zh-TW.resx + + + True + True + Resources.resx + Form @@ -467,6 +587,9 @@ AboutBox.cs + + ConsoleSelectDialog.cs + FileBrowserForm.cs @@ -811,32 +934,99 @@ MainForm.cs - - - - - - - - - - - - - - - + + ResXFileCodeGenerator + Resources.bg-BG.Designer.cs + + + ResXFileCodeGenerator + Resources.ca-ES.Designer.cs + + + ResXFileCodeGenerator + Resources.da-DK.Designer.cs + + + ResXFileCodeGenerator + Resources.de-DE.Designer.cs + + + ResXFileCodeGenerator + Resources.el-GR.Designer.cs + + + ResXFileCodeGenerator + Resources.en-GB.Designer.cs + + + ResXFileCodeGenerator + Resources.es-AR.Designer.cs + + + ResXFileCodeGenerator + Resources.es-ES.Designer.cs + + + ResXFileCodeGenerator + Resources.fi-FI.Designer.cs + + + ResXFileCodeGenerator + Resources.fr-FR.Designer.cs + + + ResXFileCodeGenerator + Resources.id-ID.Designer.cs + + + ResXFileCodeGenerator + Resources.it-IT.Designer.cs + + + ResXFileCodeGenerator + Resources.nl.Designer.cs + + + ResXFileCodeGenerator + Resources.pl-PL.Designer.cs + + + ResXFileCodeGenerator + Resources.pt-PT.Designer.cs + Designer Resources1.Designer.cs + ResXFileCodeGenerator + + + ResXFileCodeGenerator + Resources.ru-RU.Designer.cs + + + ResXFileCodeGenerator + Resources.sk-SK.Designer.cs + + + ResXFileCodeGenerator + Resources.sv-SE.Designer.cs + + + ResXFileCodeGenerator + Resources.uk-UA.Designer.cs + + + ResXFileCodeGenerator + Resources.zh-CHS.Designer.cs + + + ResXFileCodeGenerator + Resources.zh-CHT.Designer.cs + + + ResXFileCodeGenerator + Resources.zh-TW.Designer.cs - - - - - - - SaveStateManager.cs