Exemple #1
0
 public AlphaImage(string resourceName, System.Reflection.Assembly assembly)
 {
     try
     {
         var iconStream = new OpenNETCF.Drawing.Imaging.StreamOnFile(assembly.GetManifestResourceStream(resourceName));
         var factory = new OpenNETCF.Drawing.Imaging.ImagingFactoryClass();
         factory.CreateImageFromStream(iconStream, out _img);
     }
     catch (Exception e)
     {
         //!! write to log  (e.StackTrace, "SetBtnImg")
     }
 }
Exemple #2
0
 public AlphaImage(System.IO.Stream stream)
 {
     try
     {
         var iconStream = new OpenNETCF.Drawing.Imaging.StreamOnFile(stream);
         var factory = new OpenNETCF.Drawing.Imaging.ImagingFactoryClass();
         factory.CreateImageFromStream(iconStream, out _img);
     }
     catch (Exception e)
     {
         //!! write to log  (e.StackTrace, "SetBtnImg")
     }
 }