Пример #1
0
        public EditorApplication(IServiceProvider managerCollection, DataSourceProvider dataSources)
        {
            logger         = managerCollection.GetService <ILogger>();
            settings       = managerCollection.GetService <SettingsMan>();
            dataProvider   = managerCollection.GetService <IModelsProvider>();
            workspaceMan   = managerCollection.GetService <IWorkspaceMan>();
            dialogProvider = new Lazy <IDialogProvider>(() => managerCollection.GetService <IDialogProvider>());
            //DialogProvider = managerCollection.GetManager<IDialogProvider>();

            settings.Restore();
            this.managerCollection = managerCollection;
            this.dataSources       = dataSources;
        }
Пример #2
0
        public EditorApplicationVM(EditorApplication application, IServiceProvider managerCollection, IWorkspaceMan workspaceMan, SettingsMan settings, DbEntryEditorFactory dbEntryEditorFactory, IDialogProvider dialogProvider)
        {
            this.application          = application;
            this.managerCollection    = managerCollection;
            this.workspaceMan         = workspaceMan;
            this.settings             = settings;
            this.dbEntryEditorFactory = dbEntryEditorFactory;
            this.dialogProvider       = dialogProvider;

            lazyDbEditor = new Lazy <DbEditorVM>(() => managerCollection.GetService <DbEditorVM>());

            MenuItems = new BindingList <MenuItemVM>();

            Title = EditorApplication.APP_NAME;
        }