交互优化, 断网更新弹框删除,图标显示优化,待办任务bug修复
This commit is contained in:
@@ -268,21 +268,13 @@ namespace GeekDesk.Util
|
||||
|
||||
public static BitmapImage Bitmap2BitmapImage(Bitmap bitmap)
|
||||
{
|
||||
IntPtr hBitmap = bitmap.GetHbitmap();
|
||||
BitmapImage retval;
|
||||
try
|
||||
{
|
||||
retval = (BitmapImage)Imaging.CreateBitmapSourceFromHBitmap(
|
||||
hBitmap,
|
||||
IntPtr.Zero,
|
||||
Int32Rect.Empty,
|
||||
BitmapSizeOptions.FromEmptyOptions());
|
||||
}
|
||||
finally
|
||||
{
|
||||
DeleteObject(hBitmap);
|
||||
}
|
||||
return retval;
|
||||
MemoryStream ms = new MemoryStream();
|
||||
bitmap.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
|
||||
BitmapImage bit3 = new BitmapImage();
|
||||
bit3.BeginInit();
|
||||
bit3.StreamSource = ms;
|
||||
bit3.EndInit();
|
||||
return bit3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user