diff --git a/ConfigIni.cs b/ConfigIni.cs index 38d86956b..2469e3f69 100644 --- a/ConfigIni.cs +++ b/ConfigIni.cs @@ -241,7 +241,6 @@ public Dictionary ExtraCommandLineArguments public Hmod.ListSort hmodListSort = Hmod.ListSort.Category; public RepositoryInfo[] repos = new RepositoryInfo[] { new RepositoryInfo("KMFD's Mod Hub", "https://hakchi.net/KMFDManic/NESC-SNESC-Modifications/.repo/"), - new RepositoryInfo("Mod Store", "modstore://"), }; // constructor diff --git a/Extensions/ModStore/ModStore.Designer.cs b/Extensions/ModStore/ModStore.Designer.cs deleted file mode 100644 index 1abdf0ccc..000000000 --- a/Extensions/ModStore/ModStore.Designer.cs +++ /dev/null @@ -1,347 +0,0 @@ -namespace com.clusterrr.hakchi_gui -{ - partial class ModStore - { - /// - /// 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(ModStore)); - this.menuStrip = new System.Windows.Forms.MenuStrip(); - this.refreshContentToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.showExperimentalModsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sortToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sortByAZToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.sortByDateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.submitYourOwnModToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.discordLinkToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.visitWebsiteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.PoweredByLinkS = new System.Windows.Forms.ToolStripStatusLabel(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage0 = new System.Windows.Forms.TabPage(); - this.tabPage1 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl1 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage4 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl4 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage5 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl5 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl3 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl2 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage6 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl6 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.tabPage7 = new System.Windows.Forms.TabPage(); - this.modStoreTabControl7 = new com.clusterrr.hakchi_gui.ModStoreTabControl(); - this.fontDialog1 = new System.Windows.Forms.FontDialog(); - this.menuStrip.SuspendLayout(); - this.statusStrip1.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); - this.tabPage4.SuspendLayout(); - this.tabPage5.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.tabPage2.SuspendLayout(); - this.tabPage6.SuspendLayout(); - this.tabPage7.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip - // - this.menuStrip.ImageScalingSize = new System.Drawing.Size(20, 20); - this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.refreshContentToolStripMenuItem, - this.showExperimentalModsToolStripMenuItem, - this.sortToolStripMenuItem, - this.submitYourOwnModToolStripMenuItem, - this.helpToolStripMenuItem}); - resources.ApplyResources(this.menuStrip, "menuStrip"); - this.menuStrip.Name = "menuStrip"; - // - // refreshContentToolStripMenuItem - // - this.refreshContentToolStripMenuItem.Name = "refreshContentToolStripMenuItem"; - resources.ApplyResources(this.refreshContentToolStripMenuItem, "refreshContentToolStripMenuItem"); - this.refreshContentToolStripMenuItem.Click += new System.EventHandler(this.refreshContentToolStripMenuItem_Click); - // - // showExperimentalModsToolStripMenuItem - // - this.showExperimentalModsToolStripMenuItem.Name = "showExperimentalModsToolStripMenuItem"; - resources.ApplyResources(this.showExperimentalModsToolStripMenuItem, "showExperimentalModsToolStripMenuItem"); - this.showExperimentalModsToolStripMenuItem.Click += new System.EventHandler(this.showExperimentalModsToolStripMenuItem_Click); - // - // sortToolStripMenuItem - // - this.sortToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.sortByAZToolStripMenuItem, - this.sortByDateToolStripMenuItem}); - this.sortToolStripMenuItem.Name = "sortToolStripMenuItem"; - resources.ApplyResources(this.sortToolStripMenuItem, "sortToolStripMenuItem"); - // - // sortByAZToolStripMenuItem - // - this.sortByAZToolStripMenuItem.Name = "sortByAZToolStripMenuItem"; - resources.ApplyResources(this.sortByAZToolStripMenuItem, "sortByAZToolStripMenuItem"); - this.sortByAZToolStripMenuItem.Click += new System.EventHandler(this.sortMethodClick); - // - // sortByDateToolStripMenuItem - // - this.sortByDateToolStripMenuItem.Name = "sortByDateToolStripMenuItem"; - resources.ApplyResources(this.sortByDateToolStripMenuItem, "sortByDateToolStripMenuItem"); - this.sortByDateToolStripMenuItem.Click += new System.EventHandler(this.sortMethodClick); - // - // submitYourOwnModToolStripMenuItem - // - this.submitYourOwnModToolStripMenuItem.Name = "submitYourOwnModToolStripMenuItem"; - resources.ApplyResources(this.submitYourOwnModToolStripMenuItem, "submitYourOwnModToolStripMenuItem"); - this.submitYourOwnModToolStripMenuItem.Click += new System.EventHandler(this.submitYourOwnModToolStripMenuItem_Click); - // - // helpToolStripMenuItem - // - this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.aboutToolStripMenuItem, - this.discordLinkToolStripMenuItem, - this.visitWebsiteToolStripMenuItem}); - this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; - resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); - // - // aboutToolStripMenuItem - // - this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; - resources.ApplyResources(this.aboutToolStripMenuItem, "aboutToolStripMenuItem"); - this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); - // - // discordLinkToolStripMenuItem - // - this.discordLinkToolStripMenuItem.Name = "discordLinkToolStripMenuItem"; - resources.ApplyResources(this.discordLinkToolStripMenuItem, "discordLinkToolStripMenuItem"); - this.discordLinkToolStripMenuItem.Click += new System.EventHandler(this.discordLinkToolStripMenuItem_Click); - // - // visitWebsiteToolStripMenuItem - // - this.visitWebsiteToolStripMenuItem.Name = "visitWebsiteToolStripMenuItem"; - resources.ApplyResources(this.visitWebsiteToolStripMenuItem, "visitWebsiteToolStripMenuItem"); - this.visitWebsiteToolStripMenuItem.Click += new System.EventHandler(this.visitWebsiteToolStripMenuItem_Click); - // - // statusStrip1 - // - this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); - this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.PoweredByLinkS}); - resources.ApplyResources(this.statusStrip1, "statusStrip1"); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.SizingGrip = false; - // - // PoweredByLinkS - // - this.PoweredByLinkS.IsLink = true; - this.PoweredByLinkS.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(0)))), ((int)(((byte)(20))))); - this.PoweredByLinkS.Name = "PoweredByLinkS"; - resources.ApplyResources(this.PoweredByLinkS, "PoweredByLinkS"); - this.PoweredByLinkS.VisitedLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(0)))), ((int)(((byte)(20))))); - this.PoweredByLinkS.Click += new System.EventHandler(this.PoweredByLinkS_Click); - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tabPage0); - this.tabControl1.Controls.Add(this.tabPage1); - this.tabControl1.Controls.Add(this.tabPage4); - this.tabControl1.Controls.Add(this.tabPage5); - this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage6); - this.tabControl1.Controls.Add(this.tabPage7); - resources.ApplyResources(this.tabControl1, "tabControl1"); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - // - // tabPage0 - // - this.tabPage0.BackColor = System.Drawing.SystemColors.Control; - resources.ApplyResources(this.tabPage0, "tabPage0"); - this.tabPage0.Name = "tabPage0"; - // - // tabPage1 - // - this.tabPage1.BackColor = System.Drawing.SystemColors.Control; - this.tabPage1.Controls.Add(this.modStoreTabControl1); - resources.ApplyResources(this.tabPage1, "tabPage1"); - this.tabPage1.Name = "tabPage1"; - // - // modStoreTabControl1 - // - this.modStoreTabControl1.Category = "additional_functionality"; - resources.ApplyResources(this.modStoreTabControl1, "modStoreTabControl1"); - this.modStoreTabControl1.Name = "modStoreTabControl1"; - // - // tabPage4 - // - this.tabPage4.BackColor = System.Drawing.SystemColors.Control; - this.tabPage4.Controls.Add(this.modStoreTabControl4); - resources.ApplyResources(this.tabPage4, "tabPage4"); - this.tabPage4.Name = "tabPage4"; - // - // modStoreTabControl4 - // - this.modStoreTabControl4.Category = "retroarch"; - resources.ApplyResources(this.modStoreTabControl4, "modStoreTabControl4"); - this.modStoreTabControl4.Name = "modStoreTabControl4"; - // - // tabPage5 - // - this.tabPage5.BackColor = System.Drawing.SystemColors.Control; - this.tabPage5.Controls.Add(this.modStoreTabControl5); - resources.ApplyResources(this.tabPage5, "tabPage5"); - this.tabPage5.Name = "tabPage5"; - // - // modStoreTabControl5 - // - this.modStoreTabControl5.Category = "retroarch_cores"; - resources.ApplyResources(this.modStoreTabControl5, "modStoreTabControl5"); - this.modStoreTabControl5.Name = "modStoreTabControl5"; - // - // tabPage3 - // - this.tabPage3.BackColor = System.Drawing.SystemColors.Control; - this.tabPage3.Controls.Add(this.modStoreTabControl3); - resources.ApplyResources(this.tabPage3, "tabPage3"); - this.tabPage3.Name = "tabPage3"; - // - // modStoreTabControl3 - // - this.modStoreTabControl3.BackColor = System.Drawing.SystemColors.Control; - this.modStoreTabControl3.Category = "usb-host"; - resources.ApplyResources(this.modStoreTabControl3, "modStoreTabControl3"); - this.modStoreTabControl3.Name = "modStoreTabControl3"; - // - // tabPage2 - // - this.tabPage2.BackColor = System.Drawing.SystemColors.Control; - this.tabPage2.Controls.Add(this.modStoreTabControl2); - resources.ApplyResources(this.tabPage2, "tabPage2"); - this.tabPage2.Name = "tabPage2"; - // - // modStoreTabControl2 - // - this.modStoreTabControl2.BackColor = System.Drawing.SystemColors.Control; - this.modStoreTabControl2.Category = "interface_mods"; - resources.ApplyResources(this.modStoreTabControl2, "modStoreTabControl2"); - this.modStoreTabControl2.Name = "modStoreTabControl2"; - // - // tabPage6 - // - this.tabPage6.BackColor = System.Drawing.SystemColors.Control; - this.tabPage6.Controls.Add(this.modStoreTabControl6); - resources.ApplyResources(this.tabPage6, "tabPage6"); - this.tabPage6.Name = "tabPage6"; - // - // modStoreTabControl6 - // - this.modStoreTabControl6.BackColor = System.Drawing.SystemColors.Control; - this.modStoreTabControl6.Category = "game"; - resources.ApplyResources(this.modStoreTabControl6, "modStoreTabControl6"); - this.modStoreTabControl6.Name = "modStoreTabControl6"; - // - // tabPage7 - // - this.tabPage7.BackColor = System.Drawing.SystemColors.Control; - this.tabPage7.Controls.Add(this.modStoreTabControl7); - resources.ApplyResources(this.tabPage7, "tabPage7"); - this.tabPage7.Name = "tabPage7"; - // - // modStoreTabControl7 - // - this.modStoreTabControl7.Category = "experimental"; - resources.ApplyResources(this.modStoreTabControl7, "modStoreTabControl7"); - this.modStoreTabControl7.Name = "modStoreTabControl7"; - // - // ModStore - // - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tabControl1); - this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.menuStrip); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ModStore"; - this.ShowInTaskbar = false; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ModStore_FormClosing); - this.Load += new System.EventHandler(this.ModStore_Load); - this.menuStrip.ResumeLayout(false); - this.menuStrip.PerformLayout(); - this.statusStrip1.ResumeLayout(false); - this.statusStrip1.PerformLayout(); - this.tabControl1.ResumeLayout(false); - this.tabPage1.ResumeLayout(false); - this.tabPage4.ResumeLayout(false); - this.tabPage5.ResumeLayout(false); - this.tabPage3.ResumeLayout(false); - this.tabPage2.ResumeLayout(false); - this.tabPage6.ResumeLayout(false); - this.tabPage7.ResumeLayout(false); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.MenuStrip menuStrip; - private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem visitWebsiteToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem refreshContentToolStripMenuItem; - private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.ToolStripStatusLabel PoweredByLinkS; - private System.Windows.Forms.TabControl tabControl1; - private System.Windows.Forms.TabPage tabPage1; - private System.Windows.Forms.TabPage tabPage2; - private System.Windows.Forms.FontDialog fontDialog1; - private ModStoreTabControl modStoreTabControl2; - private ModStoreTabControl modStoreTabControl1; - private System.Windows.Forms.TabPage tabPage3; - private ModStoreTabControl modStoreTabControl3; - private System.Windows.Forms.TabPage tabPage4; - private ModStoreTabControl modStoreTabControl4; - private System.Windows.Forms.TabPage tabPage5; - private ModStoreTabControl modStoreTabControl5; - private System.Windows.Forms.ToolStripMenuItem submitYourOwnModToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem discordLinkToolStripMenuItem; - private System.Windows.Forms.TabPage tabPage0; - private System.Windows.Forms.TabPage tabPage6; - private ModStoreTabControl modStoreTabControl6; - private System.Windows.Forms.ToolStripMenuItem sortToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem sortByAZToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem sortByDateToolStripMenuItem; - private System.Windows.Forms.TabPage tabPage7; - private ModStoreTabControl modStoreTabControl7; - private System.Windows.Forms.ToolStripMenuItem showExperimentalModsToolStripMenuItem; - } -} \ No newline at end of file diff --git a/Extensions/ModStore/ModStore.cs b/Extensions/ModStore/ModStore.cs deleted file mode 100644 index f18192ec5..000000000 --- a/Extensions/ModStore/ModStore.cs +++ /dev/null @@ -1,320 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using System.Xml.Serialization; -using System.IO; -using System.Net; -using System.Threading; -using com.clusterrr.hakchi_gui.Properties; -using com.clusterrr.hakchi_gui.module_library; -using Newtonsoft.Json.Linq; -using System.Diagnostics; -using com.clusterrr.hakchi_gui.Hmod.Controls; - -namespace com.clusterrr.hakchi_gui -{ - public partial class ModStore : Form - { - private ModStoreManager config = new ModStoreManager(); - private Module currentModule { get; set; } - private bool showExperimentalTab = false; - - #region Form Initialisation - public ModStore() - { - config.parentForm = this; - InitializeComponent(); - this.Icon = Resources.icon; - PoweredByLinkS.Text = "Powered By HakchiResources.com"; - - var welcomeURL = new Uri("https://hakchiresources.com/modstorewelcome/?mode=welcome"); - - if (Shared.isWindows) - { - var browser = new WebBrowser() { ScriptErrorsSuppressed = true, AllowWebBrowserDrop = false, Dock = DockStyle.Fill, Url = welcomeURL }; - tabPage0.Controls.Add(browser); - } - else - { - var welcomeControl = new TextReadmeControl() { Dock = DockStyle.Fill }; - using (var webClient = new System.Net.WebClient()) - { - ReverseMarkdown.Converter converter = new ReverseMarkdown.Converter(); - - var welcomeText = Shared.ReverseMarkdown(webClient.DownloadString(welcomeURL)); - - welcomeControl.setReadme(null, welcomeText); - } - - tabPage0.Controls.Add(welcomeControl); - } - } - - private void ModStore_Load(object sender, EventArgs e) - { - ModStore_Initialise(); - } - - private void ModStore_Initialise(bool LoadXML = true) - { - if (LoadXML) - { - //Load Config - XmlSerializer xs = new XmlSerializer(typeof(ModStoreManager)); - if (File.Exists(config.ConfigPath)) - { - using (var fs = File.Open(config.ConfigPath, FileMode.Open)) - { - config = (ModStoreManager)xs.Deserialize(fs); - config.parentForm = this; - } - } - } - - //Set Sort Menu Check - setSortMenuItemCheck(); - - if (config.AvailableItems.Count == 0 || (DateTime.Now - config.LastUpdate).TotalDays >= 1.0) - { - //Ask user to update repository information - updateModuleList(); - } - - //If no modules, update failed so close mod store - if (config.AvailableItems.Count == 0) - { - Close(); - return; - } - - //Check if user deleted module - config.CheckForDeletedItems(); - - //Add or Remove Experimental Tab - if (showExperimentalTab == false) - tabControl1.TabPages.Remove(tabPage7); - else if (tabControl1.TabPages.Contains(tabPage7) == false) - tabControl1.TabPages.Add(tabPage7); - - //Setup Tabs and Load Items - loadTabItems(); - } - #endregion - - #region Non Essential GUI code - private void refreshContentToolStripMenuItem_Click(object sender, EventArgs e) - { - updateModuleList(); - ModStore_Initialise(false); - Tasks.MessageForm.Show(this, this.Text, "Refreshed Mod Store"); - } - - private void PoweredByLinkS_Click(object sender, EventArgs e) - { - Process.Start("https://www.hakchiresources.com"); - } - - private void submitYourOwnModToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://hakchiresources.com/submit-mod/"); - } - - private void discordLinkToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://discord.gg/ETe3ecx"); - } - - private void visitWebsiteToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://www.hakchiresources.com"); - } - - private void aboutToolStripMenuItem_Click(object sender, EventArgs e) - { - var modStoreAbout = new ModStoreAbout(); - modStoreAbout.ShowDialog(); - } - - private void sortMethodClick(object sender, EventArgs e) - { - //Check if method is active - if (((ToolStripMenuItem)sender).Checked) - return; - - //Set Sort Method - config.SortAlphabetically = sender == sortByAZToolStripMenuItem; - setSortMenuItemCheck(); - //Reload all tabs - loadTabItems(); - } - - private void setSortMenuItemCheck() - { - sortByAZToolStripMenuItem.Checked = config.SortAlphabetically; - sortByDateToolStripMenuItem.Checked = !config.SortAlphabetically; - } - - private void showExperimentalModsToolStripMenuItem_Click(object sender, EventArgs e) - { - if (Tasks.MessageForm.Show(Resources.AreYouSure, Resources.ShowExperimentalQuestion, Resources.sign_warning, new Tasks.MessageForm.Button[] { Tasks.MessageForm.Button.Yes, Tasks.MessageForm.Button.No }, Tasks.MessageForm.DefaultButton.Button1) == Tasks.MessageForm.Button.Yes) - { - showExperimentalTab = true; - menuStrip.Items.Remove(showExperimentalModsToolStripMenuItem); - ModStore_Initialise(false); - tabControl1.SelectedTab = tabPage7; - } - } - #endregion - - #region Main Mod Store Code - private void loadTabItems() - { - //For each Mod Store Tab set ModStoreManager (forces tab item refresh) - foreach (TabPage tabPage in tabControl1.Controls) - { - if (tabPage.Controls.Count == 0) continue; - - ModStoreTabControl modStoreTabControl = tabPage.Controls[0] as ModStoreTabControl; - if (modStoreTabControl != null) - modStoreTabControl.Manager = config; - } - } - - private void updateModuleList() - { - try - { - JObject json; - using (var wc = new WebClient()) - { - json = JObject.Parse(wc.DownloadString("https://hakchiresources.com/api/get_posts/?count=10000")); - } - config.AvailableItems.Clear(); - foreach (var post in json["posts"]) - { - string type = "Module"; - foreach (var tag in post["tags"]) - { - if (tag["slug"].ToString().Equals("non_hmod")) - { - type = "None"; - } - else if (tag["slug"].ToString().Equals("game")) - { - type = "Game"; - break; - } - } - if (type.Equals("None")) - continue; - - try - { - //Grab Mod Store Item variables from JSON item - string Name = System.Web.HttpUtility.HtmlDecode(post["title"].ToString()); - string Id = System.Web.HttpUtility.HtmlDecode(post["title"].ToString()); //Temporary ID need to replace - string Author = post["custom_fields"]["user_submit_name"][0].ToString(); - string Description = post["url"].ToString() + "?mode=mod_store"; - string Content = post["content"].ToString(); - string Version = post["custom_fields"]["usp_custom_field"][0].ToString(); - string Path = post["custom_fields"]["user_submit_url"][0].ToString(); - var Categories = new List(); - foreach (var category in post["categories"]) - { - Categories.Add(category["slug"].ToString()); - } - - //Set module type for RA cores - if (Categories.Contains("retroarch_cores")) - type = "RACore"; - - switch (type) - { - case "RACore": - string System = "unknown"; - foreach (var tag in post["tags"]) - { - if (tag["slug"].ToString().StartsWith("ra_")) - System = Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(tag["slug"].ToString().Substring(3).Replace('_', ' ')); - } - var raModule = new RACoreModule { Name = Name, Id = Id, Author = Author, Content = Content, Description = Description, Version = Version, Path = Path, Categories = Categories, System = System }; - if (raModule.SetModType()) - config.AvailableItems.Add(raModule); - break; - - case "Module": - var module = new Module { Name = Name, Id = Id, Author = Author, Content = Content, Description = Description, Version = Version, Path = Path, Categories = Categories }; - if (module.SetModType()) - config.AvailableItems.Add(module); - break; - - case "Game": - config.AvailableItems.Add(new ModStoreGame { Name = Name, Id = Id, Author = Author, Content = Content, Description = Description, Version = Version, Path = Path }); - break; - } - } - catch { } - } - } - catch (Exception ex) - { - MessageBox.Show(this, "Critical error: " + ex.Message + ex.StackTrace, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); - return; - } - config.LastUpdate = DateTime.Now; - updateModStoreItems(); - } - - private void updateModStoreItems() - { - List itemsToUpdate = new List(); - //For each installed item find the matching repo entry - foreach (var item in config.InstalledItems) - { - ModStoreItem storeItem = null; - foreach (var rItem in config.AvailableItems) - { - if (rItem.Id == item.Id) - { - storeItem = rItem; - break; - } - } - if (storeItem != null && storeItem.Version != item.Version) - itemsToUpdate.Add(storeItem); - } - if (itemsToUpdate.Count != 0) - { - var updateMsgBox = MessageBox.Show("Do you want to update all out of date mod store items?", "Update Items", MessageBoxButtons.YesNo); - if (updateMsgBox == DialogResult.Yes) - { - for (int i = 0; i < itemsToUpdate.Count; ++i) - { - config.DownloadItem(itemsToUpdate[i]); - } - MessageBox.Show(this, "Finished updating items."); - } - } - } - - private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) - { - string url = e.Url.ToString(); - if (url == "about:blank" || url == "https://hakchiresources.com/modstorewelcome/?mode=welcome" || url.StartsWith("res:")) - return; - - // cancel the current event - e.Cancel = true; - - // this opens the URL in the user's default browser - Process.Start(url); - } - - private void ModStore_FormClosing(object sender, FormClosingEventArgs e) - { - config.SaveConfig(); - } - - #endregion - } -} \ No newline at end of file diff --git a/Extensions/ModStore/ModStore.de-DE.resx b/Extensions/ModStore/ModStore.de-DE.resx deleted file mode 100644 index cdbc6449b..000000000 --- a/Extensions/ModStore/ModStore.de-DE.resx +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Aktualisieren - - - Sortieren von A-Z - - - Sortieren nach Datum - - - Sortieren - - - Eigene Mod einreichen - - - Hilfe - - - Über... - - - Discord Link - - - Webseite besuchen - - - Status - - - PoweredByLinkS - - - Willkommen! - - - Zusätzliche Funktionen - - - Retroarch - - - Retroarch Emulatoren - - - USB-Host - - - User-Interface Mods - - - Spiele - - - Hakchi Mod-Store - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStore.fr-FR.resx b/Extensions/ModStore/ModStore.fr-FR.resx deleted file mode 100644 index b6191d965..000000000 --- a/Extensions/ModStore/ModStore.fr-FR.resx +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Rafraîchir - - - Soumettre mod - - - À propos... - - - Lien Discord - - - Visiter le site web - - - Aide - - - Bienvenue! - - - Fonctionnalités additionnelles - - - Coeurs Retroarch - - - Mods UI - - - Jeux - - - Magasin de mods Hakchi - - - Retroarch - - - USB-Host - - - Statut - - - GénéréParLien - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStore.resx b/Extensions/ModStore/ModStore.resx deleted file mode 100644 index aad058ac8..000000000 --- a/Extensions/ModStore/ModStore.resx +++ /dev/null @@ -1,759 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 17, 17 - - - 58, 20 - - - Refresh - - - 152, 20 - - - Show Experimental Mods - - - 180, 22 - - - Sort by A-Z - - - 180, 22 - - - Sort by Date - - - 40, 20 - - - Sort - - - 85, 20 - - - Submit Mod - - - 44, 20 - - - Help - - - 0, 0 - - - 752, 24 - - - - 2 - - - menuStrip - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - 141, 22 - - - About... - - - 141, 22 - - - Discord Link - - - 141, 22 - - - Visit Website - - - 125, 17 - - - 0, 439 - - - - Yes - - - 752, 22 - - - 4 - - - Status - - - statusStrip1 - - - System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - - - 94, 17 - - - PoweredByLinkS - - - tabPage0 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 0 - - - tabPage1 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 1 - - - tabPage4 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 2 - - - tabPage5 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 3 - - - tabPage3 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 4 - - - tabPage2 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 5 - - - tabPage6 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 6 - - - 0, 27 - - - 0, 0, 0, 0 - - - 752, 414 - - - 1 - - - tabControl1 - - - System.Windows.Forms.TabControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 5 - - - Welcome! - - - modStoreTabControl1 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage1 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 0 - - - Additional Functionality - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 0 - - - modStoreTabControl4 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage4 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 3 - - - Retroarch - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 0 - - - modStoreTabControl5 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage5 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 4 - - - Retroarch Cores - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 0 - - - modStoreTabControl3 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage3 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 2 - - - USB Mods - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 1 - - - modStoreTabControl2 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage2 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 1 - - - User Interface Mods - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 0 - - - modStoreTabControl6 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.2.5.0, Culture=neutral, PublicKeyToken=null - - - tabPage6 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 6 - - - Games - - - Fill - - - 3, 3 - - - 4, 4, 4, 4 - - - 738, 382 - - - 1 - - - Fill - - - 3, 3 - - - 738, 382 - - - 0 - - - modStoreTabControl7 - - - com.clusterrr.hakchi_gui.ModStoreTabControl, hakchi, Version=3.4.1.7, Culture=neutral, PublicKeyToken=null - - - tabPage7 - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 744, 388 - - - 7 - - - Experimental - - - tabPage7 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControl1 - - - 7 - - - 241, 17 - - - True - - - 6, 13 - - - 752, 461 - - - CenterParent - - - Hakchi Mod store - - - refreshContentToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - sortToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - sortByAZToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - sortByDateToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - submitYourOwnModToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - helpToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - aboutToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - discordLinkToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - visitWebsiteToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - PoweredByLinkS - - - System.Windows.Forms.ToolStripStatusLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - fontDialog1 - - - System.Windows.Forms.FontDialog, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ModStore - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStoreAbout.cs b/Extensions/ModStore/ModStoreAbout.cs deleted file mode 100644 index 0eefd153f..000000000 --- a/Extensions/ModStore/ModStoreAbout.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Linq; -using System.Reflection; -using System.Windows.Forms; -using System.Diagnostics; - -namespace com.clusterrr.hakchi_gui -{ - partial class ModStoreAbout : Form - { - public ModStoreAbout() - { - InitializeComponent(); - this.Text = String.Format("About {0}", "Hakchi Mod Store"); - this.labelProductName.Text = "Hakchi Mod Store"; - this.labelCopyright.Text = "'TheOtherGuys'"; - this.labelCompanyName.Text = "http://www.hackhiresources.com"; - this.textBoxDescription.Text = "Hakchi Mod Store:\r\n" + - "Developed by CompCom and Swingflip ('TheOtherGuys')\r\n" + - "Powered by www.hakchiresources.com\r\n" + - "Exclusively for Hakchi2ce\r\n\r\n" + - "Special thanks to 'TheOtherGuys', 'TeamShinkansen', 'TeamHakchiResources''"; - } - - private void labelCompanyName_Click(object sender, EventArgs e) - { - Process.Start("https://www.hakchiresources.com"); - } - } -} diff --git a/Extensions/ModStore/ModStoreAbout.de-DE.resx b/Extensions/ModStore/ModStoreAbout.de-DE.resx deleted file mode 100644 index 6c4a99703..000000000 --- a/Extensions/ModStore/ModStoreAbout.de-DE.resx +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Beschreibung - - - Über den Mod-Store - - - &OK - - - Produkt-Name - - - Copyright - - - Firmenname - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStoreAbout.designer.cs b/Extensions/ModStore/ModStoreAbout.designer.cs deleted file mode 100644 index daa01ef97..000000000 --- a/Extensions/ModStore/ModStoreAbout.designer.cs +++ /dev/null @@ -1,120 +0,0 @@ -namespace com.clusterrr.hakchi_gui -{ - partial class ModStoreAbout - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - 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(ModStoreAbout)); - this.okButton = new System.Windows.Forms.Button(); - this.textBoxDescription = new System.Windows.Forms.TextBox(); - this.labelCompanyName = new System.Windows.Forms.Label(); - this.labelCopyright = new System.Windows.Forms.Label(); - this.labelProductName = new System.Windows.Forms.Label(); - this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.tableLayoutPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.SuspendLayout(); - // - // okButton - // - resources.ApplyResources(this.okButton, "okButton"); - this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.okButton.Name = "okButton"; - // - // textBoxDescription - // - resources.ApplyResources(this.textBoxDescription, "textBoxDescription"); - this.textBoxDescription.Name = "textBoxDescription"; - this.textBoxDescription.ReadOnly = true; - this.textBoxDescription.TabStop = false; - // - // labelCompanyName - // - resources.ApplyResources(this.labelCompanyName, "labelCompanyName"); - this.labelCompanyName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(0)))), ((int)(((byte)(20))))); - this.labelCompanyName.Name = "labelCompanyName"; - this.labelCompanyName.Click += new System.EventHandler(this.labelCompanyName_Click); - // - // labelCopyright - // - resources.ApplyResources(this.labelCopyright, "labelCopyright"); - this.labelCopyright.Name = "labelCopyright"; - // - // labelProductName - // - resources.ApplyResources(this.labelProductName, "labelProductName"); - this.labelProductName.Name = "labelProductName"; - // - // tableLayoutPanel - // - resources.ApplyResources(this.tableLayoutPanel, "tableLayoutPanel"); - this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); - this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); - this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); - this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); - this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); - this.tableLayoutPanel.Controls.Add(this.pictureBox1, 0, 0); - this.tableLayoutPanel.Name = "tableLayoutPanel"; - // - // pictureBox1 - // - resources.ApplyResources(this.pictureBox1, "pictureBox1"); - this.pictureBox1.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.modstore_info; - this.pictureBox1.Name = "pictureBox1"; - this.tableLayoutPanel.SetRowSpan(this.pictureBox1, 6); - this.pictureBox1.TabStop = false; - // - // ModStoreAbout - // - this.AcceptButton = this.okButton; - resources.ApplyResources(this, "$this"); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "ModStoreAbout"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.tableLayoutPanel.ResumeLayout(false); - this.tableLayoutPanel.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Button okButton; - private System.Windows.Forms.TextBox textBoxDescription; - private System.Windows.Forms.Label labelCompanyName; - private System.Windows.Forms.Label labelCopyright; - private System.Windows.Forms.Label labelProductName; - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; - private System.Windows.Forms.PictureBox pictureBox1; - } -} diff --git a/Extensions/ModStore/ModStoreAbout.fr-FR.resx b/Extensions/ModStore/ModStoreAbout.fr-FR.resx deleted file mode 100644 index e1e2abc5e..000000000 --- a/Extensions/ModStore/ModStoreAbout.fr-FR.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Description - - - Nom du produit - - - Copyright - - - Nom de compagnie - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStoreAbout.resx b/Extensions/ModStore/ModStoreAbout.resx deleted file mode 100644 index bacf682ae..000000000 --- a/Extensions/ModStore/ModStoreAbout.resx +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Description - - - ModStoreAbout - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - 417, 265 - - - &OK - - - 271, 17 - - - 9, 9 - - - - 0 - - - - Fill - - - ModStoreAbout - - - 0, 17 - - - 271, 17 - - - 6, 3, 3, 3 - - - 6, 13 - - - labelCompanyName - - - tableLayoutPanel - - - 21 - - - labelProductName - - - 6, 0, 3, 0 - - - 143, 52 - - - 25 - - - Bottom, Right - - - CenterParent - - - 435, 283 - - - 6 - - - textBoxDescription - - - 5 - - - MiddleLeft - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Both - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - CenterImage - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 3, 3 - - - 2 - - - 271, 126 - - - System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill - - - 22 - - - 75, 23 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="labelProductName" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelCopyright" Row="2" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="labelCompanyName" Row="3" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="textBoxDescription" Row="4" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="okButton" Row="5" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="pictureBox1" Row="0" RowSpan="6" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,33,Percent,67" /><Rows Styles="Percent,10,Percent,10,Percent,10,Percent,10,Percent,50,Percent,10,Absolute,20,Absolute,20,Absolute,20,Absolute,20" /></TableLayoutSettings> - - - 0 - - - 339, 239 - - - 2 - - - $this - - - tableLayoutPanel - - - okButton - - - tableLayoutPanel - - - 19 - - - 131, 259 - - - 6, 0, 3, 0 - - - tableLayoutPanel - - - Product Name - - - 143, 107 - - - MiddleLeft - - - 23 - - - 4 - - - tableLayoutPanel - - - Fill - - - System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 143, 0 - - - pictureBox1 - - - 3 - - - Microsoft Sans Serif, 8.25pt, style=Underline - - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - Fill - - - 0 - - - tableLayoutPanel - - - Fill - - - Copyright - - - 143, 78 - - - 1 - - - 271, 17 - - - 9, 9, 9, 9 - - - 0, 17 - - - Company Name - - - MiddleLeft - - - labelCopyright - - - 6, 0, 3, 0 - - - tableLayoutPanel - - - 0, 17 - - - 24 - - - True - - - True - - - fr-FR - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStoreGame.cs b/Extensions/ModStore/ModStoreGame.cs deleted file mode 100644 index 19fd52dce..000000000 --- a/Extensions/ModStore/ModStoreGame.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace com.clusterrr.hakchi_gui.module_library -{ - public class ModStoreGame : ModStoreItem - { - public override string Type - { - get { return "Game"; } - } - } -} diff --git a/Extensions/ModStore/ModStoreItem.cs b/Extensions/ModStore/ModStoreItem.cs deleted file mode 100644 index f2a262bdc..000000000 --- a/Extensions/ModStore/ModStoreItem.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Xml.Serialization; - -namespace com.clusterrr.hakchi_gui.module_library -{ - [XmlInclude(typeof(Module))] - [XmlInclude(typeof(RACoreModule))] - [XmlInclude(typeof(ModStoreGame))] - public abstract class ModStoreItem - { - public string Id; // Need to develop some sort of website id system - public string Name; - public string Author; - public string Path; - public string Content; - public string Description; - public string Version; - public abstract string Type { get; } - - public InstalledModItem CreateInstalledItem() - { - return new InstalledModItem { Id = Id, Name = Name, Version = Version }; - } - } - - public class InstalledModItem - { - public string Id; - public string Name; //Temporary - incase of ID issues - public string Version; - public List InstalledFiles = new List(); - } -} diff --git a/Extensions/ModStore/ModStoreManager.cs b/Extensions/ModStore/ModStoreManager.cs deleted file mode 100644 index 73fb95118..000000000 --- a/Extensions/ModStore/ModStoreManager.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Windows.Forms; -using System.Xml.Serialization; -using com.clusterrr.hakchi_gui.Properties; -using com.clusterrr.hakchi_gui.Tasks; -using SharpCompress.Archives; - -namespace com.clusterrr.hakchi_gui.module_library -{ - public class ModStoreManager - { - [XmlIgnore] - [NonSerialized] - public Form parentForm; - public List AvailableItems = new List(); - public List InstalledItems = new List(); - public DateTime LastUpdate = new DateTime(); - public bool SortAlphabetically = false; - public string ConfigPath { get { return Path.Combine(Program.BaseDirectoryExternal, "config", "ModStoreConfig.xml"); } } - - public void CheckForDeletedItems() - { - string userModDir = Path.Combine(Program.BaseDirectoryExternal, "user_mods"); - for (int i = 0; i < InstalledItems.Count; ++i) - { - var item = InstalledItems[i]; - bool removeItem = false; - if (item.InstalledFiles.Count == 1 && !item.InstalledFiles[0].EndsWith("\\")) - { - removeItem = File.Exists(Path.Combine(userModDir, item.InstalledFiles[0])) == false; - } - else - { - foreach (var file in item.InstalledFiles) - { - if (file.EndsWith("\\") && !Directory.Exists(Path.Combine(userModDir, file))) - { - removeItem = true; - break; - } - } - } - if (removeItem) - { - InstalledItems.RemoveAt(i); - --i; - } - } - } - - public void DownloadItem(ModStoreItem item) - { - switch(item.Type) - { - case "Module": - DownloadModule(item as Module); - break; - case "Game": - DownloadGame(item as ModStoreGame); - break; - } - } - - private Tasker DownloadFile(string url, string fileName) - { - if (File.Exists(fileName)) - File.Delete(fileName); - - if (Directory.Exists(fileName)) - Directory.Delete(fileName, true); - - var tasker = new Tasker(parentForm); - tasker.AttachViews(new Tasks.TaskerTaskbar(), new Tasks.TaskerForm()); - tasker.SetStatusImage(Resources.sign_sync); - tasker.SetTitle(Resources.DownloadingEllipsis); - tasker.AddTask(WebClientTasks.DownloadFile(url, fileName)); - return tasker; - } - - public void DownloadGame(ModStoreGame game) - { - try - { - var installedGame = GetInstalledModule(game); - //If game is installed remove it - if (installedGame != null) - InstalledItems.Remove(installedGame); - - string tempFileName = Path.GetTempPath() + game.Path.Substring(game.Path.LastIndexOf("/") + 1); - - if(DownloadFile(game.Path, tempFileName).Start() == Tasker.Conclusion.Success) - { - MainForm.StaticRef.AddGames(new string[] { tempFileName }); - File.Delete(tempFileName); - } - - //InstalledItems.Add(game.CreateInstalledItem()); - } - catch (Exception ex) - { - MessageBox.Show("Critical error: " + ex.Message + ex.StackTrace, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - SaveConfig(); - } - - public void DownloadModule(Module module) - { - try - { - string userModDir = Path.Combine(Program.BaseDirectoryExternal, "user_mods"); - var installedModule = GetInstalledModule(module); - //If module is installed remove it - if (installedModule != null) - { - foreach(var file in installedModule.InstalledFiles) - { - try - { - var modPath = Path.Combine(userModDir, file); - if (Directory.Exists(modPath)) - Directory.Delete(modPath, true); - - if (File.Exists(modPath)) - File.Delete(modPath); - } - catch { } - } - - InstalledItems.Remove(installedModule); - installedModule = null; - } - switch (module.ModType) - { - case ModuleType.hmod: - { - string fileLocation = Path.Combine(userModDir, module.Path.Substring(module.Path.LastIndexOf('/') + 1)); - - if (DownloadFile(module.Path, fileLocation).Start() == Tasker.Conclusion.Success) - { - installedModule = module.CreateInstalledItem(); - installedModule.InstalledFiles.Add(module.Path.Substring(module.Path.LastIndexOf('/') + 1)); - InstalledItems.Add(installedModule); - } - } - break; - case ModuleType.compressedFile: - var tempFileName = Path.GetTempFileName(); - if(DownloadFile(module.Path, tempFileName).Start() == Tasker.Conclusion.Success) - { - using (var extractor = ArchiveFactory.Open(tempFileName)) - { - installedModule = module.CreateInstalledItem(); - foreach (var file in extractor.Entries) - { - int index = file.Key.IndexOf('/'); - if (index != -1) - { - var folder = file.Key.Substring(0, index + 1); - if (!installedModule.InstalledFiles.Contains(folder)) - { - installedModule.InstalledFiles.Add(folder); - var localFolder = Path.Combine(userModDir, folder); - if (Directory.Exists(localFolder)) - Directory.Delete(localFolder, true); - } - } - else if(!file.IsDirectory) - installedModule.InstalledFiles.Add(file.Key); - } - extractor.WriteToDirectory(userModDir, new SharpCompress.Common.ExtractionOptions() { ExtractFullPath = true, Overwrite = true }); - InstalledItems.Add(installedModule); - } - File.Delete(tempFileName); - } - break; - } - } - catch (Exception ex) - { - MessageBox.Show("Critical error: " + ex.Message + ex.StackTrace, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - SaveConfig(); - } - - public InstalledModItem GetInstalledModule(ModStoreItem repoModule) - { - foreach (var module in InstalledItems) - { - if (module.Id == repoModule.Id) - return module; - } - return null; - } - - public void SaveConfig() - { - if (!Directory.Exists(Path.GetDirectoryName(ConfigPath))) - Directory.CreateDirectory(Path.GetDirectoryName(ConfigPath)); - XmlSerializer x = new XmlSerializer(typeof(ModStoreManager)); - using (var fs = new FileStream(ConfigPath, FileMode.Create)) - { - x.Serialize(fs, this); - } - } - } -} diff --git a/Extensions/ModStore/ModStoreResources.Designer.cs b/Extensions/ModStore/ModStoreResources.Designer.cs deleted file mode 100644 index 5bac92247..000000000 --- a/Extensions/ModStore/ModStoreResources.Designer.cs +++ /dev/null @@ -1,73 +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.Extensions.ModStore { - 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", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class ModStoreResources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal ModStoreResources() { - } - - /// - /// 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.Extensions.ModStore.ModStoreResources", typeof(ModStoreResources).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 resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap InfoStrips { - get { - object obj = ResourceManager.GetObject("InfoStrips", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - } -} diff --git a/Extensions/ModStore/ModStoreResources.resx b/Extensions/ModStore/ModStoreResources.resx deleted file mode 100644 index fef46c7ab..000000000 --- a/Extensions/ModStore/ModStoreResources.resx +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - Resources\InfoStrips.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - \ No newline at end of file diff --git a/Extensions/ModStore/ModStoreTabControl.Designer.cs b/Extensions/ModStore/ModStoreTabControl.Designer.cs deleted file mode 100644 index fe72cd141..000000000 --- a/Extensions/ModStore/ModStoreTabControl.Designer.cs +++ /dev/null @@ -1,169 +0,0 @@ -namespace com.clusterrr.hakchi_gui -{ - partial class ModStoreTabControl - { - /// - /// 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 Component 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(ModStoreTabControl)); - this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); - this.panel1 = new System.Windows.Forms.Panel(); - this.moduleDownloadButton = new System.Windows.Forms.Button(); - this.moduleDownloadInstallButton = new System.Windows.Forms.Button(); - this.modInfo = new com.clusterrr.hakchi_gui.Extensions.ModStore.ModInfoControl(); - this.moduleListView = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.panelReadme = new System.Windows.Forms.Panel(); - this.tableLayoutPanel1.SuspendLayout(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // tableLayoutPanel1 - // - this.tableLayoutPanel1.ColumnCount = 3; - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 182F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 212F)); - this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); - this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.moduleListView, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.panelReadme, 2, 0); - this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 2; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(752, 414); - this.tableLayoutPanel1.TabIndex = 0; - // - // panel1 - // - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.moduleDownloadButton); - this.panel1.Controls.Add(this.moduleDownloadInstallButton); - this.panel1.Controls.Add(this.modInfo); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(185, 3); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(206, 388); - this.panel1.TabIndex = 0; - // - // moduleDownloadButton - // - this.moduleDownloadButton.Dock = System.Windows.Forms.DockStyle.Bottom; - this.moduleDownloadButton.Enabled = false; - this.moduleDownloadButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.moduleDownloadButton.Location = new System.Drawing.Point(0, 294); - this.moduleDownloadButton.Name = "moduleDownloadButton"; - this.moduleDownloadButton.Size = new System.Drawing.Size(204, 46); - this.moduleDownloadButton.TabIndex = 9; - this.moduleDownloadButton.Text = "Download Module"; - this.moduleDownloadButton.UseVisualStyleBackColor = true; - this.moduleDownloadButton.Click += new System.EventHandler(this.moduleDownloadButton_Click); - // - // moduleDownloadInstallButton - // - this.moduleDownloadInstallButton.Dock = System.Windows.Forms.DockStyle.Bottom; - this.moduleDownloadInstallButton.Enabled = false; - this.moduleDownloadInstallButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.moduleDownloadInstallButton.Location = new System.Drawing.Point(0, 340); - this.moduleDownloadInstallButton.Name = "moduleDownloadInstallButton"; - this.moduleDownloadInstallButton.Size = new System.Drawing.Size(204, 46); - this.moduleDownloadInstallButton.TabIndex = 8; - this.moduleDownloadInstallButton.Text = "Download and Install Module"; - this.moduleDownloadInstallButton.UseVisualStyleBackColor = true; - this.moduleDownloadInstallButton.Click += new System.EventHandler(this.moduleDownloadInstallButton_Click); - // - // modInfo - // - this.modInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.modInfo.Author = null; - this.modInfo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(210)))), ((int)(((byte)(0)))), ((int)(((byte)(20))))); - this.modInfo.infoStrips = ((System.Drawing.Bitmap)(resources.GetObject("modInfo.infoStrips"))); - this.modInfo.InstalledVersion = null; - this.modInfo.LatestVersion = null; - this.modInfo.Location = new System.Drawing.Point(-1, 0); - this.modInfo.ModuleName = null; - this.modInfo.Name = "modInfo"; - this.modInfo.Size = new System.Drawing.Size(206, 387); - this.modInfo.TabIndex = 4; - this.modInfo.textColor = System.Drawing.Color.White; - // - // moduleListView - // - this.moduleListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1}); - this.moduleListView.Dock = System.Windows.Forms.DockStyle.Fill; - this.moduleListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.moduleListView.Location = new System.Drawing.Point(3, 3); - this.moduleListView.MultiSelect = false; - this.moduleListView.Name = "moduleListView"; - this.moduleListView.Size = new System.Drawing.Size(176, 388); - this.moduleListView.TabIndex = 3; - this.moduleListView.UseCompatibleStateImageBehavior = false; - this.moduleListView.View = System.Windows.Forms.View.Details; - this.moduleListView.SelectedIndexChanged += new System.EventHandler(this.moduleListView_SelectedIndexChanged); - // - // columnHeader1 - // - this.columnHeader1.Text = ""; - this.columnHeader1.Width = 150; - // - // panelReadme - // - this.panelReadme.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelReadme.Location = new System.Drawing.Point(397, 3); - this.panelReadme.Name = "panelReadme"; - this.panelReadme.Size = new System.Drawing.Size(352, 388); - this.panelReadme.TabIndex = 4; - // - // ModStoreTabControl - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.tableLayoutPanel1); - this.Name = "ModStoreTabControl"; - this.Size = new System.Drawing.Size(752, 414); - this.tableLayoutPanel1.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button moduleDownloadButton; - private System.Windows.Forms.Button moduleDownloadInstallButton; - private System.Windows.Forms.ListView moduleListView; - private System.Windows.Forms.ColumnHeader columnHeader1; - private Extensions.ModStore.ModInfoControl modInfo; - private System.Windows.Forms.Panel panelReadme; - } -} diff --git a/Extensions/ModStore/ModStoreTabControl.cs b/Extensions/ModStore/ModStoreTabControl.cs deleted file mode 100644 index d6a9b3687..000000000 --- a/Extensions/ModStore/ModStoreTabControl.cs +++ /dev/null @@ -1,232 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Windows.Forms; -using System.Threading; -using System.Text.RegularExpressions; -using com.clusterrr.hakchi_gui.module_library; -using System.Drawing; -using System.Net; -using com.clusterrr.hakchi_gui.Hmod.Controls; - -namespace com.clusterrr.hakchi_gui -{ - public partial class ModStoreTabControl : UserControl - { - [Category("Data")] - public string Category { get; set; } - public ModStoreManager Manager { set { manager = value; loadModuleList(); } } - - private ModStoreItem currentItem { get; set; } - private ModStoreManager manager; - private WebBrowser webBrowser1; - private TextReadmeControl trcReadme; - private ReverseMarkdown.Converter converter = new ReverseMarkdown.Converter(); - public ModStoreTabControl() - { - InitializeComponent(); - if (Shared.isWindows) - { - webBrowser1 = new WebBrowser() { AllowWebBrowserDrop = false, Dock = DockStyle.Fill, ScriptErrorsSuppressed = true }; - webBrowser1.Navigating += webBrowser1_Navigating; - webBrowser1.DocumentCompleted += webBrowser1_DocumentCompleted; - panelReadme.Controls.Add(webBrowser1); - } - else - { - trcReadme = new TextReadmeControl() { Dock = DockStyle.Fill }; - panelReadme.Controls.Add(trcReadme); - } - } - - #region GUI - private void loadModuleDescription() - { - Cursor.Current = Cursors.WaitCursor; - var installedModule = manager.GetInstalledModule(currentItem); - if (Shared.isWindows) - { - webBrowser1.Navigate(new Uri(currentItem.Description, UriKind.Absolute)); - } - else - { - trcReadme.setReadme(null, Shared.ReverseMarkdown(currentItem.Content)); - } - - modInfo.SetInfo(currentItem.Name, currentItem.Author, currentItem.Version, (installedModule != null ? installedModule.Version : "N/A")); - - if (installedModule != null) - { - if (installedModule.Version != currentItem.Version) - { - moduleDownloadButton.Enabled = true; - moduleDownloadButton.Text = "Update " + currentItem.Type; - moduleDownloadInstallButton.Text = "Update and Install" + currentItem.Type; - } - else - { - moduleDownloadButton.Enabled = false; - moduleDownloadButton.Text = currentItem.Type + " Up-To-Date"; - moduleDownloadInstallButton.Text = "Install " + currentItem.Type; - } - } - else - { - moduleDownloadButton.Enabled = true; - moduleDownloadButton.Text = "Download " + currentItem.Type; - moduleDownloadInstallButton.Text = "Download and Install " + currentItem.Type; - } - moduleDownloadInstallButton.Enabled = true; - } - - private void moduleListView_SelectedIndexChanged(object sender, EventArgs e) - { - if (moduleListView.SelectedItems.Count != 0 && currentItem != moduleListView.SelectedItems[0].Tag) - { - currentItem = (ModStoreItem)moduleListView.SelectedItems[0].Tag; - loadModuleDescription(); - } - } - - private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) - { - Cursor.Current = Cursors.Default; - } - - private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e) - { - string url = e.Url.ToString(); - if (url == "about:blank" || url == currentItem.Description || url.StartsWith("res:")) - return; - - // cancel the current event - e.Cancel = true; - - // this opens the URL in the user's default browser - System.Diagnostics.Process.Start(url); - } - #endregion - - #region Mod Manager Code - private void loadModuleList() - { - currentItem = null; - moduleListView.Groups.Clear(); - moduleListView.Items.Clear(); - moduleListView.Sorting = (manager.SortAlphabetically) ? SortOrder.Ascending : SortOrder.None; - switch (Category) - { - case "game": - foreach (var item in manager.AvailableItems) - { - if (item is ModStoreGame) - { - var i = new ListViewItem(item.Name); - i.Tag = item; - moduleListView.Items.Add(i); - } - } - moduleDownloadInstallButton.Enabled = false; - moduleDownloadInstallButton.Visible = false; - break; - case "retroarch_cores": - //Store System Groups - var systems = new Dictionary(); - - //Create list item for each core and assign core to system group - foreach (var item in manager.AvailableItems) - { - if (item is RACoreModule) - { - var i = new ListViewItem(item.Name); - i.Tag = item; - - //Create system group, if it doesn't exist - string System = ((RACoreModule)item).System; - if (!systems.ContainsKey(System)) - systems[System] = new ListViewGroup(System); - - i.Group = systems[System]; - } - } - - //Sort System Groups by name - var systemNames = new string[systems.Count]; - systems.Keys.CopyTo(systemNames, 0); - Array.Sort(systemNames); - - //Add each group and its items to the listview - foreach (var key in systemNames) - { - var group = systems[key]; - if (manager.SortAlphabetically && group.Items.Count > 1) - { - //Sort items as array then add back to group - var items = new ListViewItem[group.Items.Count]; - group.Items.CopyTo(items, 0); - group.Items.Clear(); - Array.Sort(items, (ListViewItem a, ListViewItem b) => { return a.Text.CompareTo(b.Text); }); - group.Items.AddRange(items); - } - moduleListView.Items.AddRange(group.Items); - moduleListView.Groups.Add(group); - } - break; - default: - foreach (var item in manager.AvailableItems) - { - if (item is Module && (item as Module).Categories.Contains(Category)) - { - var i = new ListViewItem(item.Name); - i.Tag = item; - moduleListView.Items.Add(i); - } - } - break; - } - - if (moduleListView.Groups.Count != 0 && moduleListView.Items.Count != 0) - moduleListView.Groups[0].Items[0].Selected = true; - else if (moduleListView.Items.Count != 0) - moduleListView.Items[0].Selected = true; - moduleListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); - } - - private void moduleDownloadButton_Click(object sender, EventArgs e) - { - manager.DownloadItem(currentItem); - loadModuleDescription(); - } - - private void moduleDownloadInstallButton_Click(object sender, EventArgs e) - { - InstalledModItem installedModule = manager.GetInstalledModule(currentItem); - - //Download or update module - if (installedModule == null || installedModule.Version != currentItem.Version) - { - moduleDownloadButton_Click(this, new EventArgs()); - installedModule = manager.GetInstalledModule(currentItem); - } - - if (installedModule != null) - { - List mods = new List(); - foreach (var file in installedModule.InstalledFiles) - { - if (file.EndsWith(".hmod")) - { - mods.Add(file.Substring(0, file.Length - 5)); - } - else if (file.EndsWith(".hmod\\")) - { - mods.Add(file.Substring(0, file.Length - 6)); - } - } - MainForm mainForm = Application.OpenForms[0] as MainForm; - mainForm.InstallMods(mods.ToArray()); - } - } - #endregion - } -} diff --git a/Extensions/ModStore/ModStoreTabControl.resx b/Extensions/ModStore/ModStoreTabControl.resx deleted file mode 100644 index 4ffb3b6a6..000000000 --- a/Extensions/ModStore/ModStoreTabControl.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - - - iVBORw0KGgoAAAANSUhEUgAAAEkAAAARCAMAAACmcHF0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6 - JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAADAFBMVEW/ABLSABSwABH///8AAAYAAEYA - AAYAAE8AAAYAAFwAAAYAAGIAAAYAAGgAAAYAAGsAAAYAAG0AAAYAAG8AAAYAAHQAAAoAAIcAAAsAAI4A - AAsAAJAAABD///8AABL///8AABj///////8AAKb///8AAKr///////////////////////8AAB4AAMP/ - //8AAMP///////////8AAMP///8AAMr///////////8AAMz///////////////////8AANX///////// - //8AAOsAADgAAPb///8AAPkAADj///////////////////8AAD7///////////////////////////// - //////////////8AAEj///////////////////8AAFD///8AAFAAAXIAAFAAAXgAAFAAAYsAAFAAAZMA - AFAAAaQAAFAAAacAAFAAAakAAFAAAbsAAFUAAcAAAFUAAcgAAFsAAd4AAFsAAeEAAGAAAeMAAGIAAeYA - AGgAAfMAAGgAAfMAAGkAAfgAAGsAAfwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD17opMAAAALElEQVQ4T2NgpBYYNYk4wMDIwEQdwEAt - g5ioZtCoSUSCYW4S1YyiVm5hYgIAy6oIPH5uAnkAAAAASUVORK5CYII= - - - \ No newline at end of file diff --git a/Extensions/ModStore/Module.cs b/Extensions/ModStore/Module.cs deleted file mode 100644 index 4c084f15c..000000000 --- a/Extensions/ModStore/Module.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace com.clusterrr.hakchi_gui.module_library -{ - public enum ModuleType { unknown = 0, hmod, compressedFile } - public class Module : ModStoreItem - { - public List Categories = new List(); - public ModuleType ModType; - - // Set Module Type (returns true if successful) - public bool SetModType() - { - var extention = Path.Substring(Path.LastIndexOf('.') + 1).ToLower(); - if (extention.Equals("hmod")) - ModType = ModuleType.hmod; - else if (extention.Equals("zip") || extention.Equals("7z") || extention.Equals("rar")) - ModType = ModuleType.compressedFile; - else - ModType = ModuleType.unknown; - - return ModType != ModuleType.unknown; - } - - public override string Type - { - get { return "Module"; } - } - } -} diff --git a/Extensions/ModStore/RACoreModule.cs b/Extensions/ModStore/RACoreModule.cs deleted file mode 100644 index 9ab7743b7..000000000 --- a/Extensions/ModStore/RACoreModule.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace com.clusterrr.hakchi_gui.module_library -{ - public class RACoreModule : Module - { - public string System; - } -} diff --git a/Extensions/ModStore/Resources/InfoStrips.png b/Extensions/ModStore/Resources/InfoStrips.png deleted file mode 100644 index 3f3fc07a9..000000000 Binary files a/Extensions/ModStore/Resources/InfoStrips.png and /dev/null differ diff --git a/Extensions/ModStore/Resources/info.png b/Extensions/ModStore/Resources/info.png deleted file mode 100644 index 346016a0e..000000000 Binary files a/Extensions/ModStore/Resources/info.png and /dev/null differ diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index 504036a81..6b21d2b43 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -79,6 +79,8 @@ private void InitializeComponent() this.uninstallModulesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.generateModulesReportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.modRepoStartSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.modRepoEndSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.manageModRepositoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.originalGamesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.positionAtTheTopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -143,11 +145,13 @@ private void InitializeComponent() this.prepareArtDirectoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.gitHubPageWithActualReleasesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.joinOurDiscordServerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.rminisnesmodsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fAQToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.messageOfTheDayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.donateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem22 = new System.Windows.Forms.ToolStripSeparator(); this.technicalInformationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.messageOfTheDayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.label5 = new System.Windows.Forms.Label(); this.buttonAddGames = new System.Windows.Forms.Button(); @@ -239,8 +243,6 @@ private void InitializeComponent() this.syncStructureForAllGamesCollectionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.gamesConsoleComboBox = new System.Windows.Forms.ComboBox(); this.timerUpdate = new System.Windows.Forms.Timer(this.components); - this.modRepoEndSeparator = new System.Windows.Forms.ToolStripSeparator(); - this.manageModRepositoriesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip.SuspendLayout(); this.statusStrip.SuspendLayout(); this.contextMenuStrip.SuspendLayout(); @@ -582,6 +584,17 @@ private void InitializeComponent() this.modRepoStartSeparator.Name = "modRepoStartSeparator"; resources.ApplyResources(this.modRepoStartSeparator, "modRepoStartSeparator"); // + // modRepoEndSeparator + // + this.modRepoEndSeparator.Name = "modRepoEndSeparator"; + resources.ApplyResources(this.modRepoEndSeparator, "modRepoEndSeparator"); + // + // manageModRepositoriesToolStripMenuItem + // + this.manageModRepositoriesToolStripMenuItem.Name = "manageModRepositoriesToolStripMenuItem"; + resources.ApplyResources(this.manageModRepositoriesToolStripMenuItem, "manageModRepositoriesToolStripMenuItem"); + this.manageModRepositoriesToolStripMenuItem.Click += new System.EventHandler(this.manageModRepositoriesToolStripMenuItem_Click); + // // viewToolStripMenuItem // this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -1027,6 +1040,7 @@ private void InitializeComponent() // // disableBootImageToolStripMenuItem // + this.disableBootImageToolStripMenuItem.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.github; this.disableBootImageToolStripMenuItem.Name = "disableBootImageToolStripMenuItem"; resources.ApplyResources(this.disableBootImageToolStripMenuItem, "disableBootImageToolStripMenuItem"); this.disableBootImageToolStripMenuItem.Click += new System.EventHandler(this.disableBootImageToolStripMenuItem_Click); @@ -1065,38 +1079,55 @@ private void InitializeComponent() // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.gitHubPageWithActualReleasesToolStripMenuItem, - this.fAQToolStripMenuItem, - this.messageOfTheDayToolStripMenuItem, + this.joinOurDiscordServerToolStripMenuItem, + this.rminisnesmodsToolStripMenuItem, this.donateToolStripMenuItem, + this.fAQToolStripMenuItem, this.toolStripMenuItem22, this.technicalInformationToolStripMenuItem, + this.messageOfTheDayToolStripMenuItem, this.aboutToolStripMenuItem}); this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; resources.ApplyResources(this.helpToolStripMenuItem, "helpToolStripMenuItem"); // // gitHubPageWithActualReleasesToolStripMenuItem // + this.gitHubPageWithActualReleasesToolStripMenuItem.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.github; this.gitHubPageWithActualReleasesToolStripMenuItem.Name = "gitHubPageWithActualReleasesToolStripMenuItem"; resources.ApplyResources(this.gitHubPageWithActualReleasesToolStripMenuItem, "gitHubPageWithActualReleasesToolStripMenuItem"); - this.gitHubPageWithActualReleasesToolStripMenuItem.Click += new System.EventHandler(this.gitHubPageWithActualReleasesToolStripMenuItem_Click); + this.gitHubPageWithActualReleasesToolStripMenuItem.Tag = "https://github.com/TeamShinkansen/hakchi2/releases"; + this.gitHubPageWithActualReleasesToolStripMenuItem.Click += new System.EventHandler(this.openWebsiteLink); + // + // joinOurDiscordServerToolStripMenuItem + // + this.joinOurDiscordServerToolStripMenuItem.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.discord; + this.joinOurDiscordServerToolStripMenuItem.Name = "joinOurDiscordServerToolStripMenuItem"; + resources.ApplyResources(this.joinOurDiscordServerToolStripMenuItem, "joinOurDiscordServerToolStripMenuItem"); + this.joinOurDiscordServerToolStripMenuItem.Tag = "https://discord.gg/C9EDFyg"; + this.joinOurDiscordServerToolStripMenuItem.Click += new System.EventHandler(this.openWebsiteLink); + // + // rminisnesmodsToolStripMenuItem + // + this.rminisnesmodsToolStripMenuItem.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.reddit; + this.rminisnesmodsToolStripMenuItem.Name = "rminisnesmodsToolStripMenuItem"; + resources.ApplyResources(this.rminisnesmodsToolStripMenuItem, "rminisnesmodsToolStripMenuItem"); + this.rminisnesmodsToolStripMenuItem.Tag = "https://www.reddit.com/r/minisnesmods/"; + this.rminisnesmodsToolStripMenuItem.Click += new System.EventHandler(this.openWebsiteLink); // // fAQToolStripMenuItem // this.fAQToolStripMenuItem.Name = "fAQToolStripMenuItem"; resources.ApplyResources(this.fAQToolStripMenuItem, "fAQToolStripMenuItem"); - this.fAQToolStripMenuItem.Click += new System.EventHandler(this.fAQToolStripMenuItem_Click); - // - // messageOfTheDayToolStripMenuItem - // - this.messageOfTheDayToolStripMenuItem.Name = "messageOfTheDayToolStripMenuItem"; - resources.ApplyResources(this.messageOfTheDayToolStripMenuItem, "messageOfTheDayToolStripMenuItem"); - this.messageOfTheDayToolStripMenuItem.Click += new System.EventHandler(this.messageOfTheDayToolStripMenuItem_Click); + this.fAQToolStripMenuItem.Tag = "https://github.com/TeamShinkansen/hakchi2/wiki/FAQ"; + this.fAQToolStripMenuItem.Click += new System.EventHandler(this.openWebsiteLink); // // donateToolStripMenuItem // - resources.ApplyResources(this.donateToolStripMenuItem, "donateToolStripMenuItem"); + this.donateToolStripMenuItem.Image = global::com.clusterrr.hakchi_gui.Properties.Resources.paypal; this.donateToolStripMenuItem.Name = "donateToolStripMenuItem"; - this.donateToolStripMenuItem.Click += new System.EventHandler(this.donateToolStripMenuItem_Click); + resources.ApplyResources(this.donateToolStripMenuItem, "donateToolStripMenuItem"); + this.donateToolStripMenuItem.Tag = "https://www.paypal.me/clusterm"; + this.donateToolStripMenuItem.Click += new System.EventHandler(this.openWebsiteLink); // // toolStripMenuItem22 // @@ -1109,6 +1140,12 @@ private void InitializeComponent() resources.ApplyResources(this.technicalInformationToolStripMenuItem, "technicalInformationToolStripMenuItem"); this.technicalInformationToolStripMenuItem.Click += new System.EventHandler(this.technicalInformationToolStripMenuItem_Click); // + // messageOfTheDayToolStripMenuItem + // + this.messageOfTheDayToolStripMenuItem.Name = "messageOfTheDayToolStripMenuItem"; + resources.ApplyResources(this.messageOfTheDayToolStripMenuItem, "messageOfTheDayToolStripMenuItem"); + this.messageOfTheDayToolStripMenuItem.Click += new System.EventHandler(this.messageOfTheDayToolStripMenuItem_Click); + // // aboutToolStripMenuItem // this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; @@ -1759,17 +1796,6 @@ private void InitializeComponent() // this.timerUpdate.Tick += new System.EventHandler(this.timerUpdate_Tick); // - // modRepoEndSeparator - // - this.modRepoEndSeparator.Name = "modRepoEndSeparator"; - resources.ApplyResources(this.modRepoEndSeparator, "modRepoEndSeparator"); - // - // manageModRepositoriesToolStripMenuItem - // - this.manageModRepositoriesToolStripMenuItem.Name = "manageModRepositoriesToolStripMenuItem"; - resources.ApplyResources(this.manageModRepositoriesToolStripMenuItem, "manageModRepositoriesToolStripMenuItem"); - this.manageModRepositoriesToolStripMenuItem.Click += new System.EventHandler(this.manageModRepositoriesToolStripMenuItem_Click); - // // MainForm // this.AllowDrop = true; @@ -2025,6 +2051,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator modRepoEndSeparator; private System.Windows.Forms.ToolStripMenuItem manageModRepositoriesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveDmesgOutputToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem joinOurDiscordServerToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem rminisnesmodsToolStripMenuItem; } } diff --git a/MainForm.cs b/MainForm.cs index 7dd084154..d52b62e05 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -90,7 +90,6 @@ private void FormInitialize() { // prepare collections LoadLanguages(); - populateRepos(); CoreCollection.Load(); // init list view control @@ -206,6 +205,7 @@ private void MainForm_Shown(object sender, EventArgs e) { // centralized upgrade actions system new Upgrade(this).Run(); + populateRepos(); // welcome message, only run for new new users if (ConfigIni.Instance.RunCount++ == 0) @@ -1955,20 +1955,7 @@ private void aboutToolStripMenuItem_Click(object sender, EventArgs e) } } - private void gitHubPageWithActualReleasesToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://github.com/TeamShinkansen/hakchi2/releases"); - } - - private void fAQToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://github.com/TeamShinkansen/hakchi2/wiki/FAQ"); - } - - private void donateToolStripMenuItem_Click(object sender, EventArgs e) - { - Process.Start("https://www.paypal.me/clusterm"); - } + private void openWebsiteLink(Object sender, EventArgs e) => Process.Start((string)((ToolStripMenuItem)sender).Tag); private void exitToolStripMenuItem_Click(object sender, EventArgs e) { @@ -3156,7 +3143,7 @@ private void repoMenuItem_Click(object sender, EventArgs e) { var url = (string)(unboxed.Tag); if (url == "modstore://") { - new ModStore().ShowDialog(this); + throw new NotImplementedException(); } else { diff --git a/MainForm.resx b/MainForm.resx index 0ecea1a1c..268fff3df 100644 --- a/MainForm.resx +++ b/MainForm.resx @@ -805,20 +805,17 @@ GitHub page with actual releases - + 246, 22 - - FAQ + + Join our discord server - + 246, 22 - - Important message - - - False + + /r/minisnesmods 246, 22 @@ -826,6 +823,15 @@ Donate + + False + + + 246, 22 + + + FAQ + 243, 6 @@ -835,6 +841,12 @@ Technical Information... + + 246, 22 + + + Important message + 246, 22 @@ -1115,7 +1127,7 @@ Select emulation core... - 284, 248 + 284, 270 contextMenuStrip @@ -2494,6 +2506,18 @@ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + modRepoEndSeparator + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + manageModRepositoriesToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + viewToolStripMenuItem @@ -2878,16 +2902,22 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - fAQToolStripMenuItem + + joinOurDiscordServerToolStripMenuItem - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - messageOfTheDayToolStripMenuItem + + rminisnesmodsToolStripMenuItem - + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + fAQToolStripMenuItem + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -2908,6 +2938,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + messageOfTheDayToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + aboutToolStripMenuItem @@ -3220,18 +3256,6 @@ System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - modRepoEndSeparator - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - manageModRepositoriesToolStripMenuItem - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - MainForm diff --git a/ModHub/Controls/ModHubTabControl.Designer.cs b/ModHub/Controls/ModHubTabControl.Designer.cs index 0587047b7..5f8977123 100644 --- a/ModHub/Controls/ModHubTabControl.Designer.cs +++ b/ModHub/Controls/ModHubTabControl.Designer.cs @@ -35,7 +35,7 @@ private void InitializeComponent() this.panel1 = new System.Windows.Forms.Panel(); this.modDownloadButton = new System.Windows.Forms.Button(); this.modDownloadInstallButton = new System.Windows.Forms.Button(); - this.modInfo = new com.clusterrr.hakchi_gui.Extensions.ModStore.ModInfoControl(); + this.modInfo = new com.clusterrr.hakchi_gui.ModHub.Controls.ModInfoControl(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -165,7 +165,7 @@ private void InitializeComponent() private Hmod.Controls.ReadmeControl modReadme; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.Panel panel1; - private Extensions.ModStore.ModInfoControl modInfo; + private ModHub.Controls.ModInfoControl modInfo; private System.Windows.Forms.Button modDownloadButton; private System.Windows.Forms.Button modDownloadInstallButton; } diff --git a/Extensions/ModStore/ModInfoControl.Designer.cs b/ModHub/Controls/ModInfoControl.Designer.cs similarity index 96% rename from Extensions/ModStore/ModInfoControl.Designer.cs rename to ModHub/Controls/ModInfoControl.Designer.cs index 56ce3992a..02aac9d00 100644 --- a/Extensions/ModStore/ModInfoControl.Designer.cs +++ b/ModHub/Controls/ModInfoControl.Designer.cs @@ -1,4 +1,4 @@ -namespace com.clusterrr.hakchi_gui.Extensions.ModStore +namespace com.clusterrr.hakchi_gui.ModHub.Controls { partial class ModInfoControl { diff --git a/Extensions/ModStore/ModInfoControl.cs b/ModHub/Controls/ModInfoControl.cs similarity index 97% rename from Extensions/ModStore/ModInfoControl.cs rename to ModHub/Controls/ModInfoControl.cs index c743c9e3b..ea641e6e1 100644 --- a/Extensions/ModStore/ModInfoControl.cs +++ b/ModHub/Controls/ModInfoControl.cs @@ -1,11 +1,11 @@ using System.Drawing; using System.Windows.Forms; -namespace com.clusterrr.hakchi_gui.Extensions.ModStore +namespace com.clusterrr.hakchi_gui.ModHub.Controls { public partial class ModInfoControl : UserControl { - private Bitmap _infoStrips = ModStoreResources.InfoStrips; + private Bitmap _infoStrips = null; public Bitmap infoStrips { get { diff --git a/Extensions/ModStore/ModInfoControl.resx b/ModHub/Controls/ModInfoControl.resx similarity index 100% rename from Extensions/ModStore/ModInfoControl.resx rename to ModHub/Controls/ModInfoControl.resx diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 970bedb50..23c663f99 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -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("3.5.2.0")] -[assembly: AssemblyFileVersion("3.5.2.0")] +[assembly: AssemblyVersion("3.5.3.0")] +[assembly: AssemblyFileVersion("3.5.3.0")] [assembly: NeutralResourcesLanguageAttribute("en-US")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index 596e99901..b2c47b216 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace com.clusterrr.hakchi_gui.Properties { // 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", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -876,6 +876,16 @@ internal static string DiscardChangesQ { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap discord { + get { + object obj = ResourceManager.GetObject("discord", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -1856,6 +1866,16 @@ internal static byte[] gitCommit { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap github { + get { + object obj = ResourceManager.GetObject("github", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized string similar to Googling for. /// @@ -2268,16 +2288,6 @@ internal static string MemoryStatsExport { } } - /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - internal static System.Drawing.Bitmap modstore_info { - get { - object obj = ResourceManager.GetObject("modstore_info", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - /// /// Looks up a localized string similar to @font-face { /// font-family: octicons-link; @@ -2565,6 +2575,16 @@ internal static string PatchQ { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap paypal { + get { + object obj = ResourceManager.GetObject("paypal", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -2701,8 +2721,8 @@ internal static string readmeTemplateCSS { /// <head> /// <style type="text/css">{0}</style> /// </head> - /// <body style="background-color: {3}"> - /// <div id="content"><h1 id="title">{1}</h1>{2}</div> + /// <body style="background-color: {2}"> + /// <div id="content">{1}</div> /// </body> ///</html>. /// @@ -2769,6 +2789,16 @@ internal static System.Drawing.Bitmap red { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap reddit { + get { + object obj = ResourceManager.GetObject("reddit", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized string similar to Removing {0}.... /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index 46712cd6a..08900b8f5 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -1193,9 +1193,6 @@ Continue? Updating list... - - ..\Extensions\ModStore\Resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Did you already flash the custom kernel on your NES/SNES Mini? @@ -1350,4 +1347,16 @@ You can wait some more and if it comes back online, you should see "Recovery mod Welcome + + ..\images\discord.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\images\reddit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\images\github.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\images\paypal.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/Upgrade.cs b/Upgrade.cs index 23981a91d..7e728b1e8 100644 --- a/Upgrade.cs +++ b/Upgrade.cs @@ -198,6 +198,16 @@ private void fillActions() ConfigIni.Instance.FtpArguments = tempConfig.FtpArguments; return true; }) + }, + + new Action() + { + startingVersion = new Version("3.5.0.0"), + targetVersion = new Version("3.5.3.0"), + action = new ActionFunc(() => { + ConfigIni.Instance.repos = ConfigIni.Instance.repos.Where(repo => repo.URL != "modstore://").ToArray(); + return true; + }) } }); diff --git a/hakchi_gui.csproj b/hakchi_gui.csproj index cf4ce289c..6c13c28e0 100644 --- a/hakchi_gui.csproj +++ b/hakchi_gui.csproj @@ -146,40 +146,12 @@ - + UserControl - + ModInfoControl.cs - - Form - - - ModStore.cs - - - Form - - - ModStoreAbout.cs - - - - - - True - True - ModStoreResources.resx - - - UserControl - - - ModStoreTabControl.cs - - - @@ -292,6 +264,10 @@ ExportGamesDialog.cs + + + + PreserveNewest @@ -302,34 +278,9 @@ ExportGamesDialog.cs - + ModInfoControl.cs - - ModStore.cs - - - ModStore.cs - - - ModStore.cs - - - ModStoreAbout.cs - - - ModStoreAbout.cs - - - ModStoreAbout.cs - - - ResXFileCodeGenerator - ModStoreResources.Designer.cs - - - ModStoreTabControl.cs - FoldersManagerForm.cs @@ -835,7 +786,6 @@ PreserveNewest - @@ -844,7 +794,6 @@ PreserveNewest - PreserveNewest diff --git a/images/discord.png b/images/discord.png new file mode 100644 index 000000000..5c871cf9f Binary files /dev/null and b/images/discord.png differ diff --git a/images/github.png b/images/github.png new file mode 100644 index 000000000..13fa6ab5c Binary files /dev/null and b/images/github.png differ diff --git a/images/paypal.png b/images/paypal.png new file mode 100644 index 000000000..3569faf1b Binary files /dev/null and b/images/paypal.png differ diff --git a/images/reddit.png b/images/reddit.png new file mode 100644 index 000000000..4b92d9cda Binary files /dev/null and b/images/reddit.png differ