Exemple #1
0
        private static HtmlString GetHtmlString(Tone tone, Accidental accidental, NamingConvention conv)
        {
            if (tone == Tone.B && accidental == Accidental.Flat && conv == NamingConvention.German)
            {
                return(new HtmlString("B"));
            }
            var str = string.Format("{0}<sub>{1}</sub>", tone.GetDescriptions().ToArray()[(int)conv], accidental.ToDescription());

            return(new HtmlString(str));
        }
Exemple #2
0
        public string ToString(NamingConvention conv)
        {
            if (Tone == Tone.B &&
                Accidental == Accidental.Flat &&
                conv == NamingConvention.German)
            {
                return("B");
            }

            return(string.Format("{0}{1}", Tone.GetDescriptions().ToArray()[(int)conv], Accidental.ToDescription() ?? string.Empty));
        }