void chCtrl_OnEditorOpen(object sender, EventArgs e) { foreach (var plugin in PluginChannels.SelectMany(x => x.AllPlugins)) { if (!plugin.Equals(sender)) { plugin.CloseEditor(); } } }
/// <summary> /// Registers the provided <see cref="PluginChannel"/> to listen /// for and send plugin messages. /// </summary> public void RegisterPluginChannel(PluginChannel channel) { PluginChannels.Add(channel.Channel, channel); channel.ChannelRegistered(this); }