From b64dfc0aae97cb64efd89bfb31889cdd762376bd Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 6 Oct 2012 19:39:22 +0000 Subject: WinGui: Remove Castle references from HandBrake.Interop git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5003 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs | 6 +----- win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs | 11 +++++++---- win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs | 2 -- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs index 79d79164f..a3506a60d 100644 --- a/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/EncodeServiceWrapper.cs @@ -13,14 +13,11 @@ namespace HandBrakeWPF.Services { using System; - using Caliburn.Micro; - using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Isolation; using HandBrake.ApplicationServices.Model; using HandBrake.ApplicationServices.Services; using HandBrake.ApplicationServices.Services.Interfaces; - using HandBrake.Interop.Interfaces; using EncodeCompletedEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeCompletedEventArgs; using EncodeProgressEventArgs = HandBrake.ApplicationServices.EventArgs.EncodeProgressEventArgs; @@ -66,8 +63,7 @@ namespace HandBrakeWPF.Services } else { - IHandBrakeInstance handBrakeInstance = IoC.Get(); - this.encodeService = new LibEncode(userSettingService, handBrakeInstance); + this.encodeService = new LibEncode(userSettingService, ScanServiceWrapper.HandbrakeInstance); } } catch (Exception exc) diff --git a/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs b/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs index a25213a6b..ffbbae5c0 100644 --- a/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs +++ b/win/CS/HandBrakeWPF/Services/ScanServiceWrapper.cs @@ -13,13 +13,12 @@ namespace HandBrakeWPF.Services { using System; - using Caliburn.Micro; - using HandBrake.ApplicationServices.Exceptions; using HandBrake.ApplicationServices.Isolation; using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Services; using HandBrake.ApplicationServices.Services.Interfaces; + using HandBrake.Interop; using HandBrake.Interop.Interfaces; /// @@ -31,6 +30,11 @@ namespace HandBrakeWPF.Services { #region Constants and Fields + /// + /// The handbrake instance. + /// + public static readonly IHandBrakeInstance HandbrakeInstance = new HandBrakeInstance(); + /// /// The scan service. /// @@ -63,8 +67,7 @@ namespace HandBrakeWPF.Services } else { - IHandBrakeInstance handBrakeInstance = IoC.Get(); - this.scanService = new LibScan(userSettingService, handBrakeInstance); + this.scanService = new LibScan(userSettingService, HandbrakeInstance); } } catch(Exception exc) diff --git a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs index e34f98ada..ed4796836 100644 --- a/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/CastleBootstrapper.cs @@ -22,7 +22,6 @@ namespace HandBrakeWPF.Startup using HandBrake.ApplicationServices; using HandBrake.ApplicationServices.Services.Interfaces; - using HandBrake.Interop; using ViewModels; using ViewModels.Interfaces; @@ -51,7 +50,6 @@ namespace HandBrakeWPF.Startup // Initialise the ApplicationServices IWindsorInstaller this.windsorContainer.Register(Component.For().ImplementedBy()); - this.windsorContainer.Register(Component.For().ImplementedBy()); this.windsorContainer.Install(windsorContainer.ResolveAll()); // Services -- cgit v1.2.3