internal string ReadSettingString(SettingsNameEnum valuename) { DSSettings.SettingsRow[] rows = (DSSettings.SettingsRow[]) ds.Settings.Select("Name='" + valuename.ToString() + "'"); if (rows.Length == 0) { return(null); } else { return(rows[0].Content); } }
internal void WriteSetting(SettingsNameEnum valuename, string valuecontent) { DSSettings.SettingsRow[] rows = (DSSettings.SettingsRow[]) ds.Settings.Select("Name='" + valuename.ToString() + "'"); if (rows.Length == 0) { DSSettings.SettingsRow row = (DSSettings.SettingsRow) ds.Settings.NewRow(); row.Name = valuename.ToString(); row.Content = valuecontent; ds.Settings.AddSettingsRow(row); } else { DSSettings.SettingsRow row = rows[0]; row.Content = valuecontent; } ds.WriteXml(fileName); }
internal string ReadSettingString(SettingsNameEnum valuename) { DSSettings.SettingsRow[] rows = (DSSettings.SettingsRow[]) ds.Settings.Select("Name='" + valuename.ToString() + "'"); if (rows.Length == 0) { return null; } else { return rows[0].Content; } }
internal void WriteSetting(SettingsNameEnum valuename, string valuecontent) { DSSettings.SettingsRow[] rows = (DSSettings.SettingsRow[]) ds.Settings.Select("Name='" + valuename.ToString() + "'"); if (rows.Length == 0) { DSSettings.SettingsRow row = (DSSettings.SettingsRow) ds.Settings.NewRow(); row.Name = valuename.ToString(); row.Content = valuecontent; ds.Settings.AddSettingsRow(row); } else { DSSettings.SettingsRow row = rows[0]; row.Content = valuecontent; } ds.WriteXml(fileName); }