From 563ff8d014bcf1a65e5185679215e0ec26f7e9f0 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 7 Jul 2012 15:16:22 +0000 Subject: WinGui: Fixes to allow for multi-instance to work again. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4818 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/QueueManager.cs | 20 ++------------------ .../Services/QueueProcessor.cs | 13 ------------- win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs | 2 +- 3 files changed, 3 insertions(+), 32 deletions(-) (limited to 'win/CS') diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs index 8464ffed2..452f47365 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs @@ -56,35 +56,19 @@ namespace HandBrake.ApplicationServices.Services /// private readonly string queueFile; - /// - /// The ID of the job last added - /// - private int lastJobId; - #endregion /// /// Initializes a new instance of the class. /// - /// - /// The instance Id. - /// - public QueueManager(int instanceId) + public QueueManager() { // If this is the first instance, just use the main queue file, otherwise add the instance id to the filename. - this.queueFile = instanceId == 0 ? "hb_queue_recovery.xml" : string.Format("hb_queue_recovery{0}.xml", instanceId); + this.queueFile = string.Format("hb_queue_recovery{0}.xml", GeneralUtilities.GetInstanceCount); } #region Events - /// - /// Initializes a new instance of the class. - /// - public QueueManager() - { - this.queueFile = "hb_queue_recovery.xml"; // TODO need to support multi-instance here. - } - /// /// Fires when a job is Added, Removed or Re-Ordered. /// Should be used for triggering an update of the Queue Window. diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index fe0675f96..effe9f9b5 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -59,19 +59,6 @@ namespace HandBrake.ApplicationServices.Services } } - /// - /// Initializes a new instance of the class. - /// This call also initializes the Encode and QueueManager services - /// - /// - /// The instance id. - /// - public QueueProcessor(int instanceId) - { - this.EncodeService = File.Exists("hb.dll") ? (IEncode)new LibEncode() : new Encode(); - this.QueueManager = new QueueManager(instanceId); - } - #region Events /// diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 123e32fc0..44dc15eff 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -188,7 +188,7 @@ namespace HandBrakeWPF.ViewModels this.shellViewModel = shellViewModel; this.updateService = updateService; this.userSettingService = userSettingService; - this.queueProcessor = IoC.Get(); // TODO Instance ID! + this.queueProcessor = IoC.Get(); // Setup Properties this.WindowTitle = "HandBrake"; -- cgit v1.2.3