예제 #1
0
 void ExecuteOnAttack(IonianTone?tone)
 {
     if (AttackCommand?.CanExecute(tone) ?? false)
     {
         AttackCommand.Execute(tone);
     }
 }
예제 #2
0
 private void AttackKey()
 {
     if (AttackCommand?.CanExecute(this) ?? false)
     {
         AttackCommand.Execute(this);
         attacked       = true;
         Rectangle.Fill = Sharp ? SharpAttackKeyFill : AttackKeyFill;
     }
 }
예제 #3
0
        void ExecuteOnAttack(PianoKey view)
        {
            var tone = new IonianTone()
            {
                Scale  = view.Scale,
                Sharp  = view.Sharp,
                Octave = view.Scale == IonianScale.A || view.Scale == IonianScale.B ? Octave + 1 : Octave,
            };

            if (AttackCommand?.CanExecute(tone) ?? false)
            {
                AttackCommand.Execute(tone);
            }
        }