Files
2025-11-17 19:02:40 +01:00

48 lines
977 B
C#

using System.ComponentModel;
namespace ModpackUpdater.Apps.Manager.Ui.Models;
public class ProgressInfos : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
public bool IsVisible { get; set; }
public bool IsGeneric { get; set; }
public bool ShowText { get; set; }
public double MaxValue { get; set; }
public double Value { get; set; }
public void Start(int maxValue)
{
IsGeneric = false;
Value = 0;
MaxValue = maxValue;
ShowText = true;
IsVisible = true;
}
public void Start()
{
ShowText = false;
IsGeneric = true;
IsVisible = true;
}
public void Set(int value)
{
if (!IsGeneric)
Value = value;
}
public void Increment()
{
if (!IsGeneric)
Value += 1;
}
public void Stop()
{
IsVisible = false;
IsGeneric = false;
}
}