public bool SaveConfig(CfgData config) { var userConfigFile = new CfgFile(GameConstants.GetUserConfigPath(_currentGame.RootFolderPath)); if (_userConfigLanguage != null) { config.AddOrUpdateRow(GameConstants.CurrentLanguageKey, _userConfigLanguage); } return(userConfigFile.Save(config)); }
private void miCopySetting_Click(object sender, EventArgs e) { if (cmGameSetting.SourceControl is ISettingControl setting) { var cfgData = new CfgData(); cfgData.AddCommentRow(setting.Model.Name); cfgData.AddOrUpdateRow(setting.Model.Key, setting.Value); Clipboard.SetText(cfgData.ToString()); } }