From 694a4c2c679424f2f9199cb8becae21302ff6623 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 25 Jul 2015 20:04:03 +0000 Subject: WinGui: Tidyup the AppBootstapper class. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7377 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs | 35 +++++++++----------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs b/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs index c4ddeb1ad..5d9b0daf5 100644 --- a/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs +++ b/win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs @@ -94,14 +94,17 @@ namespace HandBrakeWPF.Startup } /// - /// Select Assemblies + /// The on startup. /// - /// - /// A List of Assembly objects - /// - protected override IEnumerable SelectAssemblies() - { - return AppDomain.CurrentDomain.GetAssemblies(); + /// + /// The sender. + /// + /// + /// The e. + /// + protected override void OnStartup(object sender, System.Windows.StartupEventArgs e) + { + DisplayRootViewFor(); } /// @@ -121,11 +124,10 @@ namespace HandBrakeWPF.Startup var instance = container.GetInstance(service, key); if (instance != null) { - // this.BuildUp(instance); return instance; } - throw new InvalidOperationException("Could not locate any instances for: " + key); + throw new InvalidOperationException("Could not locate any instances."); } /// @@ -139,16 +141,7 @@ namespace HandBrakeWPF.Startup /// protected override IEnumerable GetAllInstances(Type service) { - IEnumerable instances = this.container.GetAllInstances(service); - if (instances != null) - { - foreach (var item in instances) - { - // this.BuildUp(item); - } - } - - return instances; + return container.GetAllInstances(service); } /// @@ -159,10 +152,6 @@ namespace HandBrakeWPF.Startup /// protected override void BuildUp(object instance) { - //instance.GetType().GetProperties() - // .Where(property => property.CanWrite && property.PropertyType.IsPublic) - // .ForEach(property => property.SetValue(instance, this.container.GetInstance(property.PropertyType, property.Name), null)); - this.container.BuildUp(instance); } } -- cgit v1.2.3