Esempio n. 1
0
 public static Staff SortMeasures(Staff staff)
 {
     for (var j = 0; j < staff.Measures.Count - 1; j++)
     {
         for (var i = 0; i < staff.Measures.Count - 1; i++)
         {
             var measureA = staff.Measures[i];
             var measureB = staff.Measures[i + 1];
             if (measureA.Sequence > measureB.Sequence)
             {
                 staff.Measures[i] = measureB;
                 staff.Measures[i + 1] = measureA;
             }
         }
     }
     return staff;
 }
 private short GetClefId(Staff staff)
 {
     short clefId = (from a in Infrastructure.Dimensions.Clefs.ClefList where a.Id == SelectedSimpleStaffConfigurationClef.Id select a).Single().Id;
     if (staff.Sequence == Defaults.SequenceIncrement)
     {
         clefId = (from a in Infrastructure.Dimensions.Clefs.ClefList where a.Id == SelectedGrandStaffConfigurationClef.Id select a).Single().Id;
     }
     return clefId;
 }