Server/Actions/ActionCecClose.cs
author StephaneLenclud
Wed, 27 Jul 2016 15:05:58 +0200
changeset 223 f6272f65d8fc
parent 222 0e8c6c2f4777
child 228 6a84d8282226
permissions -rw-r--r--
Adding action move and test buttons.
     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.Close", Name = "CEC Close", Description = "Close CEC connection.")]
    14     class ActionCecClose : SharpLib.Ear.Action
    15     {
    16         public override void DoExecute()
    17         {
    18             if (Cec.Client.Static == null)
    19             {
    20                 Console.WriteLine("WARNING: No CEC client installed.");
    21                 return;
    22             }
    23 
    24             Cec.Client.Static.Close();
    25         }
    26     }
    27 }