Пример #1
0
 /// <summary>
 ///
 /// </summary>
 private static void StopRoku()
 {
     if (runningProgram == "Roku")
     {
         Roku.KeyPress("Home");
     }
 }
Пример #2
0
 // GET: /Action/GoRoku
 public ActionResult GoRoku()
 {
     Roku.KeyPress("Home");
     Screen.EnsureScreenOn();
     Running.StartStream("Roku");
     Receiver.SelectRokuInput();
     Receiver.SelectTVOutput();
     return(Content(""));
 }
Пример #3
0
    /// <summary>
    /// Exit all running programmes
    /// </summary>
    /// <param name="keepScreen"></param>
    /// <returns></returns>
    public static bool ExitAllPrograms(
        bool keepScreen = false)
    {
        logger.Info("ExitAllPrograms");

        lastActive = DateTime.UtcNow;

        if (spotifyRunning)
        {
            Spotify.ExitPlayer();
            spotifyRunning = false;
        }

        if (runningProgram == "Music" || runningProgram == "Photo")
        {
            ExitJRMC();
        }

        if (runningProgram == "Sky")
        {
            DesktopClient.SendIR(IRCodes.Codes["Sky.PowerSTB"], "Sky.PowerSTB");
            Receiver.SelectComputerInput();
        }

        if (runningProgram == "Roku")
        {
            Roku.KeyPress("Home");
            Receiver.SelectComputerInput();
        }

        if (!keepScreen)
        {
            Receiver.TurnOff();
            Screen.SetScreenDisplayMode(0);
        }
        else
        {
            Screen.EnsureScreenOn();
            Receiver.SelectTVOutput();
        }

        bool ok = DesktopClient.ExitAllPrograms();

        NothingRunning();

        return(ok);
    }
Пример #4
0
 public ContentResult KeyPress(
     string id)
 {
     Roku.KeyPress(id);
     return(this.Content(""));
 }