'添加自定义图标大小','待办任务可使用CRON表达式自定义提醒频率'
This commit is contained in:
29
Converts/TodoTaskExecConvert.cs
Normal file
29
Converts/TodoTaskExecConvert.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using GeekDesk.Constant;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace GeekDesk.Converts
|
||||
{
|
||||
public class TodoTaskExecConvert : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (TodoTaskExecType)value == (TodoTaskExecType)int.Parse(parameter.ToString());
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
bool isChecked = (bool)value;
|
||||
if (!isChecked)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return (TodoTaskExecType)int.Parse(parameter.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user