/// <summary>
        /// Checks for mod updates.
        /// </summary>
        /// <returns>Message</returns>
        /// <param name="p_booOverrideCategorySetup">Whether to just check for mods missing the Nexus Category.</param>
        public void CheckForUpdates(bool p_booOverrideCategorySetup)
        {
            List <IMod> lstModList = new List <IMod>();

            if (p_booOverrideCategorySetup)
            {
                lstModList.AddRange(from Mod in ManagedMods
                                    where ((Mod.CategoryId == 0) && (Mod.CustomCategoryId < 0) && Mod.UpdateChecksEnabled)
                                    select Mod);
            }
            else
            {
                lstModList.AddRange(ManagedMods);
            }

            if (!ModRepository.IsOffline)
            {
                if (lstModList.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, null, ConfirmUpdaterAction, string.Empty, p_booOverrideCategorySetup, false)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, null, ConfirmUpdaterAction, p_booOverrideCategorySetup, false);
            }
        }
Example #2
0
        /// <summary>
        /// Checks for mod file's missing download id.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckModFileDownloadId(bool?p_booOnlyMissing)
        {
            List <IMod> lstModList = new List <IMod>();

            lstModList.AddRange(from Mod in ManagedMods select Mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, p_booOnlyMissing)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, p_booOnlyMissing);
            }
        }
        /// <summary>
        /// Checks for mods updated within a the last day/week/month.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckUpdatedMods(string period)
        {
            var lstModList = new List <IMod>();

            lstModList.AddRange(from mod in ManagedMods
                                where mod.UpdateChecksEnabled
                                select mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, period, false, null)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, false);
            }
        }
        /// <summary>
        /// Checks for mod file's missing download id.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckModFileDownloadId(bool?onlyMissing)
        {
            var lstModList = new List <IMod>();

            lstModList.AddRange(from mod in ManagedMods
                                where mod.UpdateChecksEnabled
                                select mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, string.Empty, false, onlyMissing)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ProfileManager, ConfirmUpdaterAction, false, onlyMissing);
            }
        }
Example #5
0
        /// <summary>
        /// Checks for mod file's missing download id.
        /// </summary>
        /// <returns>Message</returns>
        public void CheckModFileDownloadId()
        {
            List <IMod> lstModList = new List <IMod>();

            lstModList.AddRange(from Mod in ManagedMods
                                where (String.IsNullOrWhiteSpace(Mod.DownloadId) || Mod.DownloadId == "-1")
                                select Mod);

            if (!ModRepository.IsOffline)
            {
                if (ManagedMods.Count > 0)
                {
                    UpdatingMods(this, new EventArgs <IBackgroundTask>(ModManager.UpdateMods(lstModList, ConfirmUpdaterAction, false, true)));
                }
            }
            else
            {
                ModManager.Login();
                ModManager.AsyncUpdateMods(lstModList, ConfirmUpdaterAction, false, true);
            }
        }