public void ShowPreview(Models.GlimpseItem item) { System.Windows.Threading.Dispatcher.CurrentDispatcher.InvokeAsync(() => { this.Source = item.FullPath; }); }
public void ShowPreview(Models.GlimpseItem item) { this.Source = item.FullPath; BitmapDecoder decoder = BitmapDecoder.Create(item.Uri, BitmapCreateOptions.None, BitmapCacheOption.None); this.image = decoder.Frames[0]; }
public void ShowPreview(Models.GlimpseItem item) { var source = System.IO.File.ReadAllText(item.FullPath); var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build(); var content = Markdown.ToHtml(source, pipeline); var template = Properties.Resources.MarkdownHtmlTemplate; MarkdownHtml = template.Replace("<$CONTENT-PLACEHOLDER$ />", content); }
public void ShowPreview(Models.GlimpseItem item) { using (var sf = ShellFolder.FromParsingName(item.FullPath)) { this.Thumbnail = sf.Thumbnail.ExtraLargeBitmapSource; this.DriveName = sf.GetDisplayName(DisplayNameType.Default); } DriveInfo di = new DriveInfo(item.FullPath); this.FreeBytes = di.TotalFreeSpace; this.TotalBytes = di.TotalSize; this.FreeSpaceRatio = (di.TotalFreeSpace / (double)di.TotalSize); }
public void ShowPreview(Models.GlimpseItem item) { using (var sf = ShellFolder.FromParsingName(item.FullPath)) { this.Thumbnail = sf.Thumbnail.ExtraLargeBitmapSource;; this.Foldername = sf.GetDisplayName(DisplayNameType.Default); } var di = new DirectoryInfo(item.FullPath); this.CreationTime = di.CreationTime; if (!folderStatsCache.TryGetValue(item.FullPath, out this.currentFolderStats)) { this.currentFolderStats = new FolderStats(di); this.currentFolderStats.StartCalculation(); this.folderStatsUpdateTimer = new Timer((state) => { UpdateFolderStats(); }, state: null, dueTime: 0, period: 500); folderStatsCache.Add(item.FullPath, currentFolderStats); } }
public void ShowPreview(Models.GlimpseItem item) { this.Source = item.FullPath; }
public bool CanCreatePreview(Models.GlimpseItem item) { return(supportedExtensions.Contains(item.FileExtension)); }
public bool CanCreatePreview(Models.GlimpseItem item) { return(item.FileExtension == ".md"); }
public void ShowPreview(Models.GlimpseItem item) { throw new NotImplementedException(); }
public bool CanCreatePreview(Models.GlimpseItem item) { throw new NotImplementedException(); }
public bool CanCreatePreview(Models.GlimpseItem item) { return(item.IsLocalDrive); }
public bool CanCreatePreview(Models.GlimpseItem item) { return(item.FileExtension == ".htm" || item.FileExtension == ".html" || item.ShellFile?.Properties.System.ContentType?.Value == "text/html"); }
public bool CanCreatePreview(Models.GlimpseItem item) { return(Interop.Win32.PreviewHandlerGuid(item.FullPath) != Guid.Empty); }
public bool CanCreatePreview(Models.GlimpseItem item) { return(item.IsDirectory); }
public void ShowPreview(Models.GlimpseItem item) { this.Source = item.Uri; this.PlaybackState = MediaState.Play; }
public bool CanCreatePreview(Models.GlimpseItem item) { return(item.PerceivedType == Models.PerceivedType.Video); }
public void ShowPreview(Models.GlimpseItem item) { this.RtfText = System.IO.File.ReadAllText(item.FullPath); }