Exemplo n.º 1
0
        private void _ouvrir(object sender, RoutedEventArgs e)
        {
            // Create an instance of the open file dialog box.
            OpenFileDialog openFileDialog1 = new OpenFileDialog();

            // Set filter options and filter index.
            openFileDialog1.Filter      = "video (*.mp4; *.avi)|*.mp4; *.avi";
            openFileDialog1.FilterIndex = 1;

            openFileDialog1.Multiselect = true;

            // Call the ShowDialog method to show the dialog box.
            bool?userClickedOK = openFileDialog1.ShowDialog();

            // Process input if the user clicked OK.
            if (userClickedOK == true)
            {
                // Open the selected file to read.
                System.IO.Stream fileStream = openFileDialog1.OpenFile();


                using (System.IO.StreamReader reader = new System.IO.StreamReader(fileStream))
                {
                    // Read the first line from the file and write it the textbox.
                    // tbResults.Text = reader.ReadLine();
                    Lecteur.Source = new Uri(openFileDialog1.FileName);

                    extraire_equipe(openFileDialog1.FileName);

                    Lecteur.Play();
                }
                url = openFileDialog1.FileName;

                fileStream.Close();
            }
        }
Exemplo n.º 2
0
 private void _lire(object sender, RoutedEventArgs e)
 {
     Lecteur.Play();
 }