almost done videoviewer. WIP modify app style to per-window one.

This commit is contained in:
Paddy Xu
2017-08-10 01:15:32 +03:00
parent efaca311fc
commit 9ce0776d53
36 changed files with 286 additions and 1017 deletions

View File

@@ -22,16 +22,22 @@ using System.Windows.Data;
namespace QuickLook.Plugin.VideoViewer
{
public sealed class BooleanToVisibilityHiddenConverter : DependencyObject, IValueConverter
public sealed class TimeSpanToShortStringConverter : DependencyObject, IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
return Visibility.Collapsed;
return "00:00";
var v = (bool) value;
var v = (TimeSpan) value;
return v ? Visibility.Collapsed : Visibility.Visible;
var s = string.Empty;
if (v.Hours > 0)
s += $"{v.Hours:D2}:";
s += $"{v.Minutes:D2}:{v.Seconds:D2}";
return s;
}
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)