public string cmb { get { return ((string)(this["cmb"])); } set { this["cmb"] = value; } }
<configSections> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="test_TextBox.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </sectionGroup> </configSections> <userSettings> <test_TextBox.Properties.Settings> <setting name="cmb" serializeAs="String"> <value /> </setting> </test_TextBox.Properties.Settings> </userSettings>
private void TXTvolt_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar==13) { if (!Properties.Settings.Default.cmb.Contains("," + TXTvolt.Text.TrimStart().TrimEnd().Trim() + ",")) { Properties.Settings.Default.cmb += TXTvolt.Text.TrimStart().TrimEnd().Trim() + ","; Properties.Settings.Default.Save(); } TXTvolt.Items.Add(TXTvolt.Text); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)