示例#1
0
        }        //LISTEN

        #endregion

        private void rtb_LinkClicked(object sender, LinkClickedEventArgs e)
        {
            string s = e.LinkText.Substring(8);
            string v = s.Replace("@", " ");

            WinMediaPlayer.Play(rtb.Handle, v);
        }
示例#2
0
 private void PlayMediaFile(object sender, System.EventArgs e)
 {
     try
     {
         if (((ToolStripMenuItem)sender).Text.Equals("Play Media File"))
         {
             if (!shp1.Text.Equals("Empty"))
             {
                 String ext = shp1.Text.Substring(shp1.Text.Length - 3);
                 WinMediaPlayer.Play(rtb.Handle, _currentpath + "\\" + nickname + "_for_testing." + ext);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
示例#3
0
        //form activated
        private void form_Activated(Object sender, System.EventArgs e)
        {
            if (!form_activated)
            {
                if (!Authenticate())
                {
                    this.Close();
                    Application.Exit();
                    Environment.Exit(0);
                }

                if (!WinMediaPlayer.GetMediaPlayerDirectory().Equals(""))
                {
                    ChatClient.MediaPlayerDirectory = WinMediaPlayer.GetMediaPlayerDirectory();
                }


                pic.Image = new System.Drawing.Bitmap(pic.Width, pic.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            }
            form_activated = true;
            //MessageBox.Show(this,"Directory " +MediaPlayer.GetMediaPlayerDirectory());
            this.TopMost = false;
        }