private void rtb_LinkClicked(object sender, LinkClickedEventArgs e) { var s = e.LinkText.Substring(8); var v = s.Replace("@", " "); WinMediaPlayer.Play(rtb.Handle, v); }
private void PlayMediaFile(object sender, EventArgs e) { try { if (!((ToolStripMenuItem)sender).Text.Equals("Play Media File")) { return; } if (shp1.Text.Equals("Empty")) { return; } var ext = shp1.Text.Substring(shp1.Text.Length - 3); WinMediaPlayer.Play(rtb.Handle, _currentpath + "\\" + _nickname + "_for_testing." + ext); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }