Example #1
0
 public static TupleLength createInstance(int note_length, int type)
 {
     if (NoteLengthExtensions.intIsValidNoteLength(note_length) &&
         TupletTypeExtensions.intIsValidTupletType(type))
     {
         return(new TupleLength((NoteLength)note_length, (TupletType)type));
     }
     else
     {
         return(null);
     }
 }
Example #2
0
        public Dictionary <TupletType, ImageBrush> genTupletImages(Dictionary <string, string> uri_dict)
        {
            var image_dict = new Dictionary <TupletType, ImageBrush>();

            foreach (var entry in uri_dict)
            {
                TupletType type  = TupletTypeExtensions.getTupletTypeFromString(entry.Key);
                var        brush = new ImageBrush();
                brush.ImageSource = SettingsReader.getImageFromLocation(entry.Value);

                image_dict[type] = brush;
            }

            return(image_dict);
        }