Philipp Heenemann a8b91f4ee6 Refactor C# code to imperative, top-level statements style
Updated the existing C# code into a more modern, imperative and top-level statements style. This involves shortening the code by removing unnecessary parts like additional brackets and explicit namespace declarations. It's done to improve clarity and readability.
2023-07-12 09:19:33 +02:00

57 lines
1.6 KiB
C#

using Avalonia;
using Avalonia.Controls;
namespace SPTInstaller.CustomControls;
public partial class PreCheckItem : UserControl
{
public PreCheckItem()
{
InitializeComponent();
}
public string PreCheckName
{
get => GetValue(PreCheckNameProperty);
set => SetValue(PreCheckNameProperty, value);
}
public static readonly StyledProperty<string> PreCheckNameProperty =
AvaloniaProperty.Register<PreCheckItem, string>(nameof(PreCheckName));
public bool IsRunning
{
get => GetValue(IsRunningProperty);
set => SetValue(IsRunningProperty, value);
}
public static readonly StyledProperty<bool> IsRunningProperty =
AvaloniaProperty.Register<PreCheckItem, bool>(nameof(IsRunning));
public bool IsPending
{
get => GetValue(IsPendingProperty);
set => SetValue(IsPendingProperty, value);
}
public static readonly StyledProperty<bool> IsPendingProperty =
AvaloniaProperty.Register<PreCheckItem, bool>(nameof(IsPending));
public bool Passed
{
get => GetValue(PassedProperty);
set => SetValue(PassedProperty, value);
}
public static readonly StyledProperty<bool> PassedProperty =
AvaloniaProperty.Register<PreCheckItem, bool>(nameof(Passed));
public bool IsRequired
{
get => GetValue(IsRequiredProperty);
set => SetValue(IsRequiredProperty, value);
}
public static readonly StyledProperty<bool> IsRequiredProperty =
AvaloniaProperty.Register<PreCheckItem, bool>(nameof(IsRequired));
}