예제 #1
0
        private void TreeOnKeyUp(object sender, KeyEventArgs keyEventArgs)
        {
            if (keyEventArgs.KeyCode == Keys.C && keyEventArgs.Control)
            {
                RDMPCommandFactory commandFactory = new RDMPCommandFactory();

                var command = commandFactory.Create(_tree.SelectedObject);

                if (command != null)
                {
                    Clipboard.SetDataObject(command);
                }
            }
        }
예제 #2
0
        public ActivateItems(ITheme theme, RefreshBus refreshBus, DockPanel mainDockPanel, IRDMPPlatformRepositoryServiceLocator repositoryLocator, WindowFactory windowFactory, WindowManager windowManager, ICheckNotifier globalErrorCheckNotifier)
        {
            Theme                    = theme;
            WindowFactory            = windowFactory;
            _mainDockPanel           = mainDockPanel;
            _windowManager           = windowManager;
            GlobalErrorCheckNotifier = globalErrorCheckNotifier;
            RepositoryLocator        = repositoryLocator;

            ServerDefaults = RepositoryLocator.CatalogueRepository.GetServerDefaults();

            //Shouldn't ever change externally to your session so doesn't need constantly refreshed
            FavouritesProvider = new FavouritesProvider(this, repositoryLocator.CatalogueRepository);

            RefreshBus = refreshBus;

            ConstructPluginChildProviders();

            UpdateChildProviders();
            RefreshBus.BeforePublish += (s, e) => UpdateChildProviders();

            //handle custom icons from plugin user interfaces in which
            CoreIconProvider = new DataExportIconProvider(repositoryLocator, PluginUserInterfaces.ToArray());

            SelectIMapsDirectlyToDatabaseTableDialog.ImageGetter = (model) => CoreIconProvider.GetImage(model);

            WindowArranger = new WindowArranger(this, _windowManager, _mainDockPanel);

            CommandFactory          = new RDMPCommandFactory();
            CommandExecutionFactory = new RDMPCommandExecutionFactory(this);

            ProblemProviders = new List <IProblemProvider>();
            ProblemProviders.Add(new DataExportProblemProvider());
            ProblemProviders.Add(new CatalogueProblemProvider());
            RefreshProblemProviders();

            RefreshBus.Subscribe(this);
        }