예제 #1
0
    void ExportRulerProperties(XmlElement parent, RulerProperties props)
    {
        XmlElement elt = AddChild(parent, "Ruler");

        ChildObject(elt, "Format", props.Format);
        ChildTimecode(elt, "StartTime", props.StartTime);
        ChildDouble(elt, "BeatsPerMinute", props.BeatsPerMinute);
        ChildUInt32(elt, "BeatsPerMeasure", props.BeatsPerMeasure);
        ChildObject(elt, "BeatValue", props.BeatValue);
    }
예제 #2
0
    void ImportRulerProperties(XmlElement parent, RulerProperties props)
    {
        XmlElement elt = parent["Ruler"];

        if (null == elt)
        {
            return;
        }
        try { props.Format = ChildRulerFormat(elt, "Format"); } catch {}
        try { props.StartTime = ChildTimecode(elt, "StartTime"); } catch {}
        try { props.BeatsPerMinute = ChildDouble(elt, "BeatsPerMinute"); } catch {}
        try { props.BeatsPerMeasure = ChildUInt32(elt, "BeatsPerMeasure"); } catch {}
        try { props.BeatValue = ChildBeatValue(elt, "BeatValue"); } catch {}
    }