示例#1
0
        private Clef GetClef(XmlNode attributesNode)
        {
            var clef = new Clef();

            var clefNode = attributesNode.SelectSingleNode("clef");

            if (clefNode != null)
            {
                var lineNode = clefNode.SelectSingleNode("line");
                if (lineNode != null)
                {
                    clef.Line = Convert.ToInt32(lineNode.InnerText);
                }

                var signNode = clefNode.SelectSingleNode("sign");
                if (signNode != null)
                {
                    clef.Sign = signNode.InnerText;
                }

                var change = clefNode.SelectSingleNode("clef-octave-change");
                if (change != null)
                {
                    clef.OctaveChange = Convert.ToInt32(change.InnerText);
                }
            }
            return(clef);
        }
示例#2
0
 public bool ClefEquivalentToCurrent(Clef testClef)
 {
     return (testClef.Sign == StaffClef.Sign && testClef.Line == StaffClef.Line);
 }