SPT-AKI-Installer/SPTInstaller/CustomControls/ProgressableTaskItem.axaml.cs

76 lines
2.3 KiB
C#
Raw Normal View History

2023-05-11 23:11:39 -04:00
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
namespace SPTInstaller.CustomControls;
public partial class ProgressableTaskItem : UserControl
2023-05-11 23:11:39 -04:00
{
public ProgressableTaskItem()
{
InitializeComponent();
}
2024-05-01 10:31:55 -04:00
public string TaskId
{
get => GetValue(TaskIdProperty);
set => SetValue(TaskIdProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<string> TaskIdProperty =
AvaloniaProperty.Register<ProgressableTaskItem, string>(nameof(TaskId));
2024-05-01 10:31:55 -04:00
public string TaskName
2023-05-11 23:11:39 -04:00
{
get => GetValue(TaskNameProperty);
set => SetValue(TaskNameProperty, value);
2023-05-11 23:11:39 -04:00
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<string> TaskNameProperty =
AvaloniaProperty.Register<ProgressableTaskItem, string>(nameof(TaskName));
2024-05-01 10:31:55 -04:00
public bool IsCompleted
{
get => GetValue(IsCompletedProperty);
set => SetValue(IsCompletedProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<bool> IsCompletedProperty =
AvaloniaProperty.Register<ProgressableTaskItem, bool>(nameof(IsCompleted));
2024-05-01 10:31:55 -04:00
public bool IsRunning
{
get => GetValue(IsRunningProperty);
set => SetValue(IsRunningProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<bool> IsRunningProperty =
AvaloniaProperty.Register<ProgressableTaskItem, bool>(nameof(IsRunning));
2024-05-01 10:31:55 -04:00
public IBrush PendingColor
{
get => GetValue(PendingColorProperty);
set => SetValue(PendingColorProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<IBrush> PendingColorProperty =
AvaloniaProperty.Register<ProgressableTaskItem, IBrush>(nameof(PendingColor));
2024-05-01 10:31:55 -04:00
public IBrush RunningColor
{
get => GetValue(RunningColorProperty);
set => SetValue(RunningColorProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<IBrush> RunningColorProperty =
AvaloniaProperty.Register<ProgressableTaskItem, IBrush>(nameof(PendingColor));
2024-05-01 10:31:55 -04:00
public IBrush CompletedColor
{
get => GetValue(CompletedColorProperty);
set => SetValue(CompletedColorProperty, value);
}
2024-05-01 10:31:55 -04:00
public static readonly StyledProperty<IBrush> CompletedColorProperty =
AvaloniaProperty.Register<ProgressableTaskItem, IBrush>(nameof(PendingColor));
}