Ejemplo n.º 1
0
		/// <summary>
		/// Constructs a Multi-cellrow table column with specific width factor but no comparison delegate.
		/// </summary>
		/// <param name="columnName">The identifying name of the column.</param>
		/// <param name="columnDisplayName">The display name of the column.</param>
		/// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
		/// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
		/// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
		/// <param name="cellRow">The cell row this column will be displayed in.</param>
		public TableColumn(
			string columnName, [param : Localizable(true)] string columnDisplayName,
			GetColumnValueDelegate<TItem, TColumn> valueGetter,
			SetColumnValueDelegate<TItem, TColumn> valueSetter,
			float widthFactor,
			int cellRow)
			: this(columnName, columnDisplayName, valueGetter, valueSetter, widthFactor, null, cellRow) {}
Ejemplo n.º 2
0
		/// <summary>
		/// Constructs a single-cellrow table column.
		/// </summary>
		/// <param name="columnName">The identifying name of the column.</param>
		/// <param name="columnDisplayName">The display name of the column.</param>
		/// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
		/// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
		/// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
		/// <param name="comparison">A custom comparison operator that is used for sorting based on this column.</param>
		public TableColumn(
			string columnName, [param : Localizable(true)] string columnDisplayName,
			GetColumnValueDelegate<TItem, TColumn> valueGetter,
			SetColumnValueDelegate<TItem, TColumn> valueSetter,
			float widthFactor,
			Comparison<TItem> comparison)
			: this(columnName, columnDisplayName, valueGetter, valueSetter, widthFactor, comparison, 0) {}
Ejemplo n.º 3
0
 /// <summary>
 /// Constructs a single-cellrow table column with specific width factor but no comparison delegate.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public TableColumn(
     [param: Localizable(true)] string columnName,
     GetColumnValueDelegate <TItem, TColumn> valueGetter,
     SetColumnValueDelegate <TItem, TColumn> valueSetter,
     float widthFactor)
     : this(columnName, valueGetter, valueSetter, widthFactor, null)
 {
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructs a single-cellrow table column with specific width factor but no comparison delegate.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public TableColumn(
     string columnName, string columnDisplayName,
     GetColumnValueDelegate <TItem, TColumn> valueGetter,
     SetColumnValueDelegate <TItem, TColumn> valueSetter,
     float widthFactor)
     : this(columnName, columnDisplayName, valueGetter, valueSetter, widthFactor, null)
 {
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Constructs a Multi-cellrow table column with specific width factor but no comparison delegate.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 /// <param name="cellRow">The cell row this column will be displayed in.</param>
 public TableColumn(
     string columnName,
     GetColumnValueDelegate <TItem, TColumn> valueGetter,
     SetColumnValueDelegate <TItem, TColumn> valueSetter,
     float widthFactor,
     int cellRow)
     : this(columnName, valueGetter, valueSetter, widthFactor, null, cellRow)
 {
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Constructs a single-cellrow table column.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 /// <param name="comparison">A custom comparison operator that is used for sorting based on this column.</param>
 public TableColumn(
     string columnName,
     GetColumnValueDelegate <TItem, TColumn> valueGetter,
     SetColumnValueDelegate <TItem, TColumn> valueSetter,
     float widthFactor,
     Comparison <TItem> comparison)
     : this(columnName, valueGetter, valueSetter, widthFactor, comparison, 0)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructs a multi-cellrow table column.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 /// <param name="comparison">A custom comparison operator that is used for sorting based on this column.</param>
 /// <param name="cellRow">The cell row this column will be displayed in.</param>
 public TableColumn(
     string columnName, string columnDisplayName,
     GetColumnValueDelegate <TItem, TColumn> valueGetter,
     SetColumnValueDelegate <TItem, TColumn> valueSetter,
     float widthFactor,
     Comparison <TItem> comparison,
     int cellRow)
     : base(columnName, columnDisplayName, typeof(TColumn), widthFactor, comparison, cellRow)
 {
     _valueGetter = valueGetter;
     _valueSetter = valueSetter;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constructs a read-only single-cellrow table column with no comparison delegate.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 public TableColumn(string columnName, string columnDisplayName, GetColumnValueDelegate <TItem, TColumn> valueGetter)
     : this(columnName, columnDisplayName, valueGetter, null, 1.0f, null)
 {
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Constructs a single-cellrow table column with no comparison delegate.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 public TableColumn(string columnName, GetColumnValueDelegate <TItem, TColumn> valueGetter, SetColumnValueDelegate <TItem, TColumn> valueSetter)
     : this(columnName, valueGetter, valueSetter, 1.0f, null)
 {
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Constructs a Multi-cellrow table column with no comparison delegate.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="valueSetter">A delegate that accepts an item and a value, and pushes the value to the item.  May be null if the column is read-only.</param>
 /// <param name="cellRow">The cell row this column will be displayed in.</param>
 public TableColumn(string columnName, string columnDisplayName, GetColumnValueDelegate <TItem, TColumn> valueGetter, SetColumnValueDelegate <TItem, TColumn> valueSetter, int cellRow)
     : this(columnName, columnDisplayName, valueGetter, valueSetter, 1.0f, null, cellRow)
 {
 }
Ejemplo n.º 11
0
		/// <summary>
		/// Constructs a read-only single-cellrow table column with no comparison delegate.
		/// </summary>
		/// <param name="columnName">The identifying name of the column.</param>
		/// <param name="columnDisplayName">The display name of the column.</param>
		/// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
		public TableColumn(string columnName, [param : Localizable(true)] string columnDisplayName, GetColumnValueDelegate<TItem, TColumn> valueGetter)
			: this(columnName, columnDisplayName, valueGetter, null, 1.0f, null) {}
Ejemplo n.º 12
0
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column with specific width factor.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public DateTimeTableColumn([param: Localizable(true)] string columnName, GetColumnValueDelegate <TItem, DateTime?> valueGetter, float widthFactor)
     : this(columnName, columnName, valueGetter, widthFactor)
 {
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column with specific width factor.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public DateTableColumn(string columnName, string columnDisplayName, GetColumnValueDelegate <TItem, DateTime?> valueGetter, float widthFactor)
     : base(columnName, columnDisplayName, valueGetter, widthFactor)
 {
     this.ValueFormatter = delegate(DateTime? value) { return(Format.Date(value)); };
 }
Ejemplo n.º 14
0
		/// <summary>
		/// Constructs a read-only Multi-cellrow table column with no comparison delegate.
		/// </summary>
		/// <param name="columnName">The name of the column.</param>
		/// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
		/// <param name="cellRow">The cell row this column will be display in.</param>
		public TableColumn([param : Localizable(true)] string columnName, GetColumnValueDelegate<TItem, TColumn> valueGetter, int cellRow)
			: this(columnName, valueGetter, null, 1.0f, null, cellRow) {}
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column with specific width factor.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public DateTimeTableColumn(string columnName, string columnDisplayName, GetColumnValueDelegate <TItem, DateTime?> valueGetter, float widthFactor)
     : base(columnName, columnDisplayName, valueGetter, widthFactor)
 {
     this.ValueFormatter = delegate(DateTime? value) { return(Format.DateTime(value)); };
     this.Comparison     = delegate(TItem item1, TItem item2) { return(Nullable.Compare(valueGetter(item1), valueGetter(item2))); };
 }
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 public DateTimeTableColumn(string columnName, string columnDisplayName, GetColumnValueDelegate <TItem, DateTime?> valueGetter)
     : this(columnName, columnDisplayName, valueGetter, 1.0f)
 {
 }
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column with specific width factor.
 /// </summary>
 /// <param name="columnName">The name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 /// <param name="widthFactor">A weighting factor that is applied to the width of the column.</param>
 public DateTimeTableColumn(string columnName, GetColumnValueDelegate <TItem, DateTime?> valueGetter, float widthFactor)
     : this(columnName, columnName, valueGetter, widthFactor)
 {
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Constructs a read-only single-cellrow DateTime table column.
 /// </summary>
 /// <param name="columnName">The identifying name of the column.</param>
 /// <param name="columnDisplayName">The display name of the column.</param>
 /// <param name="valueGetter">A delegate that accepts an item and pulls the column value from the item.</param>
 public DateTimeTableColumn(string columnName, [param: Localizable(true)] string columnDisplayName, GetColumnValueDelegate <TItem, DateTime?> valueGetter)
     : this(columnName, columnDisplayName, valueGetter, 1.0f)
 {
 }