Exemple #1
0
 public void UninstallPluginAssembly(PluginAssembly pa, bool fStatic)
 {
     foreach (PluginInformation information in pa.PluginInformations)
     {
         UnloadPluginInstance(information.PluginID, EndCode.Removed, fStatic);
         if (fStatic)
         {
             Plugin plugin;
             QTUtility.dicPluginShortcutKeys.Remove(information.PluginID);
             if ((information.PluginType == PluginType.Static) && dicStaticPluginInstances.TryGetValue(information.PluginID, out plugin))
             {
                 plugin.Close(EndCode.Removed);
                 dicStaticPluginInstances.Remove(information.PluginID);
             }
         }
     }
     if (fStatic)
     {
         dicPluginAssemblies.Remove(pa.Path);
         QTUtility.PluginShortcutKeysCache = (QTUtility.dicPluginShortcutKeys.Values
                                              .Where(numArray => numArray != null)
                                              .SelectMany(numArray => numArray)).ToArray();
         SavePluginShortcutKeys();
         pa.Uninstall();
         pa.Dispose();
     }
 }
Exemple #2
0
 public void UninstallPluginAssembly(PluginAssembly pa, bool fStatic)
 {
     foreach (PluginInformation information in pa.PluginInformations)
     {
         this.UnloadPluginInstance(information.PluginID, EndCode.Removed, fStatic);
         if (fStatic)
         {
             Plugin plugin;
             QTUtility.dicPluginShortcutKeys.Remove(information.PluginID);
             if ((information.PluginType == PluginType.Static) && dicStaticPluginInstances.TryGetValue(information.PluginID, out plugin))
             {
                 plugin.Close(EndCode.Removed);
                 dicStaticPluginInstances.Remove(information.PluginID);
             }
         }
     }
     if (fStatic)
     {
         dicPluginAssemblies.Remove(pa.Path);
         List <int> list = new List <int>();
         foreach (int[] numArray in QTUtility.dicPluginShortcutKeys.Values)
         {
             if (numArray != null)
             {
                 for (int i = 0; i < numArray.Length; i++)
                 {
                     list.Add(numArray[i]);
                 }
             }
         }
         QTUtility.PluginShortcutKeysCache = list.ToArray();
         SavePluginShortcutKeys();
         pa.Uninstall();
         pa.Dispose();
     }
 }
Exemple #3
0
        public static void UninstallPluginAssembly(PluginAssembly pa)
        {
            List <string> pids = pa.PluginInformations.Select(pi => pi.PluginID).ToList();

            InstanceManager.LocalTabBroadcast(tabbar => pids.ForEach(pid =>
                                                                     tabbar.pluginServer.UnloadPluginInstance(pid, EndCode.Removed)));

            foreach (PluginInformation info in pa.PluginInformations)
            {
                Plugin plugin;
                if (!dicStaticPluginInstances.TryGetValue(info.PluginID, out plugin))
                {
                    continue;
                }
                if (info.PluginType == PluginType.Static)
                {
                    plugin.Close(EndCode.Removed);
                }
                dicStaticPluginInstances.Remove(info.PluginID);
            }
            dicPluginAssemblies.Remove(pa.Path);
            pa.Uninstall();
            pa.Dispose();
        }
 private void DeletePluginAssembly(PluginAssembly pa) {
     foreach(PluginInformation information in pa.PluginInformations) {
         RemovePluginShortcutKeys(information.PluginID);
     }
     if(lstPluginAssembliesUserAdded.Contains(pa)) {
         pa.Dispose();
         lstPluginAssembliesUserAdded.Remove(pa);
     }
 }
Exemple #5
0
        public static void UninstallPluginAssembly(PluginAssembly pa)
        {
            List<string> pids = pa.PluginInformations.Select(pi => pi.PluginID).ToList();
            InstanceManager.LocalTabBroadcast(tabbar => pids.ForEach(pid =>
                    tabbar.pluginServer.UnloadPluginInstance(pid, EndCode.Removed)));

            foreach(PluginInformation info in pa.PluginInformations) {
                Plugin plugin;
                if(!dicStaticPluginInstances.TryGetValue(info.PluginID, out plugin)) continue;
                if(info.PluginType == PluginType.Static) plugin.Close(EndCode.Removed);
                dicStaticPluginInstances.Remove(info.PluginID);
            }
            dicPluginAssemblies.Remove(pa.Path);
            pa.Uninstall();
            pa.Dispose();
        }