c#Windwosmedia控件使用探索(3)
来源:互联网 发布:厦门大学软件学院分数 编辑:程序博客网 时间:2024/04/29 12:15
播放列表类:
- using System;
- using System.Collections.Generic;
- using System.Collections;
- using System.Text;
- using System.IO;
- using System.Runtime.Serialization;
- using System.Runtime.Serialization.Formatters.Binary;
- namespace 谢飞的专属播放器
- {
- /// <summary>
- /// 播放列表
- /// </summary>
- [Serializable]
- public class MyDocument
- {
- public Hashtable mylist = new Hashtable();
- /// <summary>
- /// 得到所有列表的标题
- /// </summary>
- /// <returns></returns>
- public List<string> getListTitle()
- {
- if (mylist == null)
- {
- return null;
- }
- List<string> title = new List<string>();
- foreach (DictionaryEntry de in mylist)
- {
- title.Add((string)de.Key);
- }
- return title;
- }
- /// <summary>
- /// 得到制定标题下的详细内容
- /// </summary>
- /// <param name="title"></param>
- /// <returns></returns>
- public List<string> getDetailsByTitle(string title)
- {
- if (mylist == null)
- {
- return null;
- }
- if (mylist.ContainsKey(title))
- {
- foreach (DictionaryEntry de in mylist)
- {
- if (((string)de.Key).Equals(title))
- {
- return (List<string>)de.Value;
- }
- }
- }
- return null;
- }
- /// <summary>
- /// 删除播放列表
- /// </summary>
- /// <param name="title"></param>
- /// <returns></returns>
- public bool deleteTitle(string title)
- {
- try
- {
- mylist.Remove(title);
- return true;
- }
- catch (Exception ex)
- {
- return false;
- }
- }
- /// <summary>
- /// 删除制定列表的指定内容
- /// </summary>
- /// <param name="title"></param>
- /// <param name="value"></param>
- /// <returns></returns>
- public bool deleteDetails(string title, string value)
- {
- foreach (DictionaryEntry de in mylist)
- {
- if (((string)de.Key).Equals(title))
- {
- List<string> list = (List<string>)de.Value;
- list.Remove(value);
- mylist.Remove(title);
- mylist.Add(title, list);
- return true;
- }
- }
- return false;
- }
- }
- /// <summary>
- /// 播放列表
- /// </summary>
- public class playlist
- {
- private string name;
- private List<string> details;
- public string getName()
- {
- return this.name;
- }
- public List<string> getDetails()
- {
- return this.details;
- }
- public void setName(string name)
- {
- this.name = name;
- }
- public void setDetails(List<string> details)
- {
- this.details = details;
- }
- }
- }
- c#Windwosmedia控件使用探索(3)
- c#Windwosmedia控件使用探索
- c#Windwosmedia控件使用探索(1)
- c#Windwosmedia控件使用探索(2)
- c#Windwosmedia控件使用探索(4)
- c/c++头文件使用探索
- 【探索】在 JavaScript 中使用 C 程序
- C#FileUpLoad控件使用
- C#Timer控件使用
- C#WinForm控件使用
- Glide使用探索(四)——自定义显示控件
- 探索FireMonkey的StyleBook皮肤控件的使用
- C#winform saveFileDialog控件使用
- C#Chart控件使用总结
- C#Timer控件的使用
- 深入探索C++(const限定符的使用)
- ASP.NET 2.0(C#)中使用webpart系列控件(3)
- 探索DeepEarth的内置控件
- 《宋延清:编辑杂谈》- 怎样加工计算机编程图书?
- c#Windwosmedia控件使用探索(1)
- fvwm学习笔记之启动和退出函数 by stack
- tomcat中三种部署项目的方法
- c#Windwosmedia控件使用探索(2)
- c#Windwosmedia控件使用探索(3)
- HDU1050 Moving Tables
- 首篇
- c#Windwosmedia控件使用探索(4)
- 刚开通的博客
- 简单的css
- 自己动手写键盘测试软件
- Chap1 Milking Cows
- js - 图标在网页上漂浮移动效果