public GroupStatusRow AddGroupStatusRow(GroupRow parentGroupRowByGroupGroupStatus, int SessionsCount, int OutQueueSize, int QueuedItemsSize, int MaxProcessQueueEntries) {
     GroupStatusRow rowGroupStatusRow = ((GroupStatusRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             SessionsCount,
             OutQueueSize,
             QueuedItemsSize,
             MaxProcessQueueEntries};
     if ((parentGroupRowByGroupGroupStatus != null)) {
         columnValuesArray[0] = parentGroupRowByGroupGroupStatus[0];
     }
     rowGroupStatusRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowGroupStatusRow);
     return rowGroupStatusRow;
 }
 public GroupRowChangeEvent(GroupRow row, global::System.Data.DataRowAction action) {
     this.eventRow = row;
     this.eventAction = action;
 }
 public GroupProcessClassesRow AddGroupProcessClassesRow(GroupRow parentGroupRowByGroupGroupProcessClasses, ProcessClassRow parentProcessClassRowByProcessClassGroupProcessClasses) {
     GroupProcessClassesRow rowGroupProcessClassesRow = ((GroupProcessClassesRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             null,
             null};
     if ((parentGroupRowByGroupGroupProcessClasses != null)) {
         columnValuesArray[1] = parentGroupRowByGroupGroupProcessClasses[0];
     }
     if ((parentProcessClassRowByProcessClassGroupProcessClasses != null)) {
         columnValuesArray[2] = parentProcessClassRowByProcessClassGroupProcessClasses[0];
     }
     rowGroupProcessClassesRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowGroupProcessClassesRow);
     return rowGroupProcessClassesRow;
 }
 public GroupForwardFlagsRow AddGroupForwardFlagsRow(GroupRow parentGroupRowByGroupGroupForwardFlags, MessageRow parentMessageRowByMessageGroupForwardFlags, bool ResponseRequired, bool IgnoreResponse, bool ForwardToAll) {
     GroupForwardFlagsRow rowGroupForwardFlagsRow = ((GroupForwardFlagsRow)(this.NewRow()));
     object[] columnValuesArray = new object[] {
             null,
             null,
             null,
             ResponseRequired,
             IgnoreResponse,
             ForwardToAll};
     if ((parentGroupRowByGroupGroupForwardFlags != null)) {
         columnValuesArray[1] = parentGroupRowByGroupGroupForwardFlags[0];
     }
     if ((parentMessageRowByMessageGroupForwardFlags != null)) {
         columnValuesArray[2] = parentMessageRowByMessageGroupForwardFlags[0];
     }
     rowGroupForwardFlagsRow.ItemArray = columnValuesArray;
     this.Rows.Add(rowGroupForwardFlagsRow);
     return rowGroupForwardFlagsRow;
 }
 public void RemoveGroupRow(GroupRow row) {
     this.Rows.Remove(row);
 }
 public void AddGroupRow(GroupRow row) {
     this.Rows.Add(row);
 }
Пример #7
0
        // creates the element that represents a tree node
        FrameworkElement CreateTreeNode(C1FlexGrid flex, GroupRow row)
        {
            var g = new Grid();

            for (int i = 0; i <= row.Level; i++)
            {
                var cd = new ColumnDefinition();
                cd.Width = new GridLength(flex.TreeIndent);
                g.ColumnDefinitions.Add(cd);
            }

            // icon connectors (left and up)
            if (row.Level > 0)
            {
                var rc = CreateConnector(flex.TreeIndent, _connThickness);
                rc.HorizontalAlignment = HorizontalAlignment.Left;
                rc.VerticalAlignment   = VerticalAlignment.Center;
                rc.Margin = new Thickness(flex.TreeIndent / 2, 0, 0, 0);
                rc.SetValue(Grid.ColumnProperty, row.Level - 1);
                rc.SetValue(Grid.ColumnSpanProperty, 2);
                g.Children.Add(rc);

                rc = CreateConnector(_connThickness, row.ActualHeight / 2);
                rc.HorizontalAlignment = HorizontalAlignment.Center;
                rc.VerticalAlignment   = VerticalAlignment.Top;
                rc.SetValue(Grid.ColumnProperty, row.Level - 1);
                g.Children.Add(rc);
            }

            // icon connector (down)
            if (row.HasChildren && !row.IsCollapsed)
            {
                var rc = CreateConnector(_connThickness, row.ActualHeight / 2);
                rc.HorizontalAlignment = HorizontalAlignment.Center;
                rc.VerticalAlignment   = VerticalAlignment.Bottom;
                rc.SetValue(Grid.ColumnProperty, row.Level);
                g.Children.Add(rc);
            }

            // inter-node connectors
            for (int i = row.Level; i > 0; i--)
            {
                if (CheckNodeAfter(row, i))
                {
                    var rc = CreateConnector(_connThickness, row.ActualHeight);
                    rc.HorizontalAlignment = HorizontalAlignment.Center;
                    rc.VerticalAlignment   = VerticalAlignment.Top;
                    rc.SetValue(Grid.ColumnProperty, i - 1);
                    g.Children.Add(rc);
                }
            }

            // icon
            var nodeIcon = new Image();

            nodeIcon.Source =
                row.HasChildren == false ? _bmpNoChildren :
                row.IsCollapsed ? _bmpCollapsed : _bmpExpanded;
            nodeIcon.Stretch = Stretch.None;
            nodeIcon.SetValue(Grid.ColumnProperty, row.Level + 1);
            g.Children.Add(nodeIcon);
            if (row.HasChildren)
            {
                nodeIcon.MouseLeftButtonDown += (s, e) => { row.IsCollapsed = !row.IsCollapsed; };
            }

            // done
            g.Margin = new Thickness(0, 0, 4, 0);
            return(g);
        }