Ejemplo n.º 1
0
        /// <summary>
        /// Process upload response
        /// </summary>
        /// <param name="progress"></param>
        /// <param name="response"></param>
        private static void ProcessUploadResponse(Progress progress, Response response)
        {
            if (response != null)
            {
                //info
                BackupInfo info = new BackupInfo();
                info.Date = DateTime.Now;
                info.Id = response.Id;
                info.Url = response.Url;

                //save
                if (progress.Data.GetType() == typeof(Video))
                {
                    (progress.Data as Video).VideoBackup = info;
                    (progress.Data as Video).CallPropertyChangedOnAll();
                }
                if (progress.Data.GetType() == typeof(Picture))
                {
                    (progress.Data as Picture).Backup = info;
                    (progress.Data as Picture).CallPropertyChangedOnAll();
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// createBackupInfo
        /// </summary>
        /// <param name="response"></param>
        private BackupInfo createBackupInfo(Response response)
        {
            //create new
            BackupInfo info = new BackupInfo();
            info.Url = response.Url;
            info.Date = DateTime.Now;
            info.Id = response.Id;

            return info;
        }