public void RenameCategory(int p_intCategoryId, string p_strNewName) { IModCategory imcCategory = m_tslCategories.Find(Item => Item.Id == p_intCategoryId); imcCategory.CategoryName = p_strNewName; imcCategory.CategoryPath = Path.Combine(ModInstallDirectory, p_strNewName); UpdateCategoryFile(); }
private void UpdateCurrentProfileModCount() { ModProfile mopCurrentProfile = (ModProfile)m_tslProfiles.Find(x => x.Id == m_strCurrentProfileId); if (mopCurrentProfile != null) { mopCurrentProfile.ModCount = VirtualModActivator.ModCount; } }
/// <summary> /// Finds the category by Id. /// </summary> /// <param name="p_intCategoryId">The category Id.</param> public IModCategory FindCategory(Int32 p_intCategoryId) { IModCategory imcCategory = m_tslCategories.Find(Item => Item.Id == p_intCategoryId); return(imcCategory == null ? (IModCategory) new ModCategory() : imcCategory); }