Beispiel #1
0
 private void UploadCoursewareService_OnUpload(UploadTaskInfo task)
 {
     if (_currentUploadTask != null)
     {
         _currentUploadTask.OnStorageChange        -= _currentUploadTask_OnStorageChange;
         _currentUploadTask.OnUploadProgressChange -= _currentUploadTask_OnUploadProgressChange;
     }
     _currentUploadTask                         = task;
     _currentUploadItem                         = UploadFiles.FirstOrDefault(item => item.Index == task.RecordInfo.Index && item.ScheduleId == task.RecordInfo.ScheduleId);
     _currentUploadItem.BtnIsEnable             = false;
     _currentUploadTask.OnStorageChange        += _currentUploadTask_OnStorageChange;
     _currentUploadTask.OnUploadProgressChange += _currentUploadTask_OnUploadProgressChange;
 }
Beispiel #2
0
        private void Handler(RecordInfo context)
        {
            var uploadTaskView = new UploadCoursewareItemViewModel()
            {
                Index       = context.Index,
                ScheduleId  = context.ScheduleId,
                PercentDone = "待上传",
                Title       = context.Title,
                BtnIsEnable = true,
            };

            uploadTaskView.IsUpload = _config.IsAutoUpload;

            UploadFiles.Add(uploadTaskView);
        }