summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2015-07-25 20:04:03 +0000
committersr55 <[email protected]>2015-07-25 20:04:03 +0000
commit694a4c2c679424f2f9199cb8becae21302ff6623 (patch)
tree714c246186d42ec467c2623f1cd076a123171876 /win
parent0768bbe8bf9d16861cb19921289f5b5b33d2beec (diff)
WinGui: Tidyup the AppBootstapper class.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7377 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Startup/AppBootstrapper.cs35
1 files changed, 12 insertions, 23 deletions
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
}
/// <summary>
- /// Select Assemblies
+ /// The on startup.
/// </summary>
- /// <returns>
- /// A List of Assembly objects
- /// </returns>
- protected override IEnumerable<Assembly> SelectAssemblies()
- {
- return AppDomain.CurrentDomain.GetAssemblies();
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ protected override void OnStartup(object sender, System.Windows.StartupEventArgs e)
+ {
+ DisplayRootViewFor<IShellViewModel>();
}
/// <summary>
@@ -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.");
}
/// <summary>
@@ -139,16 +141,7 @@ namespace HandBrakeWPF.Startup
/// </returns>
protected override IEnumerable<object> GetAllInstances(Type service)
{
- IEnumerable<object> instances = this.container.GetAllInstances(service);
- if (instances != null)
- {
- foreach (var item in instances)
- {
- // this.BuildUp(item);
- }
- }
-
- return instances;
+ return container.GetAllInstances(service);
}
/// <summary>
@@ -159,10 +152,6 @@ namespace HandBrakeWPF.Startup
/// </param>
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);
}
}