public void wiad(NewTextMessage ntmess, NewMessage mess, System.Media.SoundPlayer player, 
     TextBox tbWiad, ListBox lbWiadomosci, TextBox tbDo)
 {
     ntmess.write(con, tbWiad, values["text1"] + " do " + values["text3"] + ": " + values["text2"]);
     ntmess.write(con, tbWiad, "--------------------------------------------------------------------------");
     mess.show(con, lbWiadomosci, values["text1"].ToString(), values["text2"].ToString(), 2);
     FillTo uzupelnij = new FillTo();
     uzupelnij.fill(con, tbDo, values["text1"]);
     player.Play();
 }
Example #2
0
        /// <summary>
        /// Play single sounds
        /// </summary>
        /// <param name="soundPlayer">The soundPlayer used to play the sound.</param>
        /// <param name="stream">The sound stream to play.</param>
        private void PlaySound(System.Media.SoundPlayer soundPlayer, System.IO.Stream stream)
        {
            if (stream == null)
                return;

            soundPlayer.Stream = stream;
            soundPlayer.Stream.Position = 0;
            soundPlayer.Play();
        }