Example #1
0
        /// <summary>
        /// 已重载
        /// </summary>
        /// <param name="itemType"></param>
        /// <returns></returns>
        protected override object CreateInstance(Type itemType)
        {
            PluginSelectorForm form = new PluginSelectorForm();

            form.Plugins = PluginManager.AllHttpPlugins;
            form.ShowDialog();
            if (form.SelectedItem != null)
            {
                PluginConfig pc = form.SelectedItem;
                form.Dispose();
                return(pc);
            }
            form.Dispose();
            return(null);
        }
Example #2
0
        /// <summary>
        /// 已重载
        /// </summary>
        /// <param name="itemType"></param>
        /// <returns></returns>
        protected override Object CreateInstance(Type itemType)
        {
            var form = new PluginSelectorForm
            {
                Plugins = PluginManager.AllPlugins
            };

            form.ShowDialog();
            if (form.SelectedItem != null)
            {
                var pc = form.SelectedItem;
                form.Dispose();
                return(pc);
            }
            form.Dispose();
            return(null);
        }