Exemplo n.º 1
0
 void ExecuteOnRelease(IonianTone?tone)
 {
     if (ReleaseCommand?.CanExecute(tone) ?? false)
     {
         ReleaseCommand.Execute(tone);
     }
 }
Exemplo n.º 2
0
 private void ReleaseKey()
 {
     if (ReleaseCommand?.CanExecute(this) ?? false)
     {
         ReleaseCommand.Execute(this);
         attacked       = false;
         Rectangle.Fill = Sharp ? SharpDefaultKeyFill : DefaultKeyFill;
     }
 }
Exemplo n.º 3
0
        void ExecuteOnRelease(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 (ReleaseCommand?.CanExecute(tone) ?? false)
            {
                ReleaseCommand.Execute(tone);
            }
        }
Exemplo n.º 4
0
 private bool CanExecuteReleaseCommand()
 {
     return(IsLatchActive && !IsLatched && ReleaseCommand != null && ReleaseCommand.CanExecute(ReleaseCommandParameter));
 }