标签:bsp string public rtm name blog play private start
Label1.Text = Play(url, 600, 400); public string Play(string url, int width, int height) { string strTmp = url.ToLower(); if (strTmp.EndsWith(".wmv") || strTmp.EndsWith(".mp4") || strTmp.EndsWith(".wma") || strTmp.EndsWith(".pdf") || strTmp.EndsWith(".mov") || strTmp.EndsWith(".jpg")) { return wmv(url, width, height); } else { return "无法识别的文件格式"; } } private string wmv(string url, int width, int height) { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append(" "); sb.Append("showcontrols=1 autostart=1 autorewind=0 "); sb.Append("page=3 "); sb.Append("playcount=0 moviewindowheight=240 moviewindowwidth=320 "); sb.Append("filename="); sb.Append(url); sb.Append(" src="); sb.Append(url); sb.Append(" "); return sb.ToString(); }
标签:bsp string public rtm name blog play private start
原文地址:http://www.cnblogs.com/blossomwei/p/6922985.html