예제 #1
0
        public AddonExampleEventSourceConfigPanel(AddonExampleEventSource source)
        {
            InitializeComponent();

            this.source = source;
            this.config = source.Config;

            SetupControlProperties();
            SetupConfigEventHandlers();
        }
예제 #2
0
        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);
 }