Ejemplo n.º 1
0
 private void Valid_Click(object sender, EventArgs e)
 {
     GetPlace();
     currentScene.Titre       = SceneTitle.Text;
     currentScene.Commentaire = comment.Text;
     SceneInfoChanged?.Invoke(this, new SceneSelectedArgs {
         scene = currentScene
     });
     GetData();
     md.SaveChanges();
 }
Ejemplo n.º 2
0
 private void Analyse(Videos video, string videoName)
 {
     string[] files = Directory.GetFiles(videoName + @"\PRIVATE\AVCHDL\BDMV\STREAM", "*.m2ts");
     foreach (string f in files)
     {
         Shots  s     = ShotFromFile(f, video);
         string thumb = f.Replace(@"H:\Vidéos\HDWRITER", @"D:\VideoThumbs\").Replace(@"\PRIVATE\AVCHDL\BDMV\STREAM", "")
                        .Replace("m2ts", "jpg");
         Image im = Image.FromFile(thumb);
         s.FichierImage = thumb;
         using (var ms = new MemoryStream())
         {
             im.Save(ms, im.RawFormat);
             s.Image = ms.GetBuffer();
         }
         im.Dispose();
         md.Shots.Add(s);
     }
     md.SaveChanges();
 }