如何通过DJI-windows SDK删除无人机SD卡上的所有媒体文件

时间:2019-04-18 08:18:36

标签: c# windows dji-sdk

我正在将下载按钮修改为:

  1. 下载所有媒体文件
  2. 下载完成后删除所有内容

尝试使用MediaDeletionRequest,仍然没有运气。

private void Download_Click(object sender, RoutedEventArgs e)
        {
            if (files.Count == 0)
            {
                taskModel.Sync = "Should reload before download";
                return;
            }
            if (taskModel.CompleteCount != 0)
            {
                taskModel.Sync = "Downloading is transfer, Cancel First";
                return;
            }

            DownloadAllFiles();

            //1st attempt to delete the files
            var clearSD = new MediaDeletionRequest
            {
                location = MediaFileListLocation.SD_CARD,
                isDeleteAll = true,
            };

            //2nd attempt to delete the files
            new MediaDeletionRequest
            {
                location = MediaFileListLocation.SD_CARD,
                isDeleteAll = true,
            };
        }

下载完文件后,单击“重新加载”按钮,预计会显示0张图片。

0 个答案:

没有答案