using Caliburn.Micro;
+ using HandBrakeWPF.Properties;
+
using Newtonsoft.Json;
[JsonObject(MemberSerialization.OptOut)]
{
return this.startTime;
}
+
set
{
if (value.Equals(this.startTime)) return;
this.startTime = value;
this.NotifyOfPropertyChange(() => this.StartTime);
this.NotifyOfPropertyChange(() => this.Duration);
+ this.NotifyOfPropertyChange(() => this.StartTimeDisplay);
+ }
+ }
+
+ public string StartTimeDisplay
+ {
+ get
+ {
+ if (this.startTime == DateTime.MinValue)
+ {
+ return Resources.QueueView_NotAvailable;
+ }
+
+ return this.startTime.ToString();
}
}
{
return this.endTime;
}
+
set
{
if (value.Equals(this.endTime)) return;
this.endTime = value;
this.NotifyOfPropertyChange(() => this.EndTime);
this.NotifyOfPropertyChange(() => this.Duration);
+ this.NotifyOfPropertyChange(() => this.EndTimeDisplay);
+ }
+ }
+
+ public string EndTimeDisplay
+ {
+ get
+ {
+ if (this.endTime == DateTime.MinValue)
+ {
+ return Resources.QueueView_NotAvailable;
+ }
+
+ return this.endTime.ToString();
}
}
{
if (this.endTime == DateTime.MinValue)
{
- return TimeSpan.MinValue;
+ return TimeSpan.Zero;
}
return this.EndTime - this.StartTime - this.PausedDuration;
{
return this.finalFileSize;
}
+
set
{
if (value == this.finalFileSize) return;
this.pausedTimespan = this.PausedDuration.Add(pausedDuration);
}
}
+
+ public void Reset()
+ {
+ this.StartTime = DateTime.MinValue;
+ this.EndTime = DateTime.MinValue;
+ this.FinalFileSize = 0;
+ this.pausedTimespan = TimeSpan.Zero;
+ this.pausedStartPoint = DateTime.MinValue;
+ this.CompletedActivityLogPath = null;
+
+ this.NotifyOfPropertyChange(() => this.FinalFileSizeInMegaBytes);
+ this.NotifyOfPropertyChange(() => this.PausedDuration);
+ this.NotifyOfPropertyChange(() => this.Duration);
+ }
}
}