Exemplo n.º 1
0
        // GET: /Action/Launch
        public ActionResult Launch(
            string name,
            string args,
            string title,
            string detach)
        {
            Security.ClearSavedProfile();

            if (String.IsNullOrEmpty(Running.RunningProgram))
            {
                DesktopClient.SendSpecialkey("ClearDesktop");
            }

            if (!string.IsNullOrEmpty(name))
            {
                if (!string.IsNullOrEmpty(args))
                {
                    args = HttpUtility.UrlDecode(args);
                }
                if (!string.IsNullOrEmpty(detach))
                {
                    Running.LaunchNewProgram(name, args);
                }
                else
                {
                    Running.LaunchProgram(name, args);
                }
            }

            return(Content("OK"));
        }
Exemplo n.º 2
0
        // GET: /Web/PlayBBC
        public ContentResult PlayBBC(
            string pid)
        {
            if (String.IsNullOrEmpty(Running.RunningProgram))
            {
                DesktopClient.SendSpecialkey("ClearDesktop");
            }

            Running.LaunchProgram("Web", "-k -nomerge " + BBC.GetTvPlayerUrl(pid));

            return(Content("OK"));
        }
Exemplo n.º 3
0
 // GET: /Video/PlayVideoFile
 public ContentResult PlayVideoFile(
     string path,
     string title)
 {
     Running.LaunchProgram("Video", "/Media /F /ExFunc:exSetVolume,100 /ExFunc:exSetMode,0 /Play \"" + path + "\"");
     Zoom.IsDvdMode  = false;
     currentFilename = null;
     if (!string.IsNullOrEmpty(title))
     {
         Zoom.Title = title;
     }
     SendZoom("exInterface,08", null);
     return(this.Content(""));
 }
Exemplo n.º 4
0
 // GET: /Video/PlayDvdDirectory
 public ContentResult PlayDvdDirectory(
     string path,
     string title)
 {
     Running.LaunchProgram("Video", "/DVD /F /ExFunc:exSetVolume,100 /ExFunc:exSetMode,1 /Play \"" + path + "\\VIDEO_TS\\VIDEO_TS.IFO\"");
     Zoom.IsDvdMode  = true;
     currentFilename = null;
     if (!string.IsNullOrEmpty(title))
     {
         Zoom.Title = title;
     }
     SendZoom("exInterface,08", null);
     return(this.Content(""));
 }
Exemplo n.º 5
0
 // GET: /Video/PlayDvdDisk
 public ContentResult PlayDvdDisk(
     string drive,
     string title)
 {
     Running.LaunchProgram("Video", "/DVD /F /ExFunc:exSetVolume,100 /ExFunc:exSetMode,1 /Opendrive:" + drive);
     Zoom.IsDvdMode  = true;
     currentFilename = null;
     if (!string.IsNullOrEmpty(title))
     {
         Zoom.Title = title;
     }
     SendZoom("exInterface,08", null);
     return(this.Content(""));
 }
Exemplo n.º 6
0
 // GET: /Video/PlayRecording
 public ContentResult PlayRecording(
     string id)
 {
     if (DvbViewer.AllRecordings.ContainsKey(id))
     {
         var recording = DvbViewer.AllRecordings[id];
         currentFilename = recording.Filename;
         lastFileSize    = GetOnDiskFileSize(currentFilename);
         lastSizeCheck   = DateTime.UtcNow;
         Running.LaunchProgram("Video", "/Media /F /ExFunc:exSetVolume,100 /ExFunc:exSetMode,0 /Play \"" + recording.Filename + "\"");
         Zoom.IsDvdMode = false;
         Zoom.Title     = recording.Title;
         SendZoom("exInterface,08", null);
     }
     return(this.Content(""));
 }