From 1f09b740f80dac1ab1e0b17519b2a7e4f3440fa4 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 26 Apr 2020 12:14:42 +0100 Subject: Multi instance (#2791) WinGui: Refactoring and laying the groundwork in many parts of the UI code in preparation for supporting multiple concurrent jobs running. - Add support for multiple log files to the Activity log screen and refactor usages of ILog. Each Encode instance will now get a separate instance instead of there being one global instance. - Retire the Mini Display Window. It's very rarely used, not very easy to even find and of limited value. - Add the preferences code for the Simultaneous encode setting. Locked to one instance for now. This will allow us to test with users that existing functionality still works fine. --- win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs') diff --git a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs index 3ee126ce9..208c721e4 100644 --- a/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs +++ b/win/CS/HandBrakeWPF/Services/Queue/Model/QueueTask.cs @@ -35,6 +35,7 @@ namespace HandBrakeWPF.Services.Queue.Model id = id + 1; this.Id = string.Format("{0}.{1}", GeneralUtilities.ProcessId, id); this.Statistics = new QueueStats(); + this.JobProgress = new QueueProgressStatus(); } public QueueTask(EncodeTask task, HBConfiguration configuration, string scannedSourcePath, Preset currentPreset, bool isPresetModified) @@ -57,6 +58,7 @@ namespace HandBrakeWPF.Services.Queue.Model this.Statistics = new QueueStats(); this.TaskId = Guid.NewGuid().ToString(); + this.JobProgress = new QueueProgressStatus(); } [JsonProperty] @@ -81,6 +83,7 @@ namespace HandBrakeWPF.Services.Queue.Model this.status = value; this.NotifyOfPropertyChange(() => this.Status); this.NotifyOfPropertyChange(() => this.ShowEncodeProgress); + this.NotifyOfPropertyChange(() => this.IsJobStatusVisible); } } @@ -93,6 +96,12 @@ namespace HandBrakeWPF.Services.Queue.Model [JsonProperty] public QueueStats Statistics { get; set; } + [JsonIgnore] + public QueueProgressStatus JobProgress { get; set; } + + [JsonIgnore] + public bool IsJobStatusVisible => this.Status == QueueItemStatus.InProgress; + [JsonIgnore] public string SelectedPresetKey { -- cgit v1.2.3