public void VisitTagCommand(ITagCommand tagCommand) { if (Client.Stopped) { return; } if (IsConditionFulfilled(tagCommand.Condition)) { if (tagCommand.CommandType == MacroCommandType.AddTag) { PlayingModule.ProjectPlayer.AddMusicTag(tagCommand.CategoryId, tagCommand.TagId); } else { PlayingModule.ProjectPlayer.RemoveMusicTag(tagCommand.CategoryId, tagCommand.TagId); } } }
public void VisitTagCommand(ITagCommand tagCommand) { CheckCondition(tagCommand); try { int languageId = m_TagLanguage; if (m_TagLanguage == -1) { m_TagLanguage = Ares.Tags.TagsModule.GetTagsDB().TranslationsInterface.GetIdOfCurrentUILanguage(); } List <int> tagIds = new List <int>(); tagIds.Add(tagCommand.TagId); var tagInfos = Ares.Tags.TagsModule.GetTagsDB().GetReadInterfaceByLanguage(m_TagLanguage).GetTagInfos(tagIds); if (tagInfos.Count == 0) { AddError(m_ModelErrors, ModelError.ErrorSeverity.Error, StringResources.TagNotFound, tagCommand); } } catch (Ares.Tags.TagsDbException) { // ignore here } }
private static String GetTagName(ITagCommand tagCommand, IProject project) { return(GetTagName(tagCommand.TagId, project)); }