public override void InstallTelegramHandlers(telegram.Service telegram) { this.telegram = telegram; projectorMenu = new telegram.Menu(title: "Projector", afterMenuText: () => projector.Status.ToString()); projectorMenu.Add(new telegram.Menu(title: "On", callback: () => projector.Status = PowerStatus.poweron)); projectorMenu.Add(new telegram.Menu(title: "Off", callback: () => projector.Status = PowerStatus.standby)); telegram.AddRootMenu(projectorMenu); }
public override void InstallTelegramHandlers(telegram.Service telegram) { kodiMenu = new Menu(title: "Kodi"); kodiMenu.Add(new Menu(title: "Left", callback: async() => await CallRpc("Input.Left"))); kodiMenu.Add(new Menu(title: "Right", callback: async() => await CallRpc("Input.Right"))); kodiMenu.Add(new Menu(title: "Up", callback: async() => await CallRpc("Input.Up"))); kodiMenu.Add(new Menu(title: "Down", callback: async() => await CallRpc("Input.Down"))); kodiMenu.Add(new Menu(title: "Select", callback: async() => await CallRpc("Input.Select"))); kodiMenu.Add(new Menu(title: "Return", callback: async() => await CallRpc("Input.Back"))); telegram.AddRootMenu(kodiMenu); }