namespace QuikDawEditor.MiscClasses; public class MixdownFileItem : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } public MixdownFileItem() { } private TimeSpan _Position; public TimeSpan Position { get { return _Position; } set { _Position = value; NotifyPropertyChanged(nameof(playPosString)); NotifyPropertyChanged(nameof(ThumbMargLeft)); } } public string playPosString { get { return Position.ToString().Substring(0, 8); } } private string _State = "Stopped"; public string State { get { return _State; } set { _State = value; NotifyPropertyChanged(nameof(State)); } } public double containerPixelWidth; public double ThumbMargLeft { get { return Position.TotalMilliseconds / msecLength * containerPixelWidth; } } private string _fileName = ""; public string fileName { get { return _fileName; } set { _fileName = value; NotifyPropertyChanged(nameof(fileName)); } } private bool _IsSelected = false; public bool IsSelected { get { return _IsSelected; } set { _IsSelected = value; NotifyPropertyChanged(nameof(IsSelected)); } } public double _msecLength { get; set; } public double msecLength { get { return _msecLength; } set { _msecLength = value; NotifyPropertyChanged(nameof(msecLengthString)); } } public string msecLengthString { get { return TimeSpan.FromMilliseconds(msecLength).ToString().Substring(0, 8); } } }