//获取实例 public static WMPlayerForm GetInstance() { if (_uniquePlayer == null) { _uniquePlayer = new WMPlayerForm(); } return(_uniquePlayer); }
private void WMPlayerTest_FormClosing(object sender, FormClosingEventArgs e) { wmPlayerForm = null; }
private void btnPlay_Click(object sender, EventArgs e) { wmPlayerForm = WMPlayerForm.GetInstance(); wmPlayerForm.Show(); wmPlayerForm.Play(@"Resources\Sound\AD\ad_1.m4a"); }
private void WMPlayerForm_FormClosing(object sender, FormClosingEventArgs e) { _uniquePlayer = null; }