public string ToString(ITranslationManager tm) { var stringBuilder = new StringBuilder(); foreach (ListParam listParam in ListParam) { if (listParam.Enabled) { stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(listParam.Caption, IndicatorName), tm.TranslateIndicatorParam(listParam.Text, IndicatorName))); } } foreach (NumericParam numParam in NumParam) { if (numParam.Enabled) { stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(numParam.Caption, IndicatorName), numParam.ValueToString)); } } foreach (CheckParam checkParam in CheckParam) { if (checkParam.Enabled) { stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(checkParam.Caption, IndicatorName), (checkParam.Checked ? tm.T("Statistics", "Yes") : tm.T("Statistics", "No")))); } } return(stringBuilder.ToString()); }
public string ToString(ITranslationManager tm) { var stringBuilder = new StringBuilder(); foreach (ListParam listParam in ListParam) if (listParam.Enabled) stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(listParam.Caption, IndicatorName), tm.TranslateIndicatorParam(listParam.Text, IndicatorName))); foreach (NumericParam numParam in NumParam) if (numParam.Enabled) stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(numParam.Caption, IndicatorName), numParam.ValueToString)); foreach (CheckParam checkParam in CheckParam) if (checkParam.Enabled) stringBuilder.AppendLine( String.Format("{0}: {1}", tm.TranslateIndicatorParam(checkParam.Caption, IndicatorName), (checkParam.Checked ? tm.T("Statistics", "Yes") : tm.T("Statistics", "No")))); return stringBuilder.ToString(); }