Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
7a1dc7b9e0
12 files changed
+154
-28
No files matched your search
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace DyeingComputer.ConvertMoels
|
||||
{
|
||||
/// <summary>
|
||||
/// 序号转换器
|
||||
/// 获取DataGrid的行号 , 转换为对应的序号
|
||||
/// </summary>
|
||||
internal class RowToIndexConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
DataGridRow row = value as DataGridRow;
|
||||
if (row != null)
|
||||
return row.GetIndex() + 1;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user