public Entry(XmlElement element) { Id = Util.ChildValue(element, "id"); Title = Util.ChildValue(element, "title"); Link = Util.ChildValue(element, "link"); Published = DateTime.Parse(Util.ChildValue(element, "published")); Updated = DateTime.Parse(Util.ChildValue(element, "updated")); User = new User(Util.ChildElement(element, "user")); Service = new Service(Util.ChildElement(element, "service")); Comments = new CommentList(); foreach (XmlElement child in element.GetElementsByTagName("comment")) { Comments.Add(new Comment(child)); } Likes = new LikeList(); foreach (XmlElement child in element.GetElementsByTagName("like")) { Likes.Add(new Like(child)); } Media = new MediaList(); foreach (XmlElement child in element.GetElementsByTagName("media")) { Media.Add(new Media(child)); } }
/// <summary> /// Creates a new CSS @media rule. /// </summary> internal CSSMediaRule() { _media = new MediaList(); _type = CssRule.Media; }
/** * Create a media list event. * * @param mediaList media list the event relates to * @param mediaInstance native media instance that was added * @param index index at which the item was added */ protected internal MediaListItemAddedEvent(MediaList mediaList, IntPtr mediaInstance, int index) : base(mediaList) { this.mediaInstance = mediaInstance; this.index = index; }
/** * Create a new factory. * * @param mediaList media list to create events for */ public MediaListEventFactory(MediaList mediaList) { this.mediaList = mediaList; }
/// <summary> /// Creates a new style sheet. /// </summary> /// <param name="media">The media list to use.</param> internal StyleSheet(MediaList media) { _media = media; }
/** * Create a media list event. * * @param mediaList media list that the event relates to */ protected AbstractMediaListEvent(MediaList mediaList) { this.mediaList = mediaList; }
private async void Scenario1_Loaded(object sender, RoutedEventArgs e) { Debug.WriteLine("Scenario1_Loaded"); // Update controls according to settings UpdateControlVisibility(); SettingsService.Instance.UseCustomControlsChanged += SettingsService_UseCustomControlsChanged; // Bind player to element mediaPlayerElement.SetMediaPlayer(Player); // Load the playlist data model if needed if (MediaList == null) { // Create the playlist data model MediaList = new MediaList(); await MediaList.LoadFromApplicationUriAsync("ms-appx:///Assets/playlist.json"); } // Create a new playback list matching the data model if one does not exist if (PlaybackList == null) PlaybackList = MediaList.ToPlaybackList(); // Subscribe to playback list item failure events PlaybackList.ItemFailed += PlaybackList_ItemFailed; // Create the view model list from the data model and playback model // and assign it to the player PlayerViewModel.MediaList = new MediaListViewModel(MediaList, PlaybackList, Dispatcher); }
private void LoadMediaList() { this._imageList.Clear(); this._musicList.Clear(); switch (((Category)this.SelectedFilter.Filter).Type) { case "audio": this._musicLibrary = new MediaList<Audio>(Properties.Settings.Default.MusicPath, this.SelectedFilter.Filter); this.setMusicCollectionView(); onProprietyChanged("MusicList"); break; case "picture": this._imageLibrary = new MediaList<Image>(Properties.Settings.Default.ImagePath, this.SelectedFilter.Filter); this.setImageCollectionView(); onProprietyChanged("ImageList"); break; } }
/// <summary> /// Creates a new CSS import rule /// </summary> internal CSSImportRule() { _media = new MediaList(); _type = CssRule.Import; }
/// <summary> /// Used to find matching style rules in the cascading order /// </summary> /// <param name="elt">The element to find styles for</param> /// <param name="pseudoElt">The pseudo-element to find styles for</param> /// <param name="ml">The medialist that the document is using</param> /// <param name="csd">A CssStyleDeclaration that holds the collected styles</param> protected internal virtual void GetStylesForElement(XmlElement elt, string pseudoElt, MediaList ml, CssCollectedStyleDeclaration csd) { }
private void LoadFolder() { var dialog = new System.Windows.Forms.FolderBrowserDialog(); dialog.ShowDialog(); switch (((Category)this.SelectedFilter.Filter).Type) { case "audio": MediaList<Audio> tempAudioList = new MediaList<Audio>(Properties.Settings.Default.MusicPath, this.SelectedFilter.Filter); this.ImageVisibility = "Hidden"; this.MusicVisibility = "Visible"; if (dialog.SelectedPath != "") tempAudioList.loadFolder(dialog.SelectedPath); break; case "picture": MediaList<Image> tempImageList = new MediaList<Image>(Properties.Settings.Default.ImagePath, this.SelectedFilter.Filter); this.ImageVisibility = "Visible"; this.MusicVisibility = "Hidden"; if (dialog.SelectedPath != "") tempImageList.loadFolder(dialog.SelectedPath); break; } }
/// <summary> /// Creates a new CSS import rule /// </summary> internal CSSImportRule() { _media = MediaList.Empty; _type = CssRuleType.Import; }
/// <summary> /// Used to find matching style rules in the cascading order /// </summary> /// <param name="elt">The element to find styles for</param> /// <param name="pseudoElt">The pseudo-element to find styles for</param> /// <param name="ml">The medialist that the document is using</param> /// <param name="csd">A CssStyleDeclaration that holds the collected styles</param> protected internal override void GetStylesForElement(XmlElement elt, string pseudoElt, MediaList ml, CssCollectedStyleDeclaration csd) { XPathNavigator nav = elt.CreateNavigator(); foreach (XPathSelector sel in XPathSelectors) { // TODO: deal with pseudoElt if (sel != null && sel.Matches(nav)) { ((CssStyleDeclaration)Style).GetStylesForElement(csd, sel.Specificity); break; } } }
public void ReadSpecific(MediaList list, string folder) { list = ExploreDirectory(folder); imageList.RootDirectory = folder; SerializeList(list, folder + "\\" + MyWindowsMediaPlayerV2.IndexerFileName); }
public CssMediaRule(string cssText, object parent, bool readOnly, string[] replacedStrings, CssStyleSheetType origin) : base(parent, readOnly, replacedStrings, origin) { media = new MediaList(cssText); }
private void EditButton_Click(object sender, RoutedEventArgs e) { MediaList.EditSelection(); }
/// <summary> /// Used to find matching style rules in the cascading order /// </summary> /// <param name="elt">The element to find styles for</param> /// <param name="pseudoElt">The pseudo-element to find styles for</param> /// <param name="ml">The medialist that the document is using</param> /// <param name="csd">A CssStyleDeclaration that holds the collected styles</param> protected internal override void GetStylesForElement(XmlElement elt, string pseudoElt, MediaList ml, CssCollectedStyleDeclaration csd) { if (media.Matches(ml)) { ((CssRuleList)CssRules).GetStylesForElement(elt, pseudoElt, ml, csd); } }
/** * Create a new factory. * * @param mediaList media list to create events for */ public MediaListEventFactory(MediaList mediaList) { this.mediaList = mediaList; }
internal void Initialize(string FilePath, bool ReplaceExisting, DisplayOrder DisplayOrder) { this.displayOrder = DisplayOrder; this.filePath = FilePath; if (!File.Exists(FilePath)) { ReplaceExisting = true; } if (extentSource != null) { return; } if (ReplaceExisting) { lock (sourcelock) { extentSource = Standard.GetSource(); } } else { lock (sourcelock) { extentSource = File.ReadAllText(FilePath); } } runInfo = new RunInfo(); runInfo.StartedTime = DateTime.Now; categoryList = new AttributeList(); mediaList = new MediaList(); }
public MediaListTests (ITestOutputHelper output) : base(output) { _sut = new MediaList( new MediaLottery()); }
/** * Create a media list event. * * @param mediaList media list the event relates to * @param mediaInstance native media instance that will be added * @param index index at which the item will be added */ protected internal MediaListWillAddItemEvent(MediaList mediaList, IntPtr mediaInstance, int index) : base(mediaList) { this.mediaInstance = mediaInstance; this.index = index; }
/// <summary> /// Creates a new style sheet. /// </summary> internal StyleSheet() { _media = new MediaList(); }
public void SetMediaList(MediaList.MediaList mediaList) { Logger.Debug("SetMediaList(mediaList={})", mediaList); // LibVlc.libvlc_media_list_player_set_media_list(mediaListPlayerInstance, mediaList.MediaListInstance()); this.mediaList = mediaList; }
public Playlist(IEnumerable <string> files) { MediaList.AddRange(files.Select(s => new FileInfo(s))); Player = new Player(); }