Пример #1
0
        private void OnPluginLoad(object sender, PluginLoadEventArgs e)
        {
            //If the plugin does not have an approval or denial, check for the presence of
            //a valid signature.
            IDictionary <Guid, bool> approvals = Settings.PluginApprovals;

            if (!approvals.ContainsKey(e.Plugin.AssemblyInfo.Guid) &&
                (e.Plugin.Assembly.GetName().GetPublicKey().Length == 0 ||
                 !Security.VerifyStrongName(e.Plugin.Assembly.Location) ||
                 e.Plugin.AssemblyAuthenticode == null))
            {
                e.Load = false;
            }

            //Is there an approval or denial?
            else if (approvals.ContainsKey(e.Plugin.AssemblyInfo.Guid))
            {
                e.Load = approvals[e.Plugin.AssemblyInfo.Guid];
            }

            //There's no approval or denial, what is the specified loading policy?
            else
            {
                e.Load = e.Plugin.LoadingPolicy != PluginLoadingPolicy.DefaultOff;
            }
        }
Пример #2
0
 private void OnPluginLoadEvent(PluginLoadEventArgs e)
 {
     if (PluginLoadEvent != null)
     {
         PluginLoadEvent(this, e);
     }
 }
 private void OnPluginLoadEvent(PluginLoadEventArgs e)
 {
     if (PluginLoadEvent != null)
         PluginLoadEvent(this, e);
 }
Пример #4
0
 private void plugins_Reloaded(object sender, PluginLoadEventArgs e)
 {
     ReloadBrowser();
 }
Пример #5
0
 private void pluginManager_Reloaded(object sender, PluginLoadEventArgs e)
 {
     tabBtnOfficial.Text = "Official: " + pluginManager.CountPluginByGroup(PluginGroup.Official);
     tabBtnCustom.Text   = "Custom: " + pluginManager.CountPluginByGroup(PluginGroup.Custom);
 }