Пример #1
0
        public void FillNote(SharpNoteEnum note, Brush brush)
        {
            var notes = Keys.FindAll(x => x.GetNoteAsString() == note.ToString());

            notes.ForEach(x => x.Fill(brush, this));
        }
Пример #2
0
 public PianoKey GetKey(SharpNoteEnum note, short octave)
 {
     return(Keys.Find(x => x.GetNoteAsString() == note.ToString() && x.Octave == octave));
 }
Пример #3
0
 public PianoKey[] GetNotes(SharpNoteEnum note)
 {
     return(Keys.FindAll(x => x.GetNoteAsString() == note.ToString()).ToArray());
 }
Пример #4
0
 public SharpPianoKey(Rectangle rectangle, SharpNoteEnum snote, short octave) : base(rectangle, octave)
 {
     this.SharpNote     = snote;
     this.FillColor     = Brushes.Black;
     this.BaseFillColor = FillColor;
 }