public void Update(AMedia media) { var mi = _mediaLibrary.Find(m => m.title == media.title); mi = media; Save(); }
public XDoc Media( [DekiExtParam("media uri")] XUri source, [DekiExtParam("media width (default: player dependent)", true)] float?width, [DekiExtParam("media height (default: player dependent)", true)] float?height, [DekiExtParam("auto-start media on load (default: false)", true)] bool?start ) { // determine the media type AMedia media = null; media = media ?? YouTubeVideo.New(source); media = media ?? GoogleVideo.New(source); media = media ?? ViddlerVideo.New(source); media = media ?? VeohVideo.New(source); media = media ?? UStreamVideo.New(source); media = media ?? KalturaVideo.New(source, Config); media = media ?? WindowsMedia.New(source); media = media ?? UnknownMedia.New(source); if (media != null) { media.Width = width; media.Height = height; media.AutoPlay = start ?? false; return(media.AsXDoc()); } return(XDoc.Empty); }
public bool Execute(ButtonDelegate button, AMedia media) { media.ResultEvent += ResultHandler; //media.ResultEvent += ResultHandlerJames; return(button()); //System.Console.WriteLine(button()); //button();h }
public void Execute(ButtonDelegate button, AMedia media) { // Console.WriteLine(media); // button(); // System.Console.WriteLine(button()); media.ResultEvent += ResultHandler; button(); }
public void ResultHandler(AMedia media) { System.Console.WriteLine("{0} is playing...", media.Title); }
public bool Execute(ButtonDelegate button, AMedia media) { media.ResultEvent += ResultHandler; //Here, we invoke the event return(button()); }
public void Execute(string command, AMedia media) { Console.WriteLine(media); }
public bool Execute(ButtonDelegate button, AMedia media) { media.ResultEvent += ResultHandler; return(button()); }
public void Execute(ButtonDelegate button, AMedia media) { media.ResultEvent += ResultHandler; //this works because the signature of ResultHandler fits the requirements of ResultEvent (returns nothing and takes AMedia as argument) button(); }
public void Stop(AMedia m) { System.Console.WriteLine("Stopping '{0}'", m.Title); }
public void ResultHandlerJames(AMedia media) { System.Console.WriteLine("Count = {0}", count); count++; }
public static void openImage(string filePath) { AMedia media = MediaGenerator.getInstanceOf(MediaType.IMAGE); media.Play(filePath); }
public static void playVideo(string filePath) { AMedia media = MediaGenerator.getInstanceOf(MediaType.VIDEO); media.Play(filePath); }
public static void playMusic(string filePath) { AMedia media = MediaGenerator.getInstanceOf(MediaType.MUSIC); media.Play(filePath); }
public void Play(AMedia m) { System.Console.WriteLine("Playing '{0}'", m.Title); }
public void Add(AMedia media) { _mediaLibrary.Add(media); }
public void Execute(ButtonDelegate button, AMedia media) { media.ResultEvent += ResultHandler; button(); }
public void Delete(AMedia media) { var mi = _mediaLibrary.Find(m => m.Title == media.Title); }