mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-02-23 07:45:58 +01:00
31 lines
709 B
C#
31 lines
709 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace DHT.Desktop.Dialogs.Progress;
|
|
|
|
sealed partial class ProgressItem : ObservableObject {
|
|
[ObservableProperty]
|
|
[NotifyPropertyChangedFor(nameof(Opacity))]
|
|
private partial bool IsVisible { get; set; } = false;
|
|
|
|
public double Opacity => IsVisible ? 1.0 : 0.0;
|
|
|
|
private string message = "";
|
|
|
|
public string Message {
|
|
get => message;
|
|
set {
|
|
SetProperty(ref message, value);
|
|
IsVisible = !string.IsNullOrEmpty(value);
|
|
}
|
|
}
|
|
|
|
[ObservableProperty]
|
|
public partial string Items { get; set; } = "";
|
|
|
|
[ObservableProperty]
|
|
public partial int Progress { get; set; } = 0;
|
|
|
|
[ObservableProperty]
|
|
public partial bool IsIndeterminate { get; set; }
|
|
}
|