public AddonExampleEventSourceConfigPanel(AddonExampleEventSource source) { InitializeComponent(); this.source = source; this.config = source.Config; SetupControlProperties(); SetupConfigEventHandlers(); }
public static AddonExampleEventSourceConfig LoadConfig(IPluginConfig pluginConfig) { var result = new AddonExampleEventSourceConfig(); if (pluginConfig.EventSourceConfigs.ContainsKey("AddonExampleESConfig")) { var obj = pluginConfig.EventSourceConfigs["AddonExampleESConfig"]; if (obj.TryGetValue("ExampleString", out JToken value)) { result.ExampleString = value.ToString(); } } return(result); }
public override void LoadConfig(IPluginConfig config) { Config = AddonExampleEventSourceConfig.LoadConfig(config); }