Server/Actions/ActionCecOpen.cs
author StephaneLenclud
Mon, 25 Jul 2016 17:14:45 +0200
changeset 217 94f91d446339
child 222 0e8c6c2f4777
permissions -rw-r--r--
Events tab button state management.
     1 using CecSharp;
     2 using SharpLib.Ear;
     3 using System;
     4 using System.Collections.Generic;
     5 using System.Linq;
     6 using System.Runtime.Serialization;
     7 using System.Text;
     8 using System.Threading.Tasks;
     9 
    10 namespace SharpDisplayManager
    11 {
    12     [DataContract]
    13     [AttributeAction(Id = "Cec.Open", Name = "CEC Open", Description = "Open CEC connection.")]
    14     class ActionCecOpen : SharpLib.Ear.Action
    15     {
    16         public override void Execute()
    17         {
    18             if (Cec.Client.Static == null)
    19             {
    20                 Console.WriteLine("WARNING: No CEC client installed.");
    21             }
    22 
    23             Cec.Client.Static.Open(1000);
    24         }
    25     }
    26 }