using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Media; namespace streamReader { public partial class Form1 : Form { public Form1() { InitializeComponent(); //Creating a new stream-reader and opening the file. System.IO.StreamReader StreamReader1 = new System.IO.StreamReader(@"..//..//déclenche priorité//priorité.txt"); //Reading Line from file string newLine; while ((newLine = StreamReader1.ReadLine()) != null) //Writing the read line to textBox textBox1.AppendText(newLine); //Close the file StreamReader1.Close(); } private void textBox1_TextChanged(object sender, EventArgs e) { if (textBox1.Text == "1") { SoundPlayer player = new SoundPlayer(); string chemin = "..//..//Sequences//alarme.wav"; player.SoundLocation = chemin; player.Play(); } } } }
timer1.Start();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)