public void SetAttach(object obj) { if (obj != null && obj is byte[]) { Attach = (byte[])obj; } else if (MiMFa_GetDetail.IsBitmap(obj)) { Attach = General.MiMFa_Convert.ToByteArray((Bitmap)obj); } else { Attach = obj; } }
public void SetData(object obj) { if (obj != null && obj is byte[]) { Data = (byte[])obj; } else if (GetDataType() == MiMFa_SocketPacketDataType.Image && MiMFa_GetDetail.IsBitmap(obj)) { Data = General.MiMFa_Convert.ToByteArray((Bitmap)obj); } else { Data = obj; } }