mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-03 14:34:08 +02:00
Seal PluginConfig and add a method to disable official plugins from config
This commit is contained in:
parent
21354e675a
commit
b729dca2e5
@ -4,7 +4,7 @@
|
||||
|
||||
namespace TweetDck.Plugins{
|
||||
[Serializable]
|
||||
class PluginConfig{
|
||||
sealed class PluginConfig{
|
||||
[field:NonSerialized]
|
||||
public event EventHandler<PluginChangedStateEventArgs> PluginChangedState;
|
||||
|
||||
@ -33,5 +33,9 @@ public void SetEnabled(Plugin plugin, bool enabled){
|
||||
public bool IsEnabled(Plugin plugin){
|
||||
return !Disabled.Contains(plugin.Identifier) && plugin.CanRun;
|
||||
}
|
||||
|
||||
public void DisableOfficialFromConfig(string pluginName){
|
||||
Disabled.Add("official/"+pluginName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user