public void ExecuteDualCommand(HotkeyCommand playerCommand)
        {
            // A player has detected that a hotkey it received should actually be handled at the dual player level.
            // At that point there is still two options, either it's a true dual player command,
            // something normally bound to controls in the common controls,
            // or it's a multiplexed command, a command that should simply be forwarded to each player.

            HotkeyCommand dualCommand = hotkeys.FirstOrDefault(hk => hk != null && hk.KeyData == playerCommand.KeyData);

            if (dualCommand == null)
            {
                return;
            }

            DualPlayerCommands command = (DualPlayerCommands)dualCommand.CommandCode;

            switch (command)
            {
            case DualPlayerCommands.GotoPreviousKeyframe:
            case DualPlayerCommands.GotoNextKeyframe:
            case DualPlayerCommands.GotoSyncPoint:
            case DualPlayerCommands.AddKeyframe:
                players[0].ExecuteScreenCommand(playerCommand.CommandCode);
                players[1].ExecuteScreenCommand(playerCommand.CommandCode);
                break;

            default:
                view.ExecuteDualCommand(dualCommand.CommandCode);
                break;
            }
        }
        protected override bool ExecuteCommand(int cmd)
        {
            DualPlayerCommands command = (DualPlayerCommands)cmd;

            switch (command)
            {
            case DualPlayerCommands.TogglePlay:
                PlayPause();
                break;

            case DualPlayerCommands.GotoPreviousImage:
                Previous();
                break;

            case DualPlayerCommands.GotoFirstImage:
                First();
                break;

            case DualPlayerCommands.GotoPreviousKeyframe:
                if (GotoPrevKeyframe != null)
                {
                    GotoPrevKeyframe(this, EventArgs.Empty);
                }
                break;

            case DualPlayerCommands.GotoNextImage:
                Next();
                break;

            case DualPlayerCommands.GotoLastImage:
                Last();
                break;

            case DualPlayerCommands.GotoNextKeyframe:
                if (GotoNextKeyframe != null)
                {
                    GotoNextKeyframe(this, EventArgs.Empty);
                }
                break;

            case DualPlayerCommands.GotoSyncPoint:
                if (GotoSync != null)
                {
                    GotoSync(this, EventArgs.Empty);
                }
                break;

            case DualPlayerCommands.ToggleSyncMerge:
                ToggleMerge();
                break;

            case DualPlayerCommands.AddKeyframe:
                if (AddKeyframe != null)
                {
                    AddKeyframe(this, EventArgs.Empty);
                }
                break;

            default:
                return(base.ExecuteCommand(cmd));
            }

            return(true);
        }