void ViewPicAction(object parameter) { var area = (PartyActAreaModel)parameter; if (area == null || area.pic == null || area.pic.Count < 1) { return; } var picContent = area.pic[0]; if (!string.IsNullOrEmpty(picContent)) { System.Drawing.Image img = ImageUtils.Base64Decode(picContent); string file = AppDomain.CurrentDomain.BaseDirectory + "temp.jpg"; img.Save(file, ImageFormat.Jpeg); img.Dispose(); img = null; Process.Start(file); } }
public DetailActivityPlaceWindow(InfoOptType type, PartyActAreaModel area = null) : this() { _type = type; if (area != null) { area.CopyTo(_model); //设置图片 if (area.pic != null && area.pic.Count > 0) { System.Drawing.Image img = ImageUtils.Base64Decode(area.pic[0]); string file = AppDomain.CurrentDomain.BaseDirectory + "temp.jpg"; img.Save(file, ImageFormat.Jpeg); img.Dispose(); img = null; ctlImage.ImgFile = file; } } }