public ViewModelLocator() { var kernel = new StandardKernel(); kernel.Bind <IKeyboardService>().To <DefaultKeyboardService>(); if (ViewModelBase.IsInDesignModeStatic) { kernel.Bind <IConfigurationService>().To <DesignConfigurationService>(); kernel.Bind <INuiService>().To <MockNuiService>(); } else { kernel.Bind <IConfigurationService>().To <AppConfigConfigurationService>(); kernel.Bind <INuiService>().To <KinectNuiService>(); } nuiService = kernel.Get <INuiService>(); main = new MainViewModel( kernel.Get <IConfigurationService>(), nuiService, kernel.Get <IKeyboardService>()); boundingBox = new BoundingBoxViewModel( nuiService); explorer = new ExplorerViewModel( nuiService, kernel.Get <IConfigurationService>()); math = new MathViewModel(); }
public ViewModelLocator() { var kernel = new StandardKernel(); kernel.Bind<IKeyboardService>().To<DefaultKeyboardService>(); if (ViewModelBase.IsInDesignModeStatic) { kernel.Bind<IConfigurationService>().To<DesignConfigurationService>(); kernel.Bind<INuiService>().To<MockNuiService>(); } else { kernel.Bind<IConfigurationService>().To<AppConfigConfigurationService>(); kernel.Bind<INuiService>().To<KinectNuiService>(); } nuiService = kernel.Get<INuiService>(); main = new MainViewModel( kernel.Get<IConfigurationService>(), nuiService, kernel.Get<IKeyboardService>()); boundingBox = new BoundingBoxViewModel( nuiService); explorer = new ExplorerViewModel( nuiService, kernel.Get<IConfigurationService>()); math = new MathViewModel(); }