Server/Actions/ActionCecInactiveSource.cs
author StephaneLenclud
Fri, 29 Jul 2016 14:46:30 +0200
changeset 229 7c631055b94b
parent 223 f6272f65d8fc
child 231 4c706feaf706
permissions -rw-r--r--
Adding event test button.
StephaneLenclud@214
     1
using CecSharp;
StephaneLenclud@214
     2
using SharpLib.Ear;
StephaneLenclud@214
     3
using System;
StephaneLenclud@214
     4
using System.Collections.Generic;
StephaneLenclud@214
     5
using System.Linq;
StephaneLenclud@214
     6
using System.Runtime.Serialization;
StephaneLenclud@214
     7
using System.Text;
StephaneLenclud@214
     8
using System.Threading.Tasks;
StephaneLenclud@214
     9
StephaneLenclud@214
    10
namespace SharpDisplayManager
StephaneLenclud@214
    11
{
StephaneLenclud@214
    12
    [DataContract]
StephaneLenclud@214
    13
    [AttributeAction(Id = "Cec.InactiveSource", Name = "CEC Inactive Source", Description = "Set this CEC device as inactive source.")]
StephaneLenclud@214
    14
    class ActionCecInactiveSource : SharpLib.Ear.Action
StephaneLenclud@214
    15
    {
StephaneLenclud@228
    16
        protected override void DoExecute()
StephaneLenclud@214
    17
        {
StephaneLenclud@214
    18
            if (Cec.Client.Static == null)
StephaneLenclud@214
    19
            {
StephaneLenclud@214
    20
                Console.WriteLine("WARNING: No CEC client installed.");
StephaneLenclud@222
    21
                return;
StephaneLenclud@214
    22
            }
StephaneLenclud@214
    23
StephaneLenclud@214
    24
            Cec.Client.Static.Lib.SetInactiveView();
StephaneLenclud@214
    25
        }
StephaneLenclud@214
    26
    }
StephaneLenclud@214
    27
}