跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

浏览文件

TimeConverter.cs

26 行 · 733 B历史下载
1using Core.Librarys;
2using System;
3using System.Collections.Generic;
4using System.Globalization;
5using System.Linq;
6using System.Text;
7using System.Threading.Tasks;
8using System.Windows.Data;
9using System.Windows.Media;
10
11namespace UI.Controls.Converters
12{
13 [ValueConversion(typeof(object), typeof(string))]
14 public class TimeConverter : IValueConverter
15 {
16 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
17 {
18 return Time.ToString(int.Parse(value.ToString()));
19 }
20
21 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
22 {
23 throw new NotImplementedException();
24 }
25 }
26}