Initial commit: Futonizer MKV track stripper
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Futonizer.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents one currently-running strip job for display in the "active jobs" list,
|
||||
/// since multiple files can be stripped concurrently.
|
||||
/// </summary>
|
||||
public class JobProgressItem : INotifyPropertyChanged
|
||||
{
|
||||
private int _percent;
|
||||
private double _megabytesPerSecond;
|
||||
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
public int Percent
|
||||
{
|
||||
get => _percent;
|
||||
set
|
||||
{
|
||||
_percent = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(Display));
|
||||
}
|
||||
}
|
||||
|
||||
public double MegabytesPerSecond
|
||||
{
|
||||
get => _megabytesPerSecond;
|
||||
set
|
||||
{
|
||||
_megabytesPerSecond = value;
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(Display));
|
||||
}
|
||||
}
|
||||
|
||||
public string Display => $"{FileName} - {Percent}% - {MegabytesPerSecond:F1} MB/s";
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
private void OnPropertyChanged([CallerMemberName] string? name = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user