private void DoShowProperties() { lvi = new List <object>(); foreach (string item in strItems) { VideoFileInfo vi = VideoFileInfo.FromPath(item) as VideoFileInfo; if (vi.IsValid) { lvi.Add(vi); } } FileAttributesBrowser.ProcessObjectAttributes(lvi); pgProperties.SelectedObjects = lvi.ToArray(); btnSearchSubtitles.Enabled = false; if (lvi.Count == 1) { VideoFileInfo vfi = lvi[0] as VideoFileInfo; if (vfi != null) { btnSearchSubtitles.Enabled = SubtitleDownloadProcessor.CanPerformSubtitleDownload(vfi.Path, (int)vfi.Duration.GetValueOrDefault().TotalSeconds); } } }
public void ShowPlaylistItem(PlaylistItem plItem, bool callByProperty) { try { this.CanSaveData = false; if (plItem == null && callByProperty) { List <PlaylistItem> plItems = playlistScreen.GetPlaylistItems(); if (plItems != null && plItems.Count > 0) { plItem = plItems[0]; } } pgProperties.Tag = null; pgProperties.SelectedObject = null; pgProperties.Visible = false; lblNoInfo.Visible = true; lblItem.Text = string.Empty; if (plItem != null) { plItem.Rebuild(); lblItem.Text = plItem.MediaFileInfo.Path; if (plItem.SupportsTrackInfo) { pgProperties.Tag = plItem; MediaFileInfoSlim slim = plItem.MediaFileInfo.Slim(); FileAttributesBrowser.ProcessSingleObjectAttributes(slim); pgProperties.SelectedObject = slim; pgProperties.Visible = true; lblNoInfo.Visible = false; } } if (callByProperty) { playlistScreen.SetFirstSelectedPlaylistItem(plItem); } } finally { this.CanSaveData = true; } }
private void DoShowProperties() { lbfi = new List <object>(); foreach (string item in strItems) { BookmarkFileInfo bfi = new BookmarkFileInfo(item, false); if (bfi.IsValid) { lbfi.Add(bfi); } } FileAttributesBrowser.ProcessObjectAttributes(lbfi); pgProperties.SelectedObjects = lbfi.ToArray(); base.Modified = false; }
public override void ShowProperties(List <string> strItems, object additionalData) { List <object> lcat = new List <object>(); foreach (string item in strItems) { ReadOnlyCatalog cat = new ReadOnlyCatalog(item); if (cat.IsValid) { lcat.Add(cat); } } FileAttributesBrowser.ProcessObjectAttributes(lcat); pgProperties.SelectedObjects = lcat.ToArray(); }
public override void ShowProperties(List <string> strItems, object additionalData) { List <object> lofi = new List <object>(); foreach (string item in strItems) { NativeFileInfo ofi = new NativeFileInfo(item, false); if (ofi.IsValid) { lofi.Add(ofi); } } FileAttributesBrowser.ProcessObjectAttributes(lofi); pgProperties.SelectedObjects = lofi.ToArray(); }
private void InternalShowProperties(bool deepLoad) { PerformTranslation(); lii = new List <object>(); foreach (string item in strItems) { CDAFileInfo ii = new CDAFileInfo(item, deepLoad && (strItems.Count == 1)); if (ii.IsValid) { lii.Add(ii); } } FileAttributesBrowser.ProcessObjectAttributes(lii); pgProperties.SelectedObjects = lii.ToArray(); base.Modified = false; }
public override void ShowProperties(List <string> strItems, object additionalData) { this.cat = additionalData as Catalog; this.strItems = strItems; pgProperties.SelectedObjects = null; if (cat != null) { lci = new List <object>(); // The objects in strItems are vpaths. foreach (string vpath in strItems) { if (vpath == Catalog.CatalogVPath) { cat.CatalogSchemaVersion = Translator.TranslateTaggedString(cat.CatalogSchemaVersion); pgProperties.SelectedObjects = new object[] { cat }; break; } else { CatalogItem ci = cat.GetByVPath(vpath); if (ci != null) { ci.Description = Translator.TranslateTaggedString(ci.Description).Replace("::", ":"); ci.ItemTypeDesc = Translator.TranslateTaggedString(ci.ItemTypeDesc); ci.Save(); lci.Add(ci); } } } } if (lci != null && lci.Count > 0) { FileAttributesBrowser.ProcessObjectAttributes(lci); pgProperties.SelectedObjects = lci.ToArray(); } }
private void InternalShowProperties(bool deepLoad) { PerformTranslation(); lii = new List <object>(); foreach (string item in strItems) { ITaggedMediaFileInfo tmfi = TaggedMediaFileInfoFactory.GetTaggedMediaFileInfo(item, deepLoad && (strItems.Count == 1)); if (tmfi != null && tmfi.IsValid) { lii.Add(tmfi); } } FileAttributesBrowser.ProcessObjectAttributes(lii); pgProperties.SelectedObjects = lii.ToArray(); base.Modified = false; CheckButtonsState(); }