问题描述
- 一个低级播放器的制作代码。。新新新新新手求各位指教。感激不尽。
-
如题。。。希望大家能够帮我度过漫长煎熬的起步时期。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args);private void ButPlay_Click(object sender,EventArgs e) { this.axWindowsMediaPlayer1.URL=this.optFileName; } private void ButStop_Click(object sender,EventArgs e) { this.axWindousMediaPlayer1.Ctlcontrol.stop(); } private void ButPause_Click(object sender,EventArgs e) { if(this.ButPause_Click.Text="暂停(&A)") { this.axWindowsMediaPlayer1.Culcontrols.pause(); this.ButPause_Click.Text="继续(&A)"; } else { this.axWindowsMediaPlayer1.Ctlcontrols.play(); this.ButPause_Click.Text="暂停(&A)"; } } private WMPLib.WindowsMediaPlayerClass c; private WMPLib.IWMPMedia m; private void ButInfo_Click(object sender,EventArgs e) { if(this.optFile.FileName!="optFile") { c=new WMPLib.WindowsMediaPlayerClass(); m=c.newMedia(this.optfile.FileName); MessageBox.Show("歌手名:"+m.getItemInfo("Author")+"rn"+"歌名:"+m.getItemInfo("Title")); } } } }
时间: 2024-10-26 05:22:21