Nexus.Client.ModManagement.ModManager.SwitchModCategory C# (CSharp) Method

SwitchModCategory() public method

Switches the mod category.
public SwitchModCategory ( IMod p_modMod, Int32 p_intCategoryId ) : void
p_modMod IMod The mod.
p_intCategoryId System.Int32 The new category id.
return void
		public void SwitchModCategory(IMod p_modMod, Int32 p_intCategoryId)
		{
			AutoUpdater.SwitchModCategory(p_modMod, p_intCategoryId);
		}

Usage Example

Example #1
0
        /// <summary>
        /// The method that is called to start the backgound task.
        /// </summary>
        /// <param name="args">Arguments to for the task execution.</param>
        /// <returns>Always <c>null</c>.</returns>
        protected override object DoWork(object[] args)
        {
            ConfirmActionMethod camConfirm = (ConfirmActionMethod)args[0];

            OverallMessage          = "Updating mod categories...";
            OverallProgress         = 0;
            OverallProgressStepSize = 1;
            ShowItemProgress        = true;
            ItemProgressMaximum     = 1;
            OverallProgressMaximum  = ModList.Count;

            foreach (IMod modMod in ModList)
            {
                if (m_booCancel)
                {
                    break;
                }
                ItemMessage  = modMod.ModName;
                ItemProgress = 1;
                ModManager.SwitchModCategory(modMod, CategoryId);
                if (OverallProgress < OverallProgressMaximum)
                {
                    StepOverallProgress();
                }
                ItemProgress = 0;
            }
            return(null);
        }