예제 #1
0
 private void SetupMainWindowContent(IBindableIocService service)
 {
     service.Bind <Application>().To <App>().FixResult(i => ((App)i).InitializeComponent()).AsSingleton();
     service.RegisterHomeViewModel <HomeScreenViewModel>();
     service.Bind <RootNavigationWindow>().And <Window>().And <IRootNavigationWindow>()
     .ToSelf().FixResult(SetIcon).AsSingleton();
 }
예제 #2
0
 private static void RegisterWindows(IBindableIocService service)
 {
     service.RegisterHomeViewModel <RootViewModel>();
     service.Bind <INavigationWindow>().To <NavigationWindow>().AsSingleton();
     service.Bind <IRootNavigationWindow>()
     .And <Window>()
     .To <RootNavigationWindow>()
     .AsSingleton();
     service.Bind <IWindowMessageSource>().To <WindowMessageSource>().AsSingleton();
 }
예제 #3
0
        protected override void RegisterWithIocContainer(IBindableIocService service)
        {
            service.AddLogging();
            // window selectors
            service.Bind <IFileViewerFactory>().To <NugetManagerViewModelFactory>();
            service.Bind <IFileViewerFactory>().To <SecretManagerViewModelFactory>();

            // Root Window
            service.Bind <INavigationWindow>().To <NavigationWindow>().AsSingleton();
            service.Bind <RootNavigationWindow>().And <Window>().And <IRootNavigationWindow>()
            .ToSelf().FixResult(SetIcon).AsSingleton();
            service.RegisterHomeViewModel <FileLoadViewModel>();

            // System Services
            service.Bind <IStartupData>().To <StartupData>()
            .WithParameters(new object[] { CommandLineParameters })
            .AsSingleton();
            service.Bind <IOpenSaveFile>().To <OpenSaveFileAdapter>();
        }
예제 #4
0
        protected override void RegisterWithIocContainer(IBindableIocService service)
        {
            service.AddLogging();
            service.Bind <SamplesTreeViewModel>().ToSelf().AsSingleton();
            service.RegisterHomeViewModel <SamplesTreeViewModel>();
            service.Bind <IRootNavigationWindow>()
            .And <Window>()
            .To <RootNavigationWindow>()
            .AsSingleton();
            service.Bind <DisposableDependency>().ToSelf().AsScoped();
            service.Bind <IWindowMessageSource>().To <WindowMessageSource>().AsSingleton();

            // pedal reader
            service.Bind <IMonitorForDeviceArrival>().To <MonitorForDeviceArrival>()
            .AsSingleton().DoNotDispose();
            service.Bind <ITranscriptonPedal>().To <TranscriptonPedal>()
            .DoNotDispose();
            service.Bind <IDetectThumbDrive>().To <DetectThumbDrive>().AsSingleton().DoNotDispose();
        }
예제 #5
0
 protected override void RegisterWithIocContainer(IBindableIocService service)
 {
     service.RegisterHomeViewModel <HomeViewModel>();
 }
 public static IActivationOptions <IHomeViewModelFactory> RegisterHomeViewModel <T>(
     this IBindableIocService ioc) => ioc.RegisterHomeViewModel(i => i.Get <T>());