Example #1
0
        public void InvokeRemoteCommand(int handle, PotPlayerAction action)
        {
            var remote = new PotPlayerRemote(new ProcessWindow()
            {
                Handle = (IntPtr)handle
            });

            remote.DoAction(action);
        }
Example #2
0
        public void DoAction(PotPlayerAction action)
        {
            switch (action)
            {
            case PotPlayerAction.Pause:
                Pause();
                break;

            case PotPlayerAction.Fullscreen:
                Fullscreen();
                break;

            case PotPlayerAction.NextFile:
                NextFile();
                break;

            case PotPlayerAction.PreviousFile:
                PreviousFile();
                break;

            case PotPlayerAction.Rewind:
                Rewind();
                break;

            case PotPlayerAction.Forward:
                Forward();
                break;

            case PotPlayerAction.VolumeUp:
                VolumeUp();
                break;

            case PotPlayerAction.VolumeDown:
                VolumeDown();
                break;

            case PotPlayerAction.Mute:
                Mute();
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(action), action, null);
            }
        }