Adding the UI to the same repo. Made some default theme progress

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-20 11:25:22 -04:00
parent d8c01ded6e
commit 119dfc3ac7
70 changed files with 3384 additions and 30 deletions

View File

@@ -0,0 +1,34 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace MediaBrowser.UI.Converters
{
public class DateTimeToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var date = (DateTime)value;
string format = parameter as string;
if (string.IsNullOrEmpty(format))
{
return date.ToString();
}
if (format.Equals("shorttime", StringComparison.OrdinalIgnoreCase))
{
return date.ToShortTimeString();
}
return date.ToString(format);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}