public void View(string path, ContextObject context) { _ip = new ImagePanel(path); context.ViewerContent = _ip; context.Title = $"{Path.GetFileName(path)} ({_imageSize.Width} × {_imageSize.Height})"; context.IsBusy = false; }
public void View(string path, ContextObject context) { _ip = new ImagePanel(context, _meta); var size = _meta.GetSize(); context.ViewerContent = _ip; context.Title = size.IsEmpty ? $"{Path.GetFileName(path)}" : $"{size.Width}×{size.Height}: {Path.GetFileName(path)}"; _ip.ImageUriSource = new Uri(path); }
public void View(string path, ContextObject context) { _ip = new ImagePanel(_meta); context.ViewerContent = _ip; context.Title = _imageSize.IsEmpty ? $"{Path.GetFileName(path)}" : $"{Path.GetFileName(path)} ({_imageSize.Width}×{_imageSize.Height})"; LoadImage(_ip, path); context.IsBusy = false; }
public void View(string path, ContextObject context) { _ip = new ImagePanel(_meta); var summary = _ip.Meta.GetSummary(); string s = ""; foreach (var item in summary) { s += String.Format("{0,-30}: ", item.Key.ToString()); s += String.Format("{0,-200}", item.Value.ToString()); s += "\n"; } context.ShowOverlayInfo(s); context.ViewerContent = _ip; context.Title = _imageSize.IsEmpty ? $"{Path.GetFileName(path)}" : $"{Path.GetFileName(path)} ({_imageSize.Width}×{_imageSize.Height})"; LoadImage(_ip, path); context.IsBusy = false; }
public void Cleanup() { _ip?.Dispose(); _ip = null; }
private void LoadImage(ImagePanel ui, string path) { ui.ImageUriSource = new Uri(path); }
public void Cleanup() { _ip = null; }
public void Cleanup() { Directory.SetCurrentDirectory(App.AppPath); _ip = null; }