コード例 #1
0
 /// <summary>
 /// Creates an item group.
 /// </summary>
 /// <param name="groupName">A control that contains the name of the group and any other information you want in the group head</param>
 /// <param name="groupActions">Group action buttons</param>
 /// <param name="groupHeadClickScript">The click script for the group head</param>
 /// <param name="items">The items</param>
 public ColumnPrimaryItemGroup(Control groupName, IEnumerable <Tuple <string, Action> > groupActions = null, ClickScript groupHeadClickScript = null,
                               IEnumerable <EwfTableItem> items = null)
 {
     GroupName            = groupName;
     GroupActions         = (groupActions ?? new Tuple <string, Action> [0]).ToList().AsReadOnly();
     GroupHeadClickScript = groupHeadClickScript;
     Items = (items ?? new EwfTableItem[0]).ToList().AsReadOnly();
 }
コード例 #2
0
 /// <summary>
 /// Creates an item group.
 /// </summary>
 /// <param name="groupName">A control that contains the name of the group and any other information you want in the group head</param>
 /// <param name="groupActions">Group action buttons</param>
 /// <param name="groupHeadClickScript">The click script for the group head</param>
 /// <param name="items">The items</param>
 public ColumnPrimaryItemGroup( Control groupName, IEnumerable<Tuple<string, Action>> groupActions = null, ClickScript groupHeadClickScript = null,
     IEnumerable<EwfTableItem> items = null)
 {
     GroupName = groupName;
     GroupActions = ( groupActions ?? new Tuple<string, Action>[0] ).ToList().AsReadOnly();
     GroupHeadClickScript = groupHeadClickScript;
     Items = ( items ?? new EwfTableItem[0] ).ToList().AsReadOnly();
 }
 /// <summary>
 /// Creates a remaining data object.
 /// </summary>
 /// <param name="groupName">A control that contains the name of the group and any other information you want in the group head</param>
 /// <param name="groupActions">Group action buttons</param>
 /// <param name="groupHeadClickScript">The click script for the group head</param>
 /// <param name="initiallyCollapsed">Whether the group is initially collapsed. Null means the group cannot be collapsed and is always visible.</param>
 public EwfTableItemGroupRemainingData( Control groupName, IEnumerable<Tuple<string, Action>> groupActions = null, ClickScript groupHeadClickScript = null,
     bool? initiallyCollapsed = null)
 {
     GroupName = groupName;
     GroupActions = ( groupActions ?? new Tuple<string, Action>[0] ).ToList().AsReadOnly();
     GroupHeadClickScript = groupHeadClickScript;
     InitiallyCollapsed = initiallyCollapsed;
 }
コード例 #4
0
 /// <summary>
 /// Creates a remaining data object.
 /// </summary>
 /// <param name="groupName">A control that contains the name of the group and any other information you want in the group head</param>
 /// <param name="groupActions">Group action buttons</param>
 /// <param name="groupHeadClickScript">The click script for the group head</param>
 /// <param name="initiallyCollapsed">Whether the group is initially collapsed. Null means the group cannot be collapsed and is always visible.</param>
 /// <param name="tailUpdateRegions">The tail update regions for the group. If a table uses item limiting, these regions will include all subsequent item
 /// groups in the table. This is necessary because any number of items could be appended to this item group, potentially causing subsequent item groups to
 /// become invisible.</param>
 public EwfTableItemGroupRemainingData(
     Control groupName, IEnumerable <Tuple <string, Action> > groupActions = null, ClickScript groupHeadClickScript = null, bool?initiallyCollapsed = null,
     IEnumerable <TailUpdateRegion> tailUpdateRegions = null)
 {
     GroupName            = groupName;
     GroupActions         = (groupActions ?? new Tuple <string, Action> [0]).ToList().AsReadOnly();
     GroupHeadClickScript = groupHeadClickScript;
     InitiallyCollapsed   = initiallyCollapsed;
     TailUpdateRegions    = tailUpdateRegions != null?tailUpdateRegions.ToImmutableArray() : ImmutableArray <TailUpdateRegion> .Empty;
 }
 /// <summary>
 /// Creates a remaining data object.
 /// </summary>
 /// <param name="groupName">A control that contains the name of the group and any other information you want in the group head</param>
 /// <param name="groupActions">Group action buttons</param>
 /// <param name="groupHeadClickScript">The click script for the group head</param>
 /// <param name="initiallyCollapsed">Whether the group is initially collapsed. Null means the group cannot be collapsed and is always visible.</param>
 /// <param name="tailUpdateRegions">The tail update regions for the group. If a table uses item limiting, these regions will include all subsequent item
 /// groups in the table. This is necessary because any number of items could be appended to this item group, potentially causing subsequent item groups to
 /// become invisible.</param>
 public EwfTableItemGroupRemainingData(
     Control groupName, IEnumerable<Tuple<string, Action>> groupActions = null, ClickScript groupHeadClickScript = null, bool? initiallyCollapsed = null,
     IEnumerable<TailUpdateRegion> tailUpdateRegions = null)
 {
     GroupName = groupName;
     GroupActions = ( groupActions ?? new Tuple<string, Action>[ 0 ] ).ToList().AsReadOnly();
     GroupHeadClickScript = groupHeadClickScript;
     InitiallyCollapsed = initiallyCollapsed;
     TailUpdateRegions = tailUpdateRegions != null ? tailUpdateRegions.ToImmutableArray() : ImmutableArray<TailUpdateRegion>.Empty;
 }
