Mercurial > silverbladetech
view MetroWpf/MetroWpf/App.xaml.cs @ 19:09d18d6e5f40
airport work
author | stevenh7776 stevenhollidge@hotmail.com |
---|---|
date | Thu, 15 Mar 2012 06:59:15 +0000 |
parents | 2395908fa45b |
children | dfc81f8bb838 |
line wrap: on
line source
using System.Diagnostics; using System.Reflection; using System.Windows; using GalaSoft.MvvmLight.Ioc; using MetroWpf.Framework.Interfaces; using MetroWpf.Xaml.Binding; namespace MetroWpf { /// <summary> /// Application startup for initialisation and config /// </summary> public partial class App : Application { protected override void OnExit(ExitEventArgs e) { base.OnExit(e); } protected override void OnStartup(StartupEventArgs e) { InitializeIoC(); base.OnStartup(e); InitializeWpfApplication(); InitializeBindingErrorTrace(); LogApplicationStartup(); } private static void InitializeBindingErrorTrace() { BindingErrorTraceListener.SetTrace(); } private static void InitializeWpfApplication() { SimpleIoc.Default.GetInstance<IWpfApplication>().Initialize(); } private static void LogApplicationStartup() { var fvi = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location); //Log.Info("{0} {1} Startup", // Assembly.GetExecutingAssembly().GetName(), // fvi.ProductVersion); } private void InitializeIoC() { IoCConfiguration.RegisterRuntimeServices(); } } }