internal TableControlRow(TableRowDefinition rowdefinition) : this()
        {
            Wrap = rowdefinition.multiLine;
            if (rowdefinition.appliesTo != null)
            {
                SelectedBy = EntrySelectedBy.Get(rowdefinition.appliesTo.referenceList);
            }
            foreach (TableRowItemDefinition itemdef in rowdefinition.rowItemDefinitionList)
            {
                FieldPropertyToken fpt = itemdef.formatTokenList[0] as FieldPropertyToken;
                TableControlColumn column;

                if (fpt != null)
                {
                    column = new TableControlColumn(fpt.expression.expressionValue, itemdef.alignment,
                                                    fpt.expression.isScriptBlock, fpt.fieldFormattingDirective.formatString);
                }
                else
                {
                    column = new TableControlColumn();
                }

                Columns.Add(column);
            }
        }
        private TableRowDefinitionBuilder AddItem(string value, DisplayEntryValueType entryType, Alignment alignment, string format)
        {
            if (string.IsNullOrEmpty(value))
            {
                throw PSTraceSource.NewArgumentException("value");
            }

            var tableControlColumn = new TableControlColumn(alignment, new DisplayEntry(value, entryType))
            {
                FormatString = format
            };

            _tcr.Columns.Add(tableControlColumn);

            return(this);
        }
Ejemplo n.º 3
0
 internal TableControlRow(TableRowDefinition rowdefinition)
 {
     this._columns = new List <TableControlColumn>();
     foreach (TableRowItemDefinition definition in rowdefinition.rowItemDefinitionList)
     {
         TableControlColumn column;
         FieldPropertyToken token = definition.formatTokenList[0] as FieldPropertyToken;
         if (token != null)
         {
             column = new TableControlColumn(token.expression.expressionValue, definition.alignment, token.expression.isScriptBlock);
         }
         else
         {
             column = new TableControlColumn();
         }
         this._columns.Add(column);
     }
 }
Ejemplo n.º 4
0
 internal TableControlRow(TableRowDefinition rowdefinition)
 {
     this._columns = new List<TableControlColumn>();
     foreach (TableRowItemDefinition definition in rowdefinition.rowItemDefinitionList)
     {
         TableControlColumn column;
         FieldPropertyToken token = definition.formatTokenList[0] as FieldPropertyToken;
         if (token != null)
         {
             column = new TableControlColumn(token.expression.expressionValue, definition.alignment, token.expression.isScriptBlock);
         }
         else
         {
             column = new TableControlColumn();
         }
         this._columns.Add(column);
     }
 }
Ejemplo n.º 5
0
        private TableRowDefinitionBuilder AddItem(string value, DisplayEntryValueType entryType, Alignment alignment, string format)
        {
            if (string.IsNullOrEmpty(value))
                throw PSTraceSource.NewArgumentException("value");

            var tableControlColumn = new TableControlColumn(alignment, new DisplayEntry(value, entryType))
            {
                FormatString = format
            };
            _tcr.Columns.Add(tableControlColumn);

            return this;
        }
Ejemplo n.º 6
0
        internal TableControlRow(TableRowDefinition rowdefinition) : this()
        {
            Wrap = rowdefinition.multiLine;
            if (rowdefinition.appliesTo != null)
            {
                SelectedBy = EntrySelectedBy.Get(rowdefinition.appliesTo.referenceList);
            }
            foreach (TableRowItemDefinition itemdef in rowdefinition.rowItemDefinitionList)
            {
                FieldPropertyToken fpt = itemdef.formatTokenList[0] as FieldPropertyToken;
                TableControlColumn column;

                if (fpt != null)
                {
                    column = new TableControlColumn(fpt.expression.expressionValue, itemdef.alignment,
                                    fpt.expression.isScriptBlock, fpt.fieldFormattingDirective.formatString);
                }
                else
                {
                    column = new TableControlColumn();
                }

                Columns.Add(column);
            }
        }