/// <summary> /// Link control with INI key. Value/Text of control will be automatically tracked and INI file updated. /// </summary> void UpdateSettingsMap() { // INI setting keys with controls. SettingManager.Current.ConfigSaved += new EventHandler <SettingEventArgs>(Current_ConfigSaved); SettingManager.Current.ConfigLoaded += new EventHandler <SettingEventArgs>(Current_ConfigLoaded); OptionsPanel.InitSettingsManager(); var sm = SettingManager.Current.SettingsMap; for (int i = 0; i < ControlPads.Length; i++) { var map = ControlPads[i].SettingsMap; foreach (var key in map.Keys) { sm.Add(key, map[key]); } } }