StephaneLenclud@220: using CecSharp; StephaneLenclud@220: using SharpLib.Ear; StephaneLenclud@220: using System; StephaneLenclud@220: using System.Collections.Generic; StephaneLenclud@220: using System.Linq; StephaneLenclud@220: using System.Runtime.InteropServices; StephaneLenclud@220: using System.Runtime.Serialization; StephaneLenclud@220: using System.Text; StephaneLenclud@220: using System.Threading.Tasks; StephaneLenclud@220: StephaneLenclud@220: namespace SharpDisplayManager StephaneLenclud@220: { StephaneLenclud@220: [DataContract] StephaneLenclud@220: [AttributeAction(Id = "Cec.Device.PowerOn", Name = "CEC Device Power On", Description = "Turns on the specified CEC device on your HDMI bus.")] StephaneLenclud@220: public class ActionCecDevicePowerOn : ActionCecDevice StephaneLenclud@220: { StephaneLenclud@220: /// StephaneLenclud@220: /// StephaneLenclud@220: /// StephaneLenclud@220: /// StephaneLenclud@220: public override string Brief() StephaneLenclud@220: { StephaneLenclud@222: return "CEC Power On " + DeviceName; StephaneLenclud@220: } StephaneLenclud@220: StephaneLenclud@220: /// StephaneLenclud@220: /// StephaneLenclud@220: /// StephaneLenclud@223: public override void DoExecute() StephaneLenclud@220: { StephaneLenclud@220: if (Cec.Client.Static == null) StephaneLenclud@220: { StephaneLenclud@220: Console.WriteLine("WARNING: No CEC client installed."); StephaneLenclud@220: return; StephaneLenclud@220: } StephaneLenclud@220: StephaneLenclud@220: Cec.Client.Static.Lib.PowerOnDevices(Device); StephaneLenclud@220: } StephaneLenclud@220: } StephaneLenclud@220: }