示例#1
0
        /// <summary>
        /// Returns the macro found with the given name on macroName.
        /// </summary>
        /// <returns></returns>
        private Macro GetMacro()
        {
            if (pressedAndpersand && !string.IsNullOrWhiteSpace(macroName))
            {
                AllTags allTags = JSONUtilities.Read();
                foreach (Tag tag in allTags.Tags)
                {
                    foreach (Macro macro in tag.Macros)
                    {
                        if (macro.Name.ToUpperInvariant().Trim().Equals(macroName.ToUpperInvariant().Trim()))
                        {
                            return(macro);
                        }
                    }
                }
            }

            return(null);
        }
示例#2
0
 /// <summary>
 /// Gets all tags from the JSON file.
 /// </summary>
 /// <returns></returns>
 public AllTags ReadTags()
 {
     AllTags = JSONUtilities.Read();
     return(AllTags);
 }