Пример #1
0
        public override void Load()
        {
            Bind <IApplicationService>().ToConstant(_applicationService = Kernel.Get <ApplicationService>());
            Bind <IStorageService>().ToConstant(_storageService         = Kernel.Get <StorageService>());
            Bind <ISettingsService>().ToConstant(_settingsService       = Kernel.Get <SettingsService>());
            Bind <ISiteService>().ToConstant(_siteService = Kernel.Get <SiteService>());

            Bind <CuoUri>().ToSelf();
            Bind <ShellForm>().ToSelf().InSingletonScope();
            Bind <ShellController>().ToSelf().InSingletonScope();

            _shellForm       = Kernel.Get <ShellForm>();
            _shellController = Kernel.Get <ShellController>();

            Bind <IShell>().ToConstant(_shellForm);
            Bind <IShellController>().ToConstant(_shellController);

            Bind <PatcherForm>().ToSelf();
            Bind <SplashScreen>().ToSelf();
            Bind <AboutControl>().ToSelf();
            Bind <SettingsControl>().ToSelf();
            Bind <NavigationControl>().ToSelf();
            Bind <EditLocalServerControl>().ToSelf();
            Bind <LocalServerListControl>().ToSelf();
            Bind <PublicServerListControl>().ToSelf();
            Bind <FavoritesServerListControl>().ToSelf();
        }
Пример #2
0
        public override void Load()
        {
            Bind<IApplicationService>().ToConstant(_applicationService = Kernel.Get<ApplicationService>());
            Bind<IStorageService>().ToConstant(_storageService = Kernel.Get<StorageService>());
            Bind<ISettingsService>().ToConstant(_settingsService = Kernel.Get<SettingsService>());
            Bind<ISiteService>().ToConstant(_siteService = Kernel.Get<SiteService>());

            Bind<CuoUri>().ToSelf();
            Bind<ShellForm>().ToSelf().InSingletonScope();
            Bind<ShellController>().ToSelf().InSingletonScope();

            _shellForm = Kernel.Get<ShellForm>();
            _shellController = Kernel.Get<ShellController>();

            Bind<IShell>().ToConstant(_shellForm);
            Bind<IShellController>().ToConstant(_shellController);

            Bind<PatcherForm>().ToSelf();
            Bind<SplashScreen>().ToSelf();
            Bind<AboutControl>().ToSelf();
            Bind<SettingsControl>().ToSelf();
            Bind<NavigationControl>().ToSelf();
            Bind<EditLocalServerControl>().ToSelf();
            Bind<LocalServerListControl>().ToSelf();
            Bind<PublicServerListControl>().ToSelf();
            Bind<FavoritesServerListControl>().ToSelf();
        }