示例#1
0
 internal void OnPluginLoaded(object sender, PluginLoadedEventArgs e)
 {
     if (PluginLoaded != null)
     PluginLoaded(sender, e);
 }
示例#2
0
 private void OnNewPluginLoaded(object sender, PluginLoadedEventArgs e)
 {
     ListViewItem item = new ListViewItem();
        if (e.Instance.Plugin == null)
        {
     item.Text = System.IO.Path.GetFileNameWithoutExtension(e.Instance.Assembly.Location);
     item.SubItems.Add(e.Instance.AssemblyInfo.Author);
        }
        else
        {
     item.Text = e.Instance.Plugin.Name;
     item.SubItems.Add(e.Instance.Plugin.Author);
        }
        item.Checked = e.Instance.Plugin != null ||
     (Manager.ManagerLibrary.Settings.PluginApprovals.ContainsKey(
      e.Instance.AssemblyInfo.Guid) && Manager.ManagerLibrary.
      Settings.PluginApprovals[e.Instance.AssemblyInfo.Guid]
     );
        item.ImageIndex = e.Instance.AssemblyAuthenticode == null ? -1 : 0;
        item.Group = e.Instance.IsCore ? pluginsManager.Groups[0] :
     pluginsManager.Groups[1];
        item.SubItems.Add(e.Instance.Assembly.GetName().Version.ToString());
        item.SubItems.Add(e.Instance.Assembly.Location);
        item.Tag = e.Instance;
        pluginsManager.Items.Add(item);
 }