public void Cleanup()
        {
            clefobj = null;
            meiclef = null;

            barline    = null;
            meibarline = null;

            unclear = null;

            meicustos = null;
            custos    = null;
        }
        public void Init()
        {
            clefobj = new Model.Clef();
            meiclef = new mei.Clef();

            barline    = new Model.Barline();
            meibarline = new mei.BarLine();

            unclear = new mei.Unclear();

            meicustos = new mei.Custos();
            custos    = new Model.Custos();
        }
Exemple #3
0
        private static Model.BarlineType ConvertBarlineType(mei.BarLine _meibarline)
        {
            string rend = _meibarline.GetFormValue();

            if (rend == null)
            {
                return(Model.BarlineType.Null);
            }
            else if (rend == "dbl")
            {
                return(Model.BarlineType.Double);
            }
            else if (Enum.TryParse(rend, true, out Model.BarlineType linetype))
            {
                return(linetype);
            }
            else
            {
                return(Model.BarlineType.Invalid);
            }
        }
Exemple #4
0
        /// <summary>
        /// Adds barline information to empty barline object.
        /// </summary>
        /// <param name="_barline">Empty barline object</param>
        /// <param name="_meibarline">MEI BarLine element</param>
        /// <returns>Filled barline object</returns>
        public static Model.Barline ConvertBarline(Model.Barline _barline, mei.BarLine _meibarline)
        {
            _barline.BarlineType = ConvertBarlineType(_meibarline);

            return(_barline);
        }