public music(string[] str) { if (str.Length == 1) { InitializeComponent(); musicList.Items.Add(Path.GetFileName(str[0])); musicPath.Add(str[0]); SoundPlayer sp = new SoundPlayer(); sp.SoundLocation = musicPath[0]; if (!isStart) { isStart = true; Start.Text = "暂停"; sp.Play(); } else { isStart = false; Start.Text = "播放"; sp.Stop(); } } else { MediaPlay mp = new MediaPlay(str[0]); mp.Show(); } }
public void GotoMedia(object sender, EventArgs e) { MediaPlay mp = new MediaPlay(); mp.MdiParent = this.MdiParent; mp.Show(); this.Hide(); }