public SampleDataItem(String uniqueId, String title, String subtitle, StorageItemThumbnail imagePath, String description, String content, String path, StorageFile file) { this.UniqueId = uniqueId; this.Title = title; this.Subtitle = subtitle; this.Description = description; this.ImagePath = imagePath; this.Content = content; this.sourceIMG = new BitmapImage(); this.sourceIMG.SetSource(imagePath); this.Path = path; this.file = file; }
public static void DisplayResult(Image image, TextBlock textBlock, string thumbnailModeName, uint size, IStorageItem item, StorageItemThumbnail thumbnail, bool isGroup) { // ErrorMessage.Visibility = Visibility.Collapsed; BitmapImage bitmapImage = new BitmapImage(); bitmapImage.SetSource(thumbnail); image.Source = bitmapImage; textBlock.Text = String.Format("ThumbnailMode.{0}\n" + "{1} used: {2}\n" + "Requested size: {3}\n" + "Returned size: {4}x{5}", thumbnailModeName, isGroup ? "Group" : item.IsOfType(StorageItemTypes.File) ? "File" : "Folder", item.Name, size, thumbnail.OriginalWidth, thumbnail.OriginalHeight); }
private FileInfo(FileAttributes attributes, string contentType, DateTimeOffset dateCreated, string displayName, string displayType, string fileType, string folderRelativeId, string futureAccessListToken, string name, StorageItemContentProperties properties, string path, StorageItemThumbnail thumbnail) { Attributes = attributes; ContentType = contentType; DateCreated = dateCreated; FileType = fileType; Path = path; FutureAccessListToken = futureAccessListToken; Thumbnail = thumbnail; Name = name; }
public FileInfo WithThumbnail(StorageItemThumbnail value) { Contract.Ensures(Contract.Result<FileInfo>() != null, nameof(WithThumbnail)); return value == Thumbnail ? this : new FileInfo(Attributes, ContentType, DateCreated, DisplayName, DisplayType, Path, FolderRelativeId, FutureAccessListToken, Name, Properties, FileType, value); }
public static FileInfo Create(FileAttributes attributes = FileAttributes.Normal, string contentType = null, DateTimeOffset dateCreated = default(DateTimeOffset), string displayName = null, string displayType = null, string fileType = null, string folderRelativeId = null, string futureAccessListToken = null, string path = null, string name = null, StorageItemContentProperties properties = null, StorageItemThumbnail thumbnail = null) { Contract.Ensures(Contract.Result<FileInfo>() != null, nameof(Create)); return new FileInfo(attributes, contentType, dateCreated, displayName, displayType, fileType, folderRelativeId, futureAccessListToken, name, properties, path, thumbnail); }
public static Image GetImage(StorageItemThumbnail thumbnail) { try { if (thumbnail == null) return null; BitmapImage bmpImage = new BitmapImage(); bmpImage.SetSource(thumbnail); Image image = new Image(); image.Source = bmpImage; return image; } catch (Exception ex) { Debug.WriteLine(ex.ToString()); return null; } }
public AlbumItem(StorageItemThumbnail thumbnail, string name, string artist) { //DispatchHelper.Invoke(() => //{ Name = (name.Length == 0) ? "Album without title" : name; Artist = artist; //}); _storageItemThumbnail = thumbnail; }
public Mp3(StorageFile file, string nome_arquivo, string caminho, TimeSpan tempo, string formato, uint bitrate, string nome, string artista, string album, string album_artista, IList<string> generos, uint ano, uint numero, uint rating, StorageItemThumbnail thumb) { // Dados adicionais this.file = file; this.modificado = false; this.artwork_modificado = false; // Imagens this.artwork = new BitmapImage(); this.artwork.SetSource(thumb); // Informacoes this.nome_arquivo = nome_arquivo; this.caminho = caminho; this.tempo = tempo.Minutes.ToString() + ":" + tempo.Seconds.ToString(); this.formato = formato; this.bitrate = (bitrate / 1000).ToString() + " kbps"; foreach (string g in generos) { this._generos = g; } // Tags this._nome = (nome == null ? "" : nome); this._artista = (artista == null ? "" : artista); this._album = (album == null ? "" : album); this._album_artista = (album_artista == null ? "" : album_artista); this._ano = ano; this._numero = numero; this._rating = rating; }
public async Task FetchPictureOnBgThread() { m_thumbNail = await m_file.GetThumbnailAsync(ThumbnailMode.PicturesView); }
public async Task LoadImageFromDisk() { m_thumbNail = await m_file.GetThumbnailAsync(ThumbnailMode.PicturesView); m_photo = new BitmapImage(); m_photo.SetSource(m_thumbNail); }