I'm working on an extension which uses a child window to collect configuration values via user controls. I now need to store & retrieve the configuration values. Documentation explains that ConfigurableType needs to be set to vanillastring to support a custom configuration design, but I'm struggling to figure out how to implement this.
If possible, please provide an example of a vanillastring implementation using a child window to collect configuration values.
Here's a snip of what I'm attempting within my child window namespace. This does save my string to the setting.txt file. Should I build a string of pipe delimited values and store in this way?
Note: This is just a test script to help me understand how this works. I will adjust so that I'm setting and recalling the config at the appropriate time once I have a good understanding.
Thank you,
Paul
If possible, please provide an example of a vanillastring implementation using a child window to collect configuration values.
Here's a snip of what I'm attempting within my child window namespace. This does save my string to the setting.txt file. Should I build a string of pipe delimited values and store in this way?
Note: This is just a test script to help me understand how this works. I will adjust so that I'm setting and recalling the config at the appropriate time once I have a good understanding.
CODE:
namespace WLStrategy.ChildWindows { public partial class MyConfig : Configurable { //Manually set the name public override string Name => "LeapFrogBI.StrategyRunner"; //We are using VanillaString configuration public override ConfigurableType ConfigurableType => ConfigurableType.VanillaString; //Manually set config key public override string ConfigKey => "LeapFrogBI.StrategyRunner"; //Set extension to configurable public override bool IsConfigurable => true; } //This child window will appear when the "Demo" menu item is selected under the WL7 Extensions menu public partial class StrategySelector : ChildWindow { //constructor public StrategySelector() { InitializeComponent(); Configurable Test = new MyConfig(); Test.Configuration = "My New Config."; Test.SaveConfig(); }
Thank you,
Paul
Rename
The string can be in whatever format you wish, pipe delimited would be fine. You just have to then decide it. I’ll work on setting up an example.
Your Response
Post
Edit Post
Login is required