mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-12-04 21:42:47 +01:00
31 lines
644 B
C#
31 lines
644 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
namespace DHT.Desktop.Dialogs.Progress;
|
|
|
|
sealed partial class ProgressItem : ObservableObject {
|
|
[ObservableProperty(Setter = Access.Private)]
|
|
[NotifyPropertyChangedFor(nameof(Opacity))]
|
|
private bool isVisible = 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]
|
|
private string items = "";
|
|
|
|
[ObservableProperty]
|
|
private int progress = 0;
|
|
|
|
[ObservableProperty]
|
|
private bool isIndeterminate;
|
|
}
|