source: trunk/CrypPlugins/KeySearcher/Converter/DateTimeConverter.cs @ 1709

Last change on this file since 1709 was 1705, checked in by Paul Lelgemann, 11 years ago

o KeySearcher: improved visualization of local and distributed components

File size: 693 bytes
Line 
1using System;
2using System.Globalization;
3using System.Threading;
4using System.Windows.Data;
5
6namespace KeySearcherConverter
7{
8    public class DateTimeConverter : IValueConverter
9    {
10        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11        {
12            if (value == null)
13            {
14                return "-";
15            }
16
17            return ((DateTime)value).ToString("g", Thread.CurrentThread.CurrentCulture);
18        }
19
20        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21        {
22            throw new NotImplementedException();
23        }
24    }
25}
Note: See TracBrowser for help on using the repository browser.