public ExternalsConfigurationComponentControl(ExternalsConfigurationComponent component)
        {
            InitializeComponent();

            _component = component;

            SortedList <string, ExternalType> externalTypes  = new SortedList <string, ExternalType>();
            ExternalFactoryExtensionPoint     extensionPoint = new ExternalFactoryExtensionPoint();

            foreach (IExternalFactory externalFactory in extensionPoint.CreateExtensions())
            {
                ExternalType externalType = new ExternalType(externalFactory);
                externalTypes.Add(externalType.ToString(), externalType);
            }
            _externalTypes = externalTypes.Values;

            foreach (ExternalType externalType in _externalTypes)
            {
                ToolStripMenuItem item = new ToolStripMenuItem(externalType.ToString());
                item.Tag    = externalType;
                item.Click += _mnuAdd_Click;
                _mnuExternalTypes.Items.Add(item);
            }

            ResetExternalList();
        }
		public ExternalsConfigurationComponentControl(ExternalsConfigurationComponent component)
		{
			InitializeComponent();

			_component = component;

			SortedList<string, ExternalType> externalTypes = new SortedList<string, ExternalType>();
			ExternalFactoryExtensionPoint extensionPoint = new ExternalFactoryExtensionPoint();
			foreach (IExternalFactory externalFactory in extensionPoint.CreateExtensions())
			{
				ExternalType externalType = new ExternalType(externalFactory);
				externalTypes.Add(externalType.ToString(), externalType);
			}
			_externalTypes = externalTypes.Values;

			foreach (ExternalType externalType in _externalTypes)
			{
				ToolStripMenuItem item = new ToolStripMenuItem(externalType.ToString());
				item.Tag = externalType;
				item.Click += _mnuAdd_Click;
				_mnuExternalTypes.Items.Add(item);
			}

			ResetExternalList();
		}
Example #3
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ExternalsConfigurationComponent)component;
 }
		public void SetComponent(IApplicationComponent component)
		{
			_component = (ExternalsConfigurationComponent) component;
		}