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; }
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; }
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; }
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(); } }
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; }
public void SetPostImage(PostMedia media) { TwitterUIComponent.SetPostMedia(media); }