2023-08-25 23:46:11 -04:00
|
|
|
|
using Avalonia;
|
2023-08-24 22:28:37 -04:00
|
|
|
|
using Avalonia.Controls;
|
2023-08-25 23:46:11 -04:00
|
|
|
|
using DialogHostAvalonia;
|
|
|
|
|
using SPTInstaller.CustomControls.Dialogs;
|
|
|
|
|
using System.Threading.Tasks;
|
2023-08-24 22:28:37 -04:00
|
|
|
|
|
|
|
|
|
namespace SPTInstaller.CustomControls;
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-24 22:28:37 -04:00
|
|
|
|
public partial class CacheInfo : UserControl
|
|
|
|
|
{
|
|
|
|
|
public CacheInfo()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-25 23:46:11 -04:00
|
|
|
|
public async Task ShowCacheDialogCommand() => await DialogHost.Show(new WhyCacheThoughDialog());
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-25 23:46:11 -04:00
|
|
|
|
public string InfoText
|
|
|
|
|
{
|
|
|
|
|
get => GetValue(InfoTextProperty);
|
|
|
|
|
set => SetValue(InfoTextProperty, value);
|
|
|
|
|
}
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-25 23:46:11 -04:00
|
|
|
|
public static readonly StyledProperty<string> InfoTextProperty =
|
|
|
|
|
AvaloniaProperty.Register<CacheInfo, string>(nameof(InfoText));
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-25 23:46:11 -04:00
|
|
|
|
public StatusSpinner.SpinnerState State
|
|
|
|
|
{
|
|
|
|
|
get => GetValue(StateProperty);
|
|
|
|
|
set => SetValue(StateProperty, value);
|
|
|
|
|
}
|
2024-05-01 10:31:55 -04:00
|
|
|
|
|
2023-08-25 23:46:11 -04:00
|
|
|
|
public static readonly StyledProperty<StatusSpinner.SpinnerState> StateProperty =
|
|
|
|
|
AvaloniaProperty.Register<CacheInfo, StatusSpinner.SpinnerState>(nameof(State));
|
2024-05-01 10:31:55 -04:00
|
|
|
|
}
|