public MainForm() { InitializeComponent(); initializing = false; // initialize the list of the plugins plugins = new List <IPluginInfo>(); // add the Dummy MT plugin to the list plugins.Add(PluginInfoFactory.Create(new TartuNLPPluginDirector())); // add other plugin directors // check the ModuleAttribute attributes checkModuleAttributes(plugins); if (plugins.Count > 0) { // set the environment for each plugin var environment = new DummyEnvironment(); foreach (var pluginInfo in plugins) { pluginInfo.SetEnvironment(environment); lbPlugins.Items.Add(pluginInfo); } lbPlugins.SelectedIndex = 0; populateLanguageSelectors(); } else { gbPluginDetails.Enabled = false; gbTranslation.Enabled = false; } }
public void SetEnvironment(DummyEnvironment environment) => Director.Environment = environment;