diff --git a/SPTInstaller/CustomControls/UpdateButton.axaml.cs b/SPTInstaller/CustomControls/UpdateButton.axaml.cs index 57126f1..e5c6b03 100644 --- a/SPTInstaller/CustomControls/UpdateButton.axaml.cs +++ b/SPTInstaller/CustomControls/UpdateButton.axaml.cs @@ -1,6 +1,6 @@ -using Avalonia; +using System.Windows.Input; +using Avalonia; using Avalonia.Controls; -using Avalonia.Markup.Xaml; namespace SPTInstaller.CustomControls; @@ -10,15 +10,76 @@ public partial class UpdateButton : UserControl { InitializeComponent(); } - - - - // InfoText="{Binding UpdateInfo.UpdateInfoText}" - // ShowUpdateCard="{Binding UpdateInfo.ShowCard}" - // NotNowCommand="{Binding DismissUpdateCommand}" - // UpdateInstallerCommand="{Binding UpdateInstallerCommand}" - // Updating="{Binding UpdateInfo.Updating}" - // DownloadProgress="{Binding UpdateInfo.DownloadProgress}" - // IndeterminateProgress="{Binding UpdateInfo.CheckingForUpdates}" - // UpdateAvailable="{Binding UpdateInfo.UpdateAvailable}" + + public static readonly StyledProperty InfoTextProperty = AvaloniaProperty.Register( + "InfoText"); + + public string InfoText + { + get => GetValue(InfoTextProperty); + set => SetValue(InfoTextProperty, value); + } + + public static readonly StyledProperty ShowProperty = AvaloniaProperty.Register( + "Show"); + + public bool Show + { + get => GetValue(ShowProperty); + set => SetValue(ShowProperty, value); + } + + public static readonly StyledProperty DismissCommandProperty = AvaloniaProperty.Register( + "DismissCommand"); + + public ICommand DismissCommand + { + get => GetValue(DismissCommandProperty); + set => SetValue(DismissCommandProperty, value); + } + + public static readonly StyledProperty UpdateCommandProperty = AvaloniaProperty.Register( + "UpdateCommand"); + + public ICommand UpdateCommand + { + get => GetValue(UpdateCommandProperty); + set => SetValue(UpdateCommandProperty, value); + } + + public static readonly StyledProperty UpdatingProperty = AvaloniaProperty.Register( + "Updating"); + + public bool Updating + { + get => GetValue(UpdatingProperty); + set => SetValue(UpdatingProperty, value); + } + + public static readonly StyledProperty DownloadProgressProperty = AvaloniaProperty.Register( + "DownloadProgress"); + + public int DownloadProgress + { + get => GetValue(DownloadProgressProperty); + set => SetValue(DownloadProgressProperty, value); + } + + public static readonly StyledProperty IsIndeterminateProperty = AvaloniaProperty.Register( + "IsIndeterminate"); + + public bool IsIndeterminate + { + get => GetValue(IsIndeterminateProperty); + set => SetValue(IsIndeterminateProperty, value); + } + + public static readonly StyledProperty UpdateAvailableProperty = AvaloniaProperty.Register( + "UpdateAvailable"); + + public bool UpdateAvailable + { + get => GetValue(UpdateAvailableProperty); + set => SetValue(UpdateAvailableProperty, value); + } } \ No newline at end of file