diff options
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 24d1507f6..e702265d9 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -10,11 +10,19 @@ namespace Handbrake using System.IO;
using System.Windows.Forms;
+ using Caliburn.Castle;
+
+ using Castle.Core.Resource;
+ using Castle.Windsor;
+ using Castle.Windsor.Configuration.Interpreters;
+
using HandBrake.ApplicationServices;
using Handbrake.Presets;
using Handbrake.Properties;
+ using Microsoft.Practices.ServiceLocation;
+
/// <summary>
/// HandBrake Starts Here
/// </summary>
@@ -29,6 +37,9 @@ namespace Handbrake [STAThread]
public static void Main(string[] args)
{
+ WindsorContainer container = new WindsorContainer(new XmlInterpreter(new ConfigResource("castle")));
+ ServiceLocator.SetLocatorProvider(() => new WindsorAdapter(container));
+
InstanceId = Process.GetProcessesByName("HandBrake").Length;
// Handle any unhandled exceptions
|