Exemple #1
0
 void _engine_PluginAdded(object sender, Framework.EventArguments.PluginEventArgs e)
 {
     if (e.Plugin is Framework.Interfaces.IPluginUIMainWindow)
     {
         e.Plugin.Closing += new Framework.EventArguments.PluginEventHandler(Plugin_Closing);
     }
 }
Exemple #2
0
        void Plugin_Closing(object sender, Framework.EventArguments.PluginEventArgs e)
        {
            _engine.PluginAdded -= new Framework.EventArguments.PluginEventHandler(_engine_PluginAdded);
            List <Framework.Interfaces.IPlugin> p = _engine.GetPlugin(Framework.PluginType.UIMainWindow);

            if (p == null || p.Count == 0 || (p.Count == 1 && p[0] == e.Plugin))
            {
                Close();
            }
        }