/// <summary> /// Adds a bar number to the first Barline in the top visible voice of each system except the first. /// </summary> private void AddBarNumbers() { int barNumber = 1; foreach (SvgSystem system in Systems) { Voice topVisibleVoice = system.TopVisibleVoice(); bool isFirstBarline = true; for (int i = 0; i < topVisibleVoice.NoteObjects.Count - 1; i++) { Barline barline = topVisibleVoice.NoteObjects[i] as Barline; if (barline != null) { if (isFirstBarline && system != Systems[0]) { FramedBarNumberText framedBarNumber = new FramedBarNumberText(this, barNumber.ToString(), _pageFormat.Gap, _pageFormat.StafflineStemStrokeWidth); barline.DrawObjects.Add(framedBarNumber); isFirstBarline = false; } barNumber++; } } } }
/// <summary> /// Adds a bar number to the first Barline in the top visible voice of each system except the first. /// </summary> private void AddBarNumbers() { int barNumber = 1; foreach(SvgSystem system in Systems) { Voice barnumberVoice = system.VoiceForBarnumber(); bool isFirstBarline = true; for(int i = 0; i < barnumberVoice.NoteObjects.Count - 1; i++) { Barline barline = barnumberVoice.NoteObjects[i] as Barline; if(barline != null) { if(isFirstBarline && system != Systems[0]) { FramedBarNumberText framedBarNumber = new FramedBarNumberText(this, barNumber.ToString(), _pageFormat.Gap, _pageFormat.StafflineStemStrokeWidth); barline.DrawObjects.Add(framedBarNumber); isFirstBarline = false; } barNumber++; } } } }