summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-07-07 15:16:22 +0000
committersr55 <[email protected]>2012-07-07 15:16:22 +0000
commit563ff8d014bcf1a65e5185679215e0ec26f7e9f0 (patch)
treef6552556ca51b56a44641e5fb32cc551af02e35c /win/CS
parent453619f81000de7b2622ab0403f880f6dd3db4d0 (diff)
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
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs20
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs13
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs2
3 files changed, 3 insertions, 32 deletions
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,36 +56,20 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
private readonly string queueFile;
- /// <summary>
- /// The ID of the job last added
- /// </summary>
- private int lastJobId;
-
#endregion
/// <summary>
/// Initializes a new instance of the <see cref="QueueManager"/> class.
/// </summary>
- /// <param name="instanceId">
- /// The instance Id.
- /// </param>
- 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
/// <summary>
- /// Initializes a new instance of the <see cref="QueueManager"/> class.
- /// </summary>
- public QueueManager()
- {
- this.queueFile = "hb_queue_recovery.xml"; // TODO need to support multi-instance here.
- }
-
- /// <summary>
/// Fires when a job is Added, Removed or Re-Ordered.
/// Should be used for triggering an update of the Queue Window.
/// </summary>
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
}
}
- /// <summary>
- /// Initializes a new instance of the <see cref="QueueProcessor"/> class.
- /// This call also initializes the Encode and QueueManager services
- /// </summary>
- /// <param name="instanceId">
- /// The instance id.
- /// </param>
- public QueueProcessor(int instanceId)
- {
- this.EncodeService = File.Exists("hb.dll") ? (IEncode)new LibEncode() : new Encode();
- this.QueueManager = new QueueManager(instanceId);
- }
-
#region Events
/// <summary>
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<IQueueProcessor>(); // TODO Instance ID!
+ this.queueProcessor = IoC.Get<IQueueProcessor>();
// Setup Properties
this.WindowTitle = "HandBrake";