Server/Actions/ActionCecScan.cs
author StephaneLenclud
Thu, 25 Aug 2016 13:12:54 +0200
changeset 254 181323a59047
parent 231 4c706feaf706
child 258 e237c2e33545
permissions -rw-r--r--
Published v1.0.1.0.
Updating Harmony library to v0.5.0
     1 using CecSharp;
     2 using SharpLib.Ear;
     3 using System;
     4 using System.Collections.Generic;
     5 using System.Diagnostics;
     6 using System.Linq;
     7 using System.Runtime.Serialization;
     8 using System.Text;
     9 using System.Threading.Tasks;
    10 
    11 namespace SharpDisplayManager
    12 {
    13 
    14     [DataContract]
    15     [AttributeObject(Id = "Cec.Scan", Name = "CEC Scan", Description = "Scan devices on your CEC HDMI network.")]
    16     class ActionCecScan : SharpLib.Ear.Action
    17     {
    18         protected override void DoExecute()
    19         {
    20             if (Cec.Client.Static == null)
    21             {
    22                 Trace.WriteLine("WARNING: No CEC client installed.");
    23                 return;
    24             }
    25 
    26             Cec.Client.Static.Scan();
    27         }
    28     }
    29 }