Example #1
0
        /// <summary>
        /// Builds a disabled <see cref="IConstOutputCell{TValue}"/>.
        /// </summary>
        /// <typeparam name="TValue">The type of value.</typeparam>
        /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
        /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
        /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
        /// <param name="validation">OPTIONAL validation to perform.  DEFAULT is no validation.</param>
        /// <param name="availabilityCheck">OPTIONAL availability check to perform.  DEFAULT is a cell with no availability check.</param>
        /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
        /// <returns>
        /// The cell.
        /// </returns>
        public static InputCell <TValue> CreateDisabledInput <TValue>(
            string id             = null,
            int?columnsSpanned    = null,
            string details        = null,
            Validation validation = null,
            AvailabilityCheck availabilityCheck   = null,
            ICellValueFormat <TValue> valueFormat = null,
            CellFormat format    = null,
            IHoverOver hoverOver = null)
        {
            var result = new InputCell <TValue>(id, columnsSpanned, details, validation, null, Availability.Disabled, availabilityCheck, null, null, valueFormat, format, hoverOver);

            return(result);
        }
Example #2
0
        /// <summary>
        /// Builds an <see cref="IConstOutputCell{TValue}"/>.
        /// </summary>
        /// <typeparam name="TValue">The type of value.</typeparam>
        /// <param name="value">The cell's value.</param>
        /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
        /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
        /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
        /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
        /// <param name="link">OPTIONAL link to some resource.  DEFAULT is no link.</param>
        /// <returns>
        /// The cell.
        /// </returns>
        public static ConstCell <TValue> CreateConst <TValue>(
            TValue value,
            string id          = null,
            int?columnsSpanned = null,
            string details     = null,
            ICellValueFormat <TValue> valueFormat = null,
            CellFormat format    = null,
            IHoverOver hoverOver = null,
            ILink link           = null)
        {
            var result = new ConstCell <TValue>(value, id, columnsSpanned, details, null, null, Availability.Enabled, null, null, valueFormat, format, hoverOver, link);

            return(result);
        }
Example #3
0
        /// <summary>
        /// Builds an <see cref="IOperationOutputCell{TValue}"/>.
        /// </summary>
        /// <typeparam name="TValue">The type of value.</typeparam>
        /// <param name="operation">The operation.</param>
        /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
        /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
        /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
        /// <param name="validation">OPTIONAL validation to perform.  DEFAULT is no validation.</param>
        /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
        /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
        /// <param name="link">OPTIONAL link to some resource.  DEFAULT is no link.</param>
        /// <returns>
        /// The cell.
        /// </returns>
        public static OperationCell <TValue> CreateOp <TValue>(
            IReturningOperation <TValue> operation,
            string id             = null,
            int?columnsSpanned    = null,
            string details        = null,
            Validation validation = null,
            ICellValueFormat <TValue> valueFormat = null,
            CellFormat format    = null,
            IHoverOver hoverOver = null,
            ILink link           = null)
        {
            var result = new OperationCell <TValue>(operation, id, columnsSpanned, details, validation, null, Availability.Enabled, null, null, null, valueFormat, format, hoverOver, link);

            return(result);
        }
        public InputCell <TValue> DeepCloneWithValueFormat(ICellValueFormat <TValue> valueFormat)
        {
            var result = new InputCell <TValue>(
                this.Id?.DeepClone(),
                this.ColumnsSpanned?.DeepClone(),
                this.Details?.DeepClone(),
                this.Validation?.DeepClone(),
                this.ValidationEvents?.DeepClone(),
                this.DefaultAvailability.DeepClone(),
                this.AvailabilityCheck?.DeepClone(),
                this.AvailabilityCheckEvents?.DeepClone(),
                this.InputEvents?.DeepClone(),
                valueFormat,
                this.Format?.DeepClone(),
                this.HoverOver?.DeepClone());

            return(result);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="InputCell{TValue}"/> class.
 /// </summary>
 /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
 /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
 /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
 /// <param name="validation">OPTIONAL validation to perform.  DEFAULT is no validation.</param>
 /// <param name="validationEvents">OPTIONAL events that record the validation of this cell.  DEFAULT is a cell that has not yet been validated.</param>
 /// <param name="defaultAvailability">OPTIONAL default availability of the cell (before <paramref name="availabilityCheck"/> is run).  DEFAULT is an enabled cell.</param>
 /// <param name="availabilityCheck">OPTIONAL availability check to perform.  DEFAULT is a cell with no availability check.</param>
 /// <param name="availabilityCheckEvents">OPTIONAL events that record the availability checks on this cell.  DEFAULT is a cell that has not yet had an availability check.</param>
 /// <param name="inputEvents">OPTIONAL events that record the manipulation of this cell's value.  DEFAULT is a cell with no inputted value.</param>
 /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
 /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
 /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
 public InputCell(
     string id             = null,
     int?columnsSpanned    = null,
     string details        = null,
     Validation validation = null,
     IReadOnlyList <CellValidationEventBase> validationEvents = null,
     Availability defaultAvailability    = Availability.Enabled,
     AvailabilityCheck availabilityCheck = null,
     IReadOnlyList <CellAvailabilityCheckEventBase> availabilityCheckEvents = null,
     IReadOnlyList <CellInputEventBase> inputEvents = null,
     ICellValueFormat <TValue> valueFormat          = null,
     CellFormat format    = null,
     IHoverOver hoverOver = null)
     : base(id, columnsSpanned, details, validation, validationEvents, defaultAvailability, availabilityCheck, availabilityCheckEvents, inputEvents)
 {
     this.ValueFormat = valueFormat;
     this.Format      = format;
     this.HoverOver   = hoverOver;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OperationCell{TValue}"/> class.
 /// </summary>
 /// <param name="operation">The operation.</param>
 /// <param name="id">OPTIONAL unique identifier of the cell.  DEFAULT is a cell with no unique identifier.</param>
 /// <param name="columnsSpanned">OPTIONAL number of columns spanned or null if none (cell occupies a single column).  DEFAULT is none.</param>
 /// <param name="details">OPTIONAL details about the cell.  DEFAULT is to omit any details.</param>
 /// <param name="validation">OPTIONAL validation to perform.  DEFAULT is no validation.</param>
 /// <param name="validationEvents">OPTIONAL events that record the validation of this cell.  DEFAULT is a cell that has not yet been validated.</param>
 /// <param name="defaultAvailability">OPTIONAL default availability of the cell (before <paramref name="availabilityCheck"/> is run).  DEFAULT is an enabled cell.</param>
 /// <param name="availabilityCheck">OPTIONAL availability check to perform.  DEFAULT is a cell with no availability check.</param>
 /// <param name="availabilityCheckEvents">OPTIONAL events that record the availability checks on this cell.  DEFAULT is a cell that has not yet had an availability check.</param>
 /// <param name="operationExecutionEvents">OPTIONAL events that record the execution of <paramref name="operation"/>.  DEFAULT is a cell who's operation has not yet been executed.</param>
 /// <param name="valueFormat">OPTIONAL format to apply to the cell value.  DEFAULT is to leave the format unchanged.</param>
 /// <param name="format">OPTIONAL format to apply to the cell.  DEFAULT is to leave the format unchanged.</param>
 /// <param name="hoverOver">OPTIONAL hover-over for the cell.  DEFAULT is no hover-over.</param>
 /// <param name="link">OPTIONAL link to some resource.  DEFAULT is no link.</param>
 public OperationCell(
     IReturningOperation <TValue> operation,
     string id             = null,
     int?columnsSpanned    = null,
     string details        = null,
     Validation validation = null,
     IReadOnlyList <CellValidationEventBase> validationEvents = null,
     Availability defaultAvailability    = Availability.Enabled,
     AvailabilityCheck availabilityCheck = null,
     IReadOnlyList <CellAvailabilityCheckEventBase> availabilityCheckEvents = null,
     IReadOnlyList <CellOpExecutionEventBase> operationExecutionEvents      = null,
     ICellValueFormat <TValue> valueFormat = null,
     CellFormat format    = null,
     IHoverOver hoverOver = null,
     ILink link           = null)
     : base(id, columnsSpanned, details, validation, validationEvents, defaultAvailability, availabilityCheck, availabilityCheckEvents, operation, operationExecutionEvents)
 {
     this.ValueFormat = valueFormat;
     this.Format      = format;
     this.HoverOver   = hoverOver;
     this.Link        = link;
 }