当前位置: 首页>>代码示例>>C#>>正文


C# PluginManager.LoadPlugins方法代码示例

本文整理汇总了C#中PluginManager.LoadPlugins方法的典型用法代码示例。如果您正苦于以下问题:C# PluginManager.LoadPlugins方法的具体用法?C# PluginManager.LoadPlugins怎么用?C# PluginManager.LoadPlugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginManager的用法示例。


在下文中一共展示了PluginManager.LoadPlugins方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

        internal static void Initialize()
        {
            if (mGlobalInstance == null)
            {
                mGlobalInstance = new PluginManager(true);
                mGlobalInstance.LoadPlugins(@"GlueView\Plugins");
            }

            if (mProjectInstance != null)
            {
                foreach (IPlugin plugin in ((PluginManager)mProjectInstance).mPluginContainers.Keys)
                {
                    ShutDownPlugin(plugin, PluginShutDownReason.GlueShutDown);
                }
            }

            mProjectInstance = new PluginManager(false);

            mInstances.Clear();
            mInstances.Add(mGlobalInstance);
            mInstances.Add(mProjectInstance);

            GluxManager.BeforeVariableSet += OnBeforeVariableSet;
            GluxManager.AfterVariableSet += OnAfterVariableSet;

            mProjectInstance.LoadPlugins(@"GlueView\Plugins");
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:27,代码来源:PluginManager.cs

示例2: PiscesForm

        public PiscesForm(string fileName)
        {
            m_pluginManager = new PluginManager();
            m_pluginManager.LoadPlugins();// loads assemblies into memory.

            InitializeComponent();
            InitializePisces(fileName);
            m_pluginManager.RegisterPlugins(this.contextMenuStripTree.Items["AddMenu"]);
            m_pluginManager.PluginClick += m_pluginManager_PluginClick;
            Enabling();
            
        }
开发者ID:usbr,项目名称:Pisces,代码行数:12,代码来源:PiscesForm.cs

示例3: RefreshPlugins

 private void RefreshPlugins()
 {
     pluginManager = container.Resolve<PluginManager<IDataSourcePlugin>>("DataSourcePlugin");
     pluginManager
         //.FindPluginsInFolder("MyPluginFolder")
         .LoadPlugins(plugin =>
         {
             // build the plugin UI.
             BuildUI(plugin);
             // Subscribe to the PluinDataSourceChange message.
             messengerHub.Subscribe<PluginDatasourceChange>((message) =>
             {
                 UpdateDataSourceInUI(message);
             }, new ControlInvokeTinyMessageProxy(this)); // ensure that this message is invoked on the UI thread.
         })
         .RefreshUsingFileSystemWatcher((sender, eventHandler) =>
         {
             messengerHub.Publish<NewPluginDetected>(new NewPluginDetected());
         });
 }
开发者ID:CodeFork,项目名称:Snapper-Plugin-Framework,代码行数:20,代码来源:SnapperDemoForm.cs

示例4: OptionsDialog_Load

        private void OptionsDialog_Load(object sender, EventArgs e)
        {
            var pManager = new PluginManager();
            pManager.LoadPlugins();

            foreach (var plugin in pManager.Plugins)
            {
                var title = ((AssemblyTitleAttribute)GetAssemblyAttribute(plugin.Assembly, typeof(AssemblyTitleAttribute))).Title;
                var author = ((AssemblyCompanyAttribute)GetAssemblyAttribute(plugin.Assembly, typeof(AssemblyCompanyAttribute))).Company;
                var version = plugin.Assembly.GetName().Version.ToString();

                var item = new ListViewItem(title);
                item.SubItems.Add(author);
                item.SubItems.Add(version);
                item.Checked = option.HiddenPlugins == null || !option.HiddenPlugins.Contains(title);

                lvPlugins.Items.Add(item);
            }

            // Load proxy options
            cbbProxyUsage.SelectedIndex = ConnectionManager.Instance.ConnectionsList.UseCustomProxy ? 2 : ConnectionManager.Instance.ConnectionsList.UseInternetExplorerProxy ? 1 : 0;
            rbCustomAuthYes.Checked = !ConnectionManager.Instance.ConnectionsList.UseDefaultCredentials;
            chkByPassProxyOnLocal.Checked = ConnectionManager.Instance.ConnectionsList.ByPassProxyOnLocal;
            txtProxyAddress.Text = ConnectionManager.Instance.ConnectionsList.ProxyAddress;
            txtProxyUser.Text = ConnectionManager.Instance.ConnectionsList.UserName;
            txtProxyPassword.Text = ConnectionManager.Instance.ConnectionsList.Password;
            cbbProxyUsage_SelectedIndexChanged(null, null);
        }
开发者ID:NielsMinnee,项目名称:XrmToolBox,代码行数:28,代码来源:OptionsDialog.cs


注:本文中的PluginManager.LoadPlugins方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。