点击或拖拽改变大小

MqttSyncClientDownloadBitmapAsync 方法

从远程服务器下载一个文件,生成一个Bitmap图片对象,需要指定文件类别,文件名,进度报告,可用于用户头像的存储
Download a file from a remote server and generate a Bitmap image object. You need to specify the file category, file name, and progress report, which can be used to store the user's avatar

命名空间:  HslCommunication.MQTT
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:10.6.1.0 (10.6.1.0)
语法
public Task<OperateResult<Bitmap>> DownloadBitmapAsync(
	string groups,
	string fileName,
	Action<long, long> processReport
)

参数

groups
类型:SystemString
文件的类别,例如 Files/Personal/Admin 按照斜杠来区分
fileName
类型:SystemString
文件名称,例如 123.txt
processReport
类型:SystemActionInt64, Int64
进度报告,第一个参数是已完成字节数,第二个参数是总字节数

返回值

类型:TaskOperateResultBitmap
如果下载成功,则携带图片资源对象
参见