Beispiel #1
0
        /// <summary>
        /// PErmet d'inserez des livres dans la liseuse
        /// </summary>
        /// <param name="livres"></param>
        /// <returns>Renvoie les livres qui ne sont pas entré dans la liseuse</returns>
        public string[] ExportLivre(Livres[] livres)
        {
            FRM_LoadingLiseuse ll = new FRM_LoadingLiseuse(livres.Length);

            ll.Phrase = "Envoie des livres vers la liseuse";
            List <string> tmp = new List <string>();

            try
            {
                ll.Show();
                foreach (Livres livre in livres)
                {
                    _isbusy = true;
                    try
                    {
                        File.Copy(livre.full_chemin_livre, Lecteur.ToString() + @":\" + livre.FileName);
                        MessageBox.Show("fait");
                    }
                    catch (Exception e)
                    {
                        tmp.Add(livre.titre);
                        ExceptionHandler.ExeptionCatch(e);
                    }
                    ll.pas();
                }
                ll.Close();
                _isbusy = false;
            }
            catch (Exception e)
            {
                _isbusy = false;
                ExceptionHandler.ExeptionCatch(e);
            }
            return(tmp.ToArray());
        }
Beispiel #2
0
            public void Analyser()
            {
                var Lecteur = new Lecteur();

                Lecteur.CheminFichier = _CheminFichier;
                Lecteur.Separateur    = '$';
                Lecteur.Fonctions     = _Fonctions;
                Lecteur.Analyser();
                Lecteur = null;
            }
        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();
            }
        }
Beispiel #4
0
 /// <summary>
 /// Retourne le chemin vers la DB de la liseuse
 /// </summary>
 /// <returns></returns>
 private string PATHTODB()
 {
     return(Lecteur.ToString() + pathtodb);
 }
 private void _interrompre(object sender, RoutedEventArgs e)
 {
     Lecteur.Stop();
 }
 private void _lire(object sender, RoutedEventArgs e)
 {
     Lecteur.Play();
 }
 private void _arreter(object sender, RoutedEventArgs e)
 {
     Lecteur.Pause();
 }