/// <summary>
        /// Initializes a new instance of the <see cref="ConfigWindow" /> class.
        /// </summary>
        /// <param name="configuration">The configuration.</param>
        /// <param name="newConnectorPlugin">The new connector plugin.</param>
        public ConfigWindow(ApplicationConfiguration configuration, IConnectorPlugin newConnectorPlugin)
            : this(configuration)
        {
            this.newConnectorPlugin = newConnectorPlugin;
            this.configurationViewModel.SingleConnectorMode    = true;
            this.configurationViewModel.SingleNewConnectorMode = true;

            this.FocusConnectorsPage();
        }
Beispiel #2
0
 public void LoadPlugins(string directory)
 {
     LOG.Info("Loading plugins from directory: " + directory);
     foreach (string csFile in GetAllCsFiles(directory))
     {
         IConnectorPlugin plugin = TryLoadPlugin(csFile);
         if (plugin != null)
         {
             loadedPlugins.Add(plugin);
             LOG.Info("Successfully loaded plugin: " + plugin.GetType().Name);
         }
         else
         {
             LOG.Info("Plugin has not been loaded due to previous errors: " + directory);
         }
     }
     LOG.Info("Done loading plugins from directory: " + directory);
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="ConnectorsPage" /> class.
        /// Also, creates a new connector;
        /// </summary>
        /// <param name="connectors">The connectors.</param>
        /// <param name="ownerWindow">The owner <see cref="Window" />.</param>
        /// <param name="newConnectorPlugin">The new connector plugin.</param>
        public ConnectorsPage(ConnectorViewModelCollection connectors, Window ownerWindow, IConnectorPlugin newConnectorPlugin)
            : this(connectors, ownerWindow)
        {
            this.currentConnector = new ConnectorViewModel();

            // TODO move to connector view model/model
            this.currentConnector.SourceConnectorPlugin = newConnectorPlugin;
            this.currentConnector.Name = string.Empty;
            this.currentConnector.Load(null);
            this.Connectors.Add(this.currentConnector);
            this.InitialFocusedConnectorViewModel = this.currentConnector;

            this.InitilizeConnectorNameTextEditBinding();
        }