I am trying to figure out how all the pieces work to use the settings functionality. I have a few specific settings I need to have access to in my app as well as an interface for the user to set them.
I created a subclass of mmAppConfiguration
public class TipTraxConfig : mmAppConfiguration
private string configFilePath = Application.StartupPath + @"\config\";
I added some public fields like
public string CompanyID = "WMT";
public string TruckID = "004";
public bool EnableCurbScale = true;
etc, etc...
In the constructor I have
this.SetConfigurationSection("TipTraxConfig");
this.ReadKeysFromConfig(configFilePath + "TipTrax.config");
Now I have a form that instantiates this class and accesses the fields just fine. But they are not written to the XML or retrieved from there. I need them to be persistent. I am obviously missing something.
TipTraxConfig config = new TipTraxConfig();
// Refresh from settings the text boxes
this.txtCompanyID.Text = config.CompanyID;
this.txtTruckID.Text = config.TruckID;
etc, etc...
I thought the above "ReadKeysFromConfig(configFilePath);" would be the mechanism to read these in from the config xml. Thanks for any help.
Tim
Timothy Bryan