Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }
 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;
 }
Exemple #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();
            }
        }
Exemple #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);
        }
 public void SetPostMedia(PostMedia media)
 {
     this.PostMedia = media;
     IsAcceptMedia = true;
 }
Exemple #9
0
 public void SetPostImage(PostMedia media)
 {
     TwitterUIComponent.SetPostMedia(media);
 }