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.Standby", Name = "CEC Device Standby", Description = "Puts on standby the specified CEC device on your HDMI bus.")]
StephaneLenclud@220: public class ActionCecDeviceStandby : ActionCecDevice
StephaneLenclud@220: {
StephaneLenclud@220: ///
StephaneLenclud@222: /// Build a user readable string to describe this action.
StephaneLenclud@220: ///
StephaneLenclud@220: ///
StephaneLenclud@220: public override string Brief()
StephaneLenclud@220: {
StephaneLenclud@222: return "CEC Standby " + DeviceName;
StephaneLenclud@220: }
StephaneLenclud@220:
StephaneLenclud@220: ///
StephaneLenclud@220: ///
StephaneLenclud@220: ///
StephaneLenclud@228: protected 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.StandbyDevices(Device);
StephaneLenclud@220: }
StephaneLenclud@220:
StephaneLenclud@220: }
StephaneLenclud@220: }