Example #1
0
 public PostStatusMedia(string status, PostMedia media)
     : base(status)
 {
     this.media      = new PostMedia();
     this.media.Data = new byte[media.Data.Count()];
     media.Data.CopyTo(this.media.Data, 0);
     this.media.FileName = media.FileName;
 }
Example #2
0
 public PostStatusMedia(string status,PostMedia media)
     :base(status)
 {
     this.media = new PostMedia();
     this.media.Data = new byte[media.Data.Count()];
     media.Data.CopyTo(this.media.Data, 0);
     this.media.FileName = media.FileName;
 }
Example #3
0
 public PostStatusMediaWithReply(string status, PostMedia media, string inReplyStatusId)
     : base(status)
 {
     this.media      = new PostMedia();
     this.media.Data = new byte[media.Data.Count()];
     media.Data.CopyTo(this.media.Data, 0);
     this.media.FileName    = media.FileName;
     this.InReplyToStatusId = inReplyStatusId;
 }
 public PostStatusMediaWithReply(string status,PostMedia media,string inReplyStatusId)
     :base(status)
 {
     this.media = new PostMedia();
     this.media.Data = new byte[media.Data.Count()];
     media.Data.CopyTo(this.media.Data, 0);
     this.media.FileName = media.FileName;
     this.InReplyToStatusId = inReplyStatusId;
 }
Example #5
0
 public TwitterUIComponent()
 {
     suggestList = new ObservableCollection<string>();
     mentionSuggestSourceList = new ObservableCollection<string>();
     hashSuggestSourceList = new ObservableCollection<string>();
     
     postText = "";
     isHashTagLock = false;
     isPostWithMedia = false;
     PostMedia=new PostMedia();
     InReplyToStatus = Tweet.ZeroTweet;
 }
Example #6
0
        private async void menuFlyoutItemMediaFromClipboard_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var image = await Clipboard.GetContent().GetBitmapAsync();
                
                var stream = await image.OpenReadAsync();
                var size = stream.Size;
                byte[] bytes = new byte[size];
                var reader = new DataReader(stream.GetInputStreamAt(0));
                await reader.LoadAsync((uint) size);
                reader.ReadBytes(bytes);

               

                var media = new PostMedia();
                media.Data = bytes;
                media.FileName = DateTime.Now.ToString("yyyyMMddhhmmss");

                viewModel.SetPostImageCommand.Execute(media);
            }
            catch (Exception)
            {
                ToastText text=new ToastText("クリップボードの取得に失敗しました",ToastTemplateType.ToastText01);
                text.Show();
            }
        }
Example #7
0
        private async Task SetPostImageAsync(StorageFile file)
        {
            var stream = await file.OpenAsync(FileAccessMode.Read);
            var size = stream.Size;
            byte[] bytes = new byte[size];
            var reader = new DataReader(stream.GetInputStreamAt(0));
            await reader.LoadAsync((uint)size);
            reader.ReadBytes(bytes);
            var media = new PostMedia();
            media.Data = bytes;
            media.FileName = DateTime.Now.ToString("yyyyMMddhhmmss");

            viewModel.SetPostImageCommand.Execute(media);
        }
Example #8
0
 public void SetPostMedia(PostMedia media)
 {
     this.PostMedia = media;
     IsAcceptMedia = true;
 }
Example #9
0
 public void SetPostImage(PostMedia media)
 {
     TwitterUIComponent.SetPostMedia(media);
 }