Ejemplo n.º 1
0
        private void UploadVideoFile(object data)
        {
            Viddler.ViddlerService viddlerService = (Viddler.ViddlerService)((object[])data)[0];
            string fileName = (string)((object[])data)[1];

            this.actionPanel.SetUploadProgress(0, true);

            Viddler.Data.Video newVideo = viddlerService.Videos.Upload("Just uploaded", "test,sample", "Test file", false, fileName);

            this.actionPanel.SetUploadProgress(100, false);

            if (newVideo != null)
            {
                MessageBox.Show("The new video has been uploaded successfully.\r\nThe video will appear on the list, after it is encoded by the server.\r\n\r\nWait few minutes and then press \"Refresh\" button\r\nto update the video list.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("The upload process has been aborted.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 2
0
 internal VideoListItem(Viddler.Data.Video video)
 {
     this.Title       = video.Title;
     this.Url         = new Uri(video.Url);
     this.UploadTime  = (video.UploadTime.HasValue) ? video.UploadTime.Value.DateTime : DateTime.MinValue;
     this.Author      = video.Author;
     this.Description = video.Description;
     this.Id          = video.Id;
     this.Status      = video.Status.ToString();
     if (video.Permission != null)
     {
         if (video.Permission.View != null)
         {
             this.SecurityView = video.Permission.View.Level.ToString();
         }
         if (video.Permission.Download != null)
         {
             this.SecurityDownload = video.Permission.Download.Level.ToString();
         }
         if (video.Permission.Commenting != null)
         {
             this.SecurityCommenting = video.Permission.Commenting.Level.ToString();
         }
         if (video.Permission.Embed != null)
         {
             this.SecurityEmbed = video.Permission.Embed.Level.ToString();
         }
         if (video.Permission.Tagging != null)
         {
             this.SecurityTagging = video.Permission.Tagging.Level.ToString();
         }
         if (video.Permission.SecretUrl != null)
         {
             this.SecretUrl = new Uri(video.Permission.SecretUrl);
         }
     }
 }