Пример #1
0
        private void PluginComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string pluginName = PluginComboBox.GetItemText(PluginComboBox.SelectedItem);

            factory = plugin.GetPlugin(pluginName);
            creator = (ICreate)Activator.CreateInstance(factory);
        }
Пример #2
0
        private void PluginComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            string pluginName = PluginComboBox.GetItemText(PluginComboBox.SelectedItem);

            currentFactory = plugin.GetPluginType(pluginName);
            currentCreator = (ICreator)Activator.CreateInstance(currentFactory);
            currentFigure  = currentCreator.Create(color, fillColor, penWidth);

            StateChange(currentCreator);
        }