本文整理汇总了C#中IMod.UpdateInfo方法的典型用法代码示例。如果您正苦于以下问题:C# IMod.UpdateInfo方法的具体用法?C# IMod.UpdateInfo怎么用?C# IMod.UpdateInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMod
的用法示例。
在下文中一共展示了IMod.UpdateInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateModName
/// <summary>
/// Updates the mod's name.
/// </summary>
/// <param name="p_modMod">The mod whose name is to be updated.</param>
/// <param name="p_strNewModName">The name to which to update the mod's name.</param>
public void UpdateModName(IMod p_modMod, string p_strNewModName)
{
ModInfo mifNewInfo = new ModInfo(p_modMod);
mifNewInfo.ModName = p_strNewModName;
p_modMod.UpdateInfo(mifNewInfo, true);
}
示例2: SwitchModCategory
/// <summary>
/// Switches the mod category.
/// </summary>
/// <param name="p_modMod">The mod.</param>
/// <param name="p_intCategoryId">The new category id.</param>
public void SwitchModCategory(IMod p_modMod, Int32 p_intCategoryId)
{
ModInfo mifUpdatedMod = new ModInfo(p_modMod);
mifUpdatedMod.CustomCategoryId = p_intCategoryId;
mifUpdatedMod.UpdateWarningEnabled = p_modMod.UpdateWarningEnabled;
p_modMod.UpdateInfo((IModInfo)mifUpdatedMod, false);
}
示例3: Tag
/// <summary>
/// Tags the mod with the given values.
/// </summary>
/// <param name="p_modMod">The mod the tag.</param>
/// <param name="p_mifModInfo">The values with which to tag the mod.</param>
/// <param name="p_booOverwriteAllValues">Whether to overwrite the current info values,
/// or just the empty ones.</param>
public void Tag(IMod p_modMod, IModInfo p_mifModInfo, bool p_booOverwriteAllValues)
{
p_modMod.UpdateInfo(p_mifModInfo, p_booOverwriteAllValues);
}
示例4: ToggleModEndorsement
/// <summary>
/// Toggles the endorsement for the given mod.
/// </summary>
/// <param name="p_modMod">The mod to endorse/unendorse.</param>
public void ToggleModEndorsement(IMod p_modMod)
{
bool? booEndorsementState = ModRepository.ToggleEndorsement(p_modMod.Id, p_modMod.IsEndorsed == true ? 1 : (p_modMod.IsEndorsed == false ? -1 : 0));
ModInfo mifUpdatedMod = new ModInfo(p_modMod);
mifUpdatedMod.IsEndorsed = booEndorsementState;
mifUpdatedMod.HumanReadableVersion = String.IsNullOrEmpty(mifUpdatedMod.LastKnownVersion) ? mifUpdatedMod.HumanReadableVersion : mifUpdatedMod.LastKnownVersion;
AddNewVersionNumberForMod(p_modMod, (IModInfo)mifUpdatedMod);
p_modMod.UpdateInfo((IModInfo)mifUpdatedMod, false);
}