You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
|
|
|
|
|
using SlnMesnac.WPF.Model;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.WPF.ConvertTo
|
|
|
|
|
{
|
|
|
|
|
public class MultiBindingConverter : IMultiValueConverter
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 对象转换
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="values">所绑定的源的值</param>
|
|
|
|
|
/// <param name="targetType">目标的类型</param>
|
|
|
|
|
/// <param name="parameter">绑定时所传递的参数</param>
|
|
|
|
|
/// <param name="culture"><系统语言等信息</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
if (values != null && values.Count() ==2)
|
|
|
|
|
{
|
|
|
|
|
StatisticModel bsm = new StatisticModel();
|
|
|
|
|
|
|
|
|
|
bsm.BeginTime = values[0].ToString();
|
|
|
|
|
bsm.EndTime = values[1].ToString();
|
|
|
|
|
|
|
|
|
|
return bsm;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|