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.
29 lines
776 B
C#
29 lines
776 B
C#
|
1 month ago
|
using Avalonia.Data.Converters;
|
||
|
|
using AI.Models;
|
||
|
|
using System;
|
||
|
|
using System.Globalization;
|
||
|
|
|
||
|
|
namespace AI.Converters
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// 判断工作流步骤状态是否为已完成(用于显示勾)
|
||
|
|
/// </summary>
|
||
|
|
public class StatusToCompletedConverter : IValueConverter
|
||
|
|
{
|
||
|
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||
|
|
{
|
||
|
|
if (value is WorkflowStepStatus status)
|
||
|
|
{
|
||
|
|
return status == WorkflowStepStatus.Completed;
|
||
|
|
}
|
||
|
|
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
|
||
|
|
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||
|
|
{
|
||
|
|
throw new NotImplementedException();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|