コード例 #6
0
 internal EwfTableFieldOrItemSetup(IEnumerable <string> classes, Unit?size, TextAlignment textAlignment, TableCellVerticalAlignment verticalAlignment,
                                   ClickScript clickScript, string toolTip, Control toolTipControl)
 {
     Classes           = (classes ?? new string[0]).ToList();
     Size              = size ?? Unit.Empty;
     TextAlignment     = textAlignment;
     VerticalAlignment = verticalAlignment;
     ClickScript       = clickScript;
     ToolTip           = toolTip;
     ToolTipControl    = toolTipControl;
 }
コード例 #7
0
 internal EwfTableFieldOrItemSetup( IEnumerable<string> classes, Unit? size, TextAlignment textAlignment, TableCellVerticalAlignment verticalAlignment,
     ClickScript clickScript, string toolTip, Control toolTipControl)
 {
     Classes = ( classes ?? new string[0] ).ToList();
     Size = size ?? Unit.Empty;
     TextAlignment = textAlignment;
     VerticalAlignment = verticalAlignment;
     ClickScript = clickScript;
     ToolTip = toolTip;
     ToolTipControl = toolTipControl;
 }
コード例 #8
0
 /// <summary>
 /// Creates a cell setup object.
 /// </summary>
 /// <param name="fieldSpan">The number of fields this cell will span.
 /// NOTE: Don't allow this to be less than one. Zero is allowed by the HTML spec but is too difficult for us to implement right now.
 /// </param>
 /// <param name="itemSpan">The number of items this cell will span.
 /// NOTE: Don't allow this to be less than one. Zero is allowed by the HTML spec but is too difficult for us to implement right now.
 /// </param>
 /// <param name="classes">The CSS class(es).</param>
 /// <param name="textAlignment">The text alignment of the cell.</param>
 /// <param name="clickScript">The click script.</param>
 /// <param name="toolTip">The tool tip to display. Setting ToolTipControl will ignore this property. Do not pass null.</param>
 /// <param name="toolTipControl">The control to display inside the tool tip. This will ignore the ToolTip property.</param>
 public TableCellSetup(
     int fieldSpan = 1, int itemSpan = 1, IEnumerable<string> classes = null, TextAlignment textAlignment = TextAlignment.NotSpecified,
     ClickScript clickScript = null, string toolTip = "", Control toolTipControl = null)
 {
     FieldSpan = fieldSpan;
     ItemSpan = itemSpan;
     Classes = classes ?? new string[ 0 ];
     TextAlignment = textAlignment;
     ClickScript = clickScript;
     ToolTip = toolTip;
     ToolTipControl = toolTipControl;
 }
コード例 #9
0
        /// <summary>
        /// Creates an item setup object.
        /// </summary>
        /// <param name="classes">The CSS class(es). When used on a column, sets the class on every cell since most styles don't work on col elements.</param>
        /// <param name="size">The height or width. For an EWF table, this is the row height. For a column primary table, this is the column width. If you specify
        /// percentage widths for some or all columns in a table, these values need not add up to 100; they will be automatically scaled if necessary. The automatic
        /// scaling will not happen if there are any columns without a specified width.</param>
        /// <param name="textAlignment">The text alignment of the cells in this item.</param>
        /// <param name="verticalAlignment">The vertical alignment of the cells in this item.</param>
        /// <param name="clickScript">The click script.</param>
        /// <param name="toolTip">The tool tip to display. Setting ToolTipControl will ignore this property. Do not pass null.</param>
        /// <param name="toolTipControl">The control to display inside the tool tip. This will ignore the ToolTip property.</param>
        /// <param name="tableLevelItemActions">The list of table level item actions. Each item must have either a null list or a list with the same actions in the
        /// same order as all other items in the table.</param>
        /// <param name="groupLevelItemActions">The list of group level item actions. Each item must have either a null list or a list with the same actions in the
        /// same order as all other items in the group.</param>
        /// <param name="rankId">
        /// The rank ID for this item. Swapping will be enabled for all items that have a non null rank ID. Setting this on at least one item of a table adds a
        /// column on the right of the table containing controls to move each item up or down the list. This consumes a small amount of table width.
        /// </param>
        // NOTE: Change the Tuples to named types here.
        public EwfTableItemSetup( IEnumerable<string> classes = null, Unit? size = null, TextAlignment textAlignment = TextAlignment.NotSpecified,
            TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, ClickScript clickScript = null,
            string toolTip = "", Control toolTipControl = null, IEnumerable<Tuple<string, Action>> tableLevelItemActions = null,
            IEnumerable<Tuple<string, Action>> groupLevelItemActions = null, int? rankId = null)
        {
            FieldOrItemSetup = new EwfTableFieldOrItemSetup( classes, size, textAlignment, verticalAlignment, clickScript, toolTip, toolTipControl );

            if( tableLevelItemActions != null ) {
                var tableLevelItemActionList = tableLevelItemActions.ToList();
                if( !tableLevelItemActionList.Any() )
                    throw new ApplicationException();
                TableLevelItemActions = tableLevelItemActionList.AsReadOnly();
            }

            if( groupLevelItemActions != null ) {
                var groupLevelItemActionList = groupLevelItemActions.ToList();
                if( !groupLevelItemActionList.Any() )
                    throw new ApplicationException();
                GroupLevelItemActions = groupLevelItemActionList.AsReadOnly();
            }

            RankId = rankId;
        }
コード例 #10
0
 /// <summary>
 /// Creates a table field.
 /// </summary>
 /// <param name="classes">The CSS class(es). When used on a column, sets the class on every cell since most styles don't work on col elements.</param>
 /// <param name="size">The height or width. For an EWF table, this is the column width. For a column primary table, this is the row height. If you specify
 /// percentage widths for some or all columns in a table, these values need not add up to 100; they will be automatically scaled if necessary. The automatic
 /// scaling will not happen if there are any columns without a specified width.</param>
 /// <param name="textAlignment">The text alignment of the cells in this field.</param>
 /// <param name="verticalAlignment">The vertical alignment of the cells in this field.</param>
 /// <param name="clickScript">The click script.</param>
 /// <param name="toolTip">The tool tip to display. Setting ToolTipControl will ignore this property. Do not pass null.</param>
 /// <param name="toolTipControl">The control to display inside the tool tip. This will ignore the ToolTip property.</param>
 public EwfTableField( IEnumerable<string> classes = null, Unit? size = null, TextAlignment textAlignment = TextAlignment.NotSpecified,
     TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, ClickScript clickScript = null,
     string toolTip = "", Control toolTipControl = null)
 {
     FieldOrItemSetup = new EwfTableFieldOrItemSetup( classes, size, textAlignment, verticalAlignment, clickScript, toolTip, toolTipControl );
 }
コード例 #11
0
        /// <summary>
        /// Creates an item setup object.
        /// </summary>
        /// <param name="classes">The CSS class(es). When used on a column, sets the class on every cell since most styles don't work on col elements.</param>
        /// <param name="size">The height or width. For an EWF table, this is the row height. For a column primary table, this is the column width. If you specify
        /// percentage widths for some or all columns in a table, these values need not add up to 100; they will be automatically scaled if necessary. The automatic
        /// scaling will not happen if there are any columns without a specified width.</param>
        /// <param name="textAlignment">The text alignment of the cells in this item.</param>
        /// <param name="verticalAlignment">The vertical alignment of the cells in this item.</param>
        /// <param name="clickScript">The click script.</param>
        /// <param name="toolTip">The tool tip to display. Setting ToolTipControl will ignore this property. Do not pass null.</param>
        /// <param name="toolTipControl">The control to display inside the tool tip. This will ignore the ToolTip property.</param>
        /// <param name="tableLevelItemActions">The list of table level item actions. Each item must have either a null list or a list with the same actions in the
        /// same order as all other items in the table.</param>
        /// <param name="groupLevelItemActions">The list of group level item actions. Each item must have either a null list or a list with the same actions in the
        /// same order as all other items in the group.</param>
        /// <param name="rankId">
        /// The rank ID for this item. Swapping will be enabled for all items that have a non null rank ID. Setting this on at least one item of a table adds a
        /// column on the right of the table containing controls to move each item up or down the list. This consumes a small amount of table width.
        /// </param>
        // NOTE: Change the Tuples to named types here.
        public EwfTableItemSetup(IEnumerable <string> classes = null, Unit?size = null, TextAlignment textAlignment = TextAlignment.NotSpecified,
                                 TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, ClickScript clickScript = null,
                                 string toolTip = "", Control toolTipControl = null, IEnumerable <Tuple <string, Action> > tableLevelItemActions = null,
                                 IEnumerable <Tuple <string, Action> > groupLevelItemActions = null, int?rankId = null)
        {
            FieldOrItemSetup = new EwfTableFieldOrItemSetup(classes, size, textAlignment, verticalAlignment, clickScript, toolTip, toolTipControl);

            if (tableLevelItemActions != null)
            {
                var tableLevelItemActionList = tableLevelItemActions.ToList();
                if (!tableLevelItemActionList.Any())
                {
                    throw new ApplicationException();
                }
                TableLevelItemActions = tableLevelItemActionList.AsReadOnly();
            }

            if (groupLevelItemActions != null)
            {
                var groupLevelItemActionList = groupLevelItemActions.ToList();
                if (!groupLevelItemActionList.Any())
                {
                    throw new ApplicationException();
                }
                GroupLevelItemActions = groupLevelItemActionList.AsReadOnly();
            }

            RankId = rankId;
        }
コード例 #12
0
 /// <summary>
 /// Creates a table field.
 /// </summary>
 /// <param name="classes">The CSS class(es). When used on a column, sets the class on every cell since most styles don't work on col elements.</param>
 /// <param name="size">The height or width. For an EWF table, this is the column width. For a column primary table, this is the row height. If you specify
 /// percentage widths for some or all columns in a table, these values need not add up to 100; they will be automatically scaled if necessary. The automatic
 /// scaling will not happen if there are any columns without a specified width.</param>
 /// <param name="textAlignment">The text alignment of the cells in this field.</param>
 /// <param name="verticalAlignment">The vertical alignment of the cells in this field.</param>
 /// <param name="clickScript">The click script.</param>
 /// <param name="toolTip">The tool tip to display. Setting ToolTipControl will ignore this property. Do not pass null.</param>
 /// <param name="toolTipControl">The control to display inside the tool tip. This will ignore the ToolTip property.</param>
 public EwfTableField(IEnumerable <string> classes = null, Unit?size = null, TextAlignment textAlignment = TextAlignment.NotSpecified,
                      TableCellVerticalAlignment verticalAlignment = TableCellVerticalAlignment.NotSpecified, ClickScript clickScript = null,
                      string toolTip = "", Control toolTipControl = null)
 {
     FieldOrItemSetup = new EwfTableFieldOrItemSetup(classes, size, textAlignment, verticalAlignment, clickScript, toolTip, toolTipControl);
 }