using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DTS.Slice.PedestrianAndHeadReports { /// /// this is a helper class for internal information in the report /// mostly these are just filled in information by the end user before producing the report /// public class ReportProperty { /// /// id, should be unique, this way if the report is serialized as a setup we have a handy way of identifying properties and values ... /// in practice in the Pedestrian and Head report this is the Field enum, as all our properties are fields /// protected string _Id; public string Id { get { return _Id; } } /// /// what to display the property as, if it's displayed /// private string _displayName; public string DisplayName { get; set; } /// /// property value /// private string _value; public string Value { get { return _value; } } /// /// sets the value of the property /// /// public void SetValue(string value) { _value = value; } /// /// the possible values for the property. /// null if the value is enterred by end user, or a list of values if a drop down is used /// private string[] _possibleValues; /// /// returns all the possible values for a property. /// null if value is enterred manually by enduser, or a list of strings if user selects from a list /// /// public string[] GetAvailableValues() { return _possibleValues; } /// /// sets the possible values for a property /// /// public void SetAvailableValues(string[] values) { _possibleValues = values; } /// /// constructs a report property with a given name, display, and values /// /// /// /// /// public ReportProperty(string id, string displayname, string[] possibleValues, Type propertyType) { _Id = id; _possibleValues = possibleValues; _displayName = displayname; _type = propertyType; } /// /// the System.Type of the property value /// the value must be serializable as string, but this indicates what the value actually is natively /// private Type _type; } }