source: extensions/PiwigoLib/PiwigoWpf/Helper/ImageUrlCachedConverter.cs @ 11904

Last change on this file since 11904 was 11904, checked in by bayral, 13 years ago

PiwigoWPF

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Globalization;
6using System.Windows.Media.Imaging;
7using System.Windows.Controls;
8using Com.Piwigo.Wpf.DTO;
9using System.IO;
10using System.Threading;
11using System.Windows.Threading;
12using System.Windows.Data;
13using Com.Piwigo.Wpf.Service;
14
15
16namespace Com.Piwigo.Wpf.Helper
17{
18    [ValueConversion(typeof(PwgImageWPF), typeof(String))] 
19    public class ImageUrlCachedConverter : IValueConverter
20    {
21         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
22        {
23            String src;
24            if (value == null) return null;
25            PwgImageWPF someObj = value as PwgImageWPF;
26
27            src = ImageCacheManager.Instance.GetImageFilename(someObj);
28
29            return src;
30        }
31
32        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
33        {
34            throw new NotImplementedException();
35        }
36    }
37}
38
Note: See TracBrowser for help on using the repository browser.