Example #1
0
 public void SetImage(ClassImage obj)
 {
     MapClass map = new MapClass();
     MemoryStream stream = new MemoryStream();
     map.PicUrl = obj.PicUrl;
     obj.PicImage.Save(stream, ImageFormat.Png);
     map.Stream = stream.ToArray();
     stream.Close();
     Delete(obj.PicUrl);
     db.Get(map);
     db.Commit();
 }
Example #2
0
 internal void Delete(string p)
 {
     MapClass map = new MapClass();
     map.PicUrl = p;
     IObjectSet result = db.Get(map);
     foreach (MapClass obj in result) {
         db.Delete(obj);
     }
 }
Example #3
0
 private void downloadcomplete(MapClass obj)
 {
     if (gispainter != null)
     {
         ClassImage img = FindImage(obj.PicUrl);
         if (img != null)
         {
             if (obj.Stream != null)
             {
                 img.PicImage = Bitmap.FromStream(new MemoryStream(obj.Stream)); //DataHelper.GetImage(obj.PicUrl).PicImage;
             }
             if (Invalidate != null)
             {
                 Invalidate(new Rectangle(img.Left, img.Top, 200, 200), true);
             }
         }
     }
 }