public void Set(ReportSettings.Strings item, string val) { switch (item) { case ReportSettings.Strings.EmptyResultString: MyEmptyResultString = val; break; case ReportSettings.Strings.ReportType: MyReportType = val; break; case ReportSettings.Strings.ResultTableType: MyResultTableType = val; break; case ReportSettings.Strings.FilePath: MyFilePath = val; break; case ReportSettings.Strings.FileName: MyFileName = val; break; default: throw new Exception("Attempting to set unknown report setting."); } }
public string Get(ReportSettings.Strings item) { switch (item) { case ReportSettings.Strings.EmptyResultString: return(MyEmptyResultString); case ReportSettings.Strings.ReportType: return(MyReportType); case ReportSettings.Strings.ResultTableType: return(MyResultTableType); case ReportSettings.Strings.FilePath: return(MyFilePath); case ReportSettings.Strings.FileName: return(MyFileName); default: throw new Exception("Attempting to get unknown report setting."); } }