Example #1
0
 private void buttonNMDeleteModInfo_Click(object sender, EventArgs e)
 {
     if (MsgBox.Get("nexusModsRemoveRemoteInfo").Show(MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         NexusMods.ClearRemoteInfo();
         this.UpdateModList();
         MsgBox.Get("nexusModsRemoveRemoteInfoSuccess").Popup(MessageBoxIcon.Information);
     }
 }
Example #2
0
        /*
         * Background worker:
         */

        // Retrieve mod info:

        private void backgroundWorkerRetrieveModInfo_DoWork(object sender, DoWorkEventArgs e)
        {
            int i   = 1;
            int len = ManagedMods.Instance.Mods.Count();

            foreach (Mod mod in ManagedMods.Instance.Mods)
            {
                if (mod.URL != "")
                {
                    this.backgroundWorkerRetrieveModInfo.ReportProgress((int)((float)i / (float)len * 100f), $"[{i}/{len}] Requesting info for \"{mod.Title}\"");
                    NexusMods.RefreshModInfo(mod.URL);
                }
                i++;
            }
            NexusMods.Save();
        }
 public NMMod(String url)
 {
     this.URL = url;
     this.ID  = NexusMods.GetIDFromURL(url);
 }