private void HandleMIDIPlayingCompleted(object sender, EventArgs e)
{
Dispatcher.BeginInvoke(DispatcherPriority.Normal,
new Action(delegate
{
debugConsole.ChangeText("");
Stop.IsEnabled = false;
Stop.Width = 0;
ScoreDisplay.Width = 0;
FPS.Header = "";
Instruments.IsEnabled = true;
Instrument_Clicked(instrument);
//muteSelectedChannel.Width = 0;
//muteSelectedChannel.Header = "";
HideSubCanvas();
normal.Visibility = Visibility.Visible;
b_AnimationStarted = false;
Background.Visibility = Visibility.Hidden;
muteSelectedChannel.Visibility = Visibility.Collapsed;
pause.Visibility = Visibility.Collapsed;
CompositionTarget.Rendering -= MoveCanvas;
CompositionTarget.Rendering -= CanvasNotesScheduledAdder;
}));
}