From 60e4311f144a22736dd38be0648df67ff9bfe3bf Mon Sep 17 00:00:00 2001 From: Peter Forstmeier Date: Fri, 25 Mar 2011 09:24:54 +0100 Subject: [PATCH] small cleanup --- .../ListStrategy/CollectionStrategy.cs | 23 +++++++++---------- .../AggregateFunctions/AggregateFunction.cs | 2 +- .../Project/Globals/GlobalLists.cs | 4 +--- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs index 353afbf1e7..6b90ae174d 100644 --- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs +++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/DataManager/ListStrategy/CollectionStrategy.cs @@ -288,27 +288,26 @@ namespace ICSharpCode.Reports.Core { public override CurrentItemsCollection FillDataRow(int pos) { CurrentItemsCollection ci = new CurrentItemsCollection(); - var current = CurrentFromPosition(pos); - if (current != null) + var obj = CurrentFromPosition(pos); + if (obj != null) { - CurrentItem c = null; + CurrentItem currentItem = null; foreach (PropertyDescriptor pd in this.listProperties) { - c = new CurrentItem(); - c.ColumnName = pd.Name; - c.DataType = pd.PropertyType; + currentItem = new CurrentItem(); + currentItem.ColumnName = pd.Name; + currentItem.DataType = pd.PropertyType; - //var s = pd.GetValue(current); - var s = FollowPropertyPath(current,pd.Name); - if (s != null) + var propValue = FollowPropertyPath(obj,pd.Name); + if (propValue != null) { - c.Value = s.ToString(); + currentItem.Value = propValue.ToString(); } else { - c.Value = String.Empty; + currentItem.Value = String.Empty; } - ci.Add(c); + ci.Add(currentItem); } } return ci; diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs index 428e736bda..124a1edfa9 100644 --- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs +++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Expressions/SimpleExpressionEvaluator/Compilation/Functions/AggregateFunctions/AggregateFunction.cs @@ -118,7 +118,7 @@ namespace SimpleExpressionEvaluator.Compilation.Functions.AggregateFunctions if (currentItem != null) { object s1 = Convert.ToString(currentItem.Value.ToString(),CultureInfo.CurrentCulture); - Console.WriteLine("\tvalue = {0}", s1.ToString()); + Console.WriteLine("\tSetup DataSource value = {0}", s1.ToString()); if (IsNumeric(s1)) { list.Add(Convert.ToDouble(s1,System.Globalization.CultureInfo.CurrentCulture)); } else { diff --git a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs index dca4cf5572..ad90812056 100644 --- a/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs +++ b/src/AddIns/Misc/Reports/ICSharpCode.Reports.Core/Project/Globals/GlobalLists.cs @@ -105,8 +105,7 @@ namespace ICSharpCode.Reports.Core.Globals #endregion - /// - /// + #region Zoom public static string[] ZoomValues () @@ -128,7 +127,6 @@ namespace ICSharpCode.Reports.Core.Globals "50%", "25%"}; - #endregion