Ejemplo n.º 1
0
 public string this[ImageContainer key]
 {
     get
     {
         var keys = from e in ImageContainerList
                    where e.Value == key
                    select e.Key;
         string filename = keys.First();
         keys = null;
         return(filename);
     }
 }
Ejemplo n.º 2
0
 public ImageContainer Add(string filename)
 {
     if (ImageContainerList.ContainsKey(filename))
     {
         return(this[filename]);
     }
     else
     {
         if (HwndTarget != null && WICTarget != null && System.IO.File.Exists(filename))
         {
             ImageContainer imContainer = new ImageContainer(filename, WICTarget, HwndTarget);
             ImageContainerList.Add(filename, imContainer);
             return(imContainer);
         }
         else
         {
             return(null);
         }
     }
 }