public void Start(IBundleContext context) { Bundle = context.Bundle; var navigationFactory = new NavigationServiceFactory(context); context.AddService <INavigationServiceFactory>(navigationFactory); context.AddService <INavigationService>(navigationFactory.CreateNavigationService("UIShell.NavigationService")); PermissionServiceTracker = new ServiceTracker <IPermissionService>(context); }
public void Start(IBundleContext context) { SetVisualApplicationSettings(); context.AddService <Form>(mainForm); context.AddService <IWorkspace>(mainForm); var extensionManager = context.GetFirstOrDefaultService <IExtensionManager>(); extensionManager.ExtensionChanged += extensionManager_ExtensionChanged; }
public void Start(IBundleContext context) { context.BundleStateChanged += context_BundleStateChanged; //provide the container builder so that each plugin can register the dependancy when starting. var containerBuilder = BundleRuntime.Instance.Initialize(); //Register active bundle assemblies. foreach (var bundle in context.Framework.Bundles) { if (bundle.State == BundleState.Active) { var service = BundleRuntime.Instance.GetFirstOrDefaultService <IRuntimeService>(); var assemblies = service.LoadBundleAssembly(bundle.SymbolicName); RegisterBundleAssemblies(bundle.BundleID, containerBuilder, assemblies); } } if (BundleRuntime.Instance.State == BundleRuntimeState.Started) { BundleRuntime.Instance.Complete(); } else if (BundleRuntime.Instance.State == BundleRuntimeState.Starting) { context.FrameworkStateChanged += context_FrameworkStateChanged; } context.AddService(typeof(IControllerResolver), new ControllerResolver()); }
public void Start(IBundleContext context) { Context = context; ExtensionService = context.GetFirstOrDefaultService<IExtensionService>(); WeChatProxyContainer = new WeChatProxyContainer(); WeChatMenuContainer = new WeChatMenuContainer(); WeChatProxyService = new WeChatProxyService(); context.AddService<IWeChatProxyService>(WeChatProxyService); }
public void Start(IBundleContext context) { Context = context; ExtensionService = context.GetFirstOrDefaultService <IExtensionService>(); WeChatProxyContainer = new WeChatProxyContainer(); WeChatMenuContainer = new WeChatMenuContainer(); WeChatProxyService = new WeChatProxyService(); context.AddService <IWeChatProxyService>(WeChatProxyService); }
public void Start(IBundleContext context) { var splashForm = new SplashForm(Resources.Splashscreen); splashForm.Show(); context.AddService(typeof(IWPFUIElementAdapter), new WPFUIElementAdapter()); var layoutView = new ShellLayoutView(); context.AddService <IWorkspace>(layoutView.Workspace); context.AddService(layoutView.CreateShellLayoutViewProxy()); var form = new ShellForm(); context.AddService <Form>(form); form.ShowLayoutIvew(layoutView); form.Activated += (sender, e) => splashForm.Close(); }
public void Start(IBundleContext context) { Bundle = context.Bundle; var userDataAccessor = new UserDataAccessor(); userDataAccessor.CreateDefaultSystemManager(); PermissionServiceTracker = new ServiceTracker <IPermissionService>(context); PermissionExtensionModelServiceTracker = new ServiceTracker <IPermissionExtensionModelService>(context); ConfigurationServiceTracker = new ServiceTracker <IConfigurationService>(context); MainWindowServiceTracker = new ServiceTracker <IMainWindowService>(context); context.AddService <Window>(new LoginWindow()); }
public void Start(IBundleContext context) { _context = context; context.AddService <ICommandBusService>( new CommandBusService(context.GetFirstOrDefaultService <IMessageBusService>())); var factory = new AdapterFactoryCatalog <IEditHandler>(); factory.RegisterFactory(new TextBoxAdapterFactory()); context.AddService <IAdapterFactoryCatalog <IEditHandler> >(factory); context.AddService <IEditManager>(new EditManager(factory)); context.AddService <IDocumentManager>(new DocumentManager()); var layoutView = context.GetFirstOrDefaultService <IShellLayoutView>(); _extensionManager = context.GetFirstOrDefaultService <IExtensionManager>(); _extensionHooker = new ExtensionHooker(_extensionManager); var extensionChangeHandler = new ExtensionChangeHandler(new ToolStripBuilder(), toolStrip => layoutView.AddToolStrip((ToolStrip)toolStrip), toolStrip => layoutView.RemoveToolStrip((ToolStrip)toolStrip)); _extensionHooker.HookExtension(ExtensionPointNames.ToolStrip, extensionChangeHandler); extensionChangeHandler = new ExtensionChangeHandler(new MainMenuBuilder(), toolStripItem => layoutView.AddMenuItem((ToolStripItem)toolStripItem), toolStripItem => layoutView.RemoveMenuItem((ToolStripItem)toolStripItem)); _extensionHooker.HookExtension(ExtensionPointNames.MainMenu, extensionChangeHandler); var docManager = _context.GetFirstOrDefaultService <IDocumentManager>(); extensionChangeHandler = new ExtensionChangeHandler(new FileFilterBuilder(), documentFactory => docManager.Register((IDocumentFactory)documentFactory), documentFactory => docManager.UnRegister((IDocumentFactory)documentFactory)); _extensionHooker.HookExtension(ExtensionPointNames.FileFilters, extensionChangeHandler); StartActiveControlMonitor(); }
public void Start(IBundleContext context) { context.AddService <IExtensionService>(new ExtensionService()); ExtensionProviderHandler = new ExtensionProviderHandler(context.Bundle); }
public void Start(IBundleContext context) { //todo: context.AddService <ISqlite3Helper>(new Sqlite3Helper()); }
public void Start(IBundleContext context) { //todo: context.AddService<ISqlite3Helper>(new Sqlite3Helper()); }
public void Start(IBundleContext context) { context.AddService <IMessageBusService>(new InProcMessageBus()); }
public void Start(IBundleContext context) { context.AddService <IUserRUIDAppService>(new AppService.UserRUIDAppService()); }
public void Start(IBundleContext context) { _mainForm = new MainForm(); context.AddService<Form>(_mainForm); }
public void Start(IBundleContext context) { context.AddService <IWindow>(new MainWindow()); }
public void Start(IBundleContext context) { context.AddService<IExtensionService>(new ExtensionService()); ExtensionProviderHandler = new ExtensionProviderHandler(context.Bundle); }
public void Start(IBundleContext context) { context.AddService <IConfigurationService>(new ConfigurationService()); }
public void Start(IBundleContext context) { _mainForm = new MainForm(); context.AddService <Form>(_mainForm); }