Calling Save doesn't do anything without a field in the settings to actually store the data in, and your code changing that setting first - you also have to load the settign value into your code when you load the from.
For example:
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
{
if ((ModifierKeys & Keys.Shift) == 0)
{
this.SaveLocation();
}
Properties.Settings.Default.UptoFirstComma = cbUpToFirstComma.Checked;
Properties.Settings.Default.Save();
}
And
private void FrmMain_Shown(object sender, EventArgs e)
{
cbUpToFirstComma.Checked = Properties.Settings.Default.UptoFirstComma;
}
But if you are using a collection, then you probably don't want to store it in Settings - a data file may be a lot more appropriate, since there is only one set of
Properties.Settings
per application / assembly.
I don't know what data you are trying to store, or how often it gets changed, but you might want to work out your data flow before going this route, and decide if you should use an external file (XML, JSON, or even CSV) instead, or if a full database would be more appropriate. We can't make that decision for you!