Exemplo n.º 1
0
 public void Close(bool fInteractive)
 {
     this.iRefCount--;
     if (this.iClosingCount == 0)
     {
         this.pluginServer.ClearEvents();
     }
     foreach (Plugin plugin in this.dicPluginInstances.Values)
     {
         if ((plugin.PluginInformation != null) && (fInteractive ^ (plugin.PluginInformation.PluginType != PluginType.Interactive)))
         {
             plugin.Close(EndCode.WindowClosed);
         }
     }
     if (!fInteractive)
     {
         this.plgIFilter    = null;
         this.plgFilterCore = null;
     }
     if (this.iRefCount == 0)
     {
         this.dicPluginInstances.Clear();
         this.pluginServer.Dispose();
         this.pluginServer = null;
     }
     this.iClosingCount++;
 }
Exemplo n.º 2
0
 private void LoadStartupPlugins()
 {
     foreach (PluginInformation information in PluginInformations)
     {
         if (!information.Enabled)
         {
             continue;
         }
         if (information.PluginType == PluginType.Background)
         {
             Plugin plugin = this.Load(information, null);
             if (plugin != null)
             {
                 if (this.plgIFilter == null)
                 {
                     this.plgIFilter = plugin.Instance as QTPlugin.IFilter;
                 }
                 if (this.plgFilterCore == null)
                 {
                     this.plgFilterCore = plugin.Instance as QTPlugin.IFilterCore;
                 }
             }
             else
             {
                 information.Enabled = false;
             }
             continue;
         }
         if ((information.PluginType == PluginType.BackgroundMultiple) && (this.Load(information, null) == null))
         {
             information.Enabled = false;
         }
     }
 }
Exemplo n.º 3
0
 public void RefreshPluginAssembly(PluginAssembly pa, bool fStatic)
 {
     foreach (PluginInformation information in pa.PluginInformations)
     {
         if (!information.Enabled)
         {
             this.UnloadPluginInstance(information.PluginID, EndCode.Unloaded, fStatic);
             continue;
         }
         if (information.PluginType == PluginType.Background)
         {
             if (!this.PluginInstantialized(information.PluginID))
             {
                 Plugin plugin = this.Load(information, pa);
                 if (plugin != null)
                 {
                     if (this.plgIFilter == null)
                     {
                         this.plgIFilter = plugin.Instance as QTPlugin.IFilter;
                     }
                     if (this.plgFilterCore == null)
                     {
                         this.plgFilterCore = plugin.Instance as QTPlugin.IFilterCore;
                     }
                 }
                 else
                 {
                     information.Enabled = false;
                 }
             }
             continue;
         }
         if (information.PluginType == PluginType.BackgroundMultiple)
         {
             if (!this.PluginInstantialized(information.PluginID) && (this.Load(information, pa) == null))
             {
                 information.Enabled = false;
             }
         }
         else if ((fStatic && (information.PluginType == PluginType.Static)) && !dicStaticPluginInstances.ContainsKey(information.PluginID))
         {
             LoadStatics(information, pa, false);
         }
     }
 }
Exemplo n.º 4
0
 public void ClearFilterEngines()
 {
     this.plgIFilter    = null;
     this.plgFilterCore = null;
 }