2025-05-28 23:19:00 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Serein.Workbench.Converters
|
|
|
|
|
|
{
|
2025-07-31 09:54:30 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 选择方法详情的转换器
|
|
|
|
|
|
/// </summary>
|
2025-07-30 21:15:07 +08:00
|
|
|
|
internal class MethodDetailsSelectorConverter : IMultiValueConverter
|
2025-05-28 23:19:00 +08:00
|
|
|
|
{
|
2025-07-31 09:54:30 +08:00
|
|
|
|
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
|
2025-05-28 23:19:00 +08:00
|
|
|
|
{
|
|
|
|
|
|
bool isShareParam = (bool)values[0];
|
|
|
|
|
|
var nodeDetails = values[1];
|
|
|
|
|
|
var selectNodeDetails = values[2];
|
|
|
|
|
|
|
|
|
|
|
|
return isShareParam ? nodeDetails : selectNodeDetails;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|