private void SaveTags() { if (string.IsNullOrEmpty(_fileName)) { return; } if (!_changed) { return; } wmpPlayer.URL = ""; try { FileInfo info = new FileInfo(_fileName); if (info.Exists) { Kenos.TagsLib.KenosFile file = Kenos.TagsLib.KenosFile.Load(_fileName); file.Tags = _tags; file.Save(); Changed(false); } } catch (Exception ex) { Log(ex.Message); } }
private void LoadTags() { LogInformation("Leyendo tags"); Kenos.TagsLib.KenosFile file = Kenos.TagsLib.KenosFile.Load(_fileName); lblDescripcion.Text = "Reproducción de audiencia"; if (!string.IsNullOrEmpty(file.Description)) { lblDescripcion.Text = file.Description; } _tags = new List <TagsLib.Tag>(); _tags.Add(new TagsLib.Tag() { Description = "Inicio" }); if (file.Tags != null && file.Tags.Count > 0) { foreach (Kenos.TagsLib.Tag tag in file.Tags) { if (tag != null) { if (tag.TimeSpan.TotalSeconds == 0 && _tags.Count == 1) { _tags.Clear(); } _tags.Add(tag); } } } gvMarcas.AutoGenerateColumns = false; BindTags(); }