Example #1
0
        public void SetChildContentRecursive(IEnumerable <AbstractNode> contentEnum)
        {
            contentEnum = contentEnum ?? new AbstractNode[0];

            int index = 0;

            foreach (AbstractNode content in contentEnum)
            {
                // Add or overwrite existing items
                if (index < ChildRows.Count)
                {
                    // Overwrite
                    ((DynamicTreeDebuggerRow)ChildRows[index]).SetContentRecursive(content);
                }
                else
                {
                    // Add
                    ChildRows.Add(new DynamicTreeDebuggerRow(process, content));
                }
                index++;
            }
            int count = index;

            // Delete other nodes
            while (ChildRows.Count > count)
            {
                ChildRows.RemoveAt(count);
            }
        }
Example #2
0
 public void addChildRow(VirtualGridRow row)
 {
     if (!ChildRows.Contains(row))
     {
         ChildRows.Add(row);
         row.ParentRow = this;
     }
 }
Example #3
0
 public override void Dispose()
 {
     if (Parent != null)
     {
         ////Используем локальную переменную, чтобы не затирать DataRow.WTPCOMPONENT_PARENTID
         //Parent.PropertyChanged -= Parent_PropertyChanged;
         Parent = null;
     }
     ChildComponents.Dispose();
     ChildRows.Clear();
     ChildRows.Dispose();
     base.Dispose();
 }
Example #4
0
        private void AgregarRenglon()
        {
            //Agregar detalle de la factura.

            ChildRows = (DataRowView)bsitem.AddNew();
            ChildRows.BeginEdit();
            ChildRows["numero"]        = txt_numero_despacho.Text;
            ChildRows["cant"]          = 0;
            ChildRows["ratio"]         = 0;
            ChildRows["width"]         = 0;
            ChildRows["msi"]           = 0;
            ChildRows["kilo_rollo"]    = 0;
            ChildRows["precio"]        = 0.0;
            ChildRows["total_renglon"] = 0;
            ChildRows.Row.SetParentRow(ParentRow.Row);
            ChildRows.EndEdit();
            bsitem.Position = bsitem.Count - 1;
            ContadorRegistros();
        }
Example #5
0
File: Row.cs Project: lzroc/Vixen
 public bool IsTreeActive()
 {
     return(ChildRows.Any(x => !x.IsEmpty || x.IsTreeActive()));
 }
Example #6
0
File: Row.cs Project: lzroc/Vixen
 public void RemoveChildRow(Row row)
 {
     ChildRows.Remove(row);
     row.ParentRow = null;
 }
Example #7
0
File: Row.cs Project: lzroc/Vixen
 public void AddChildRow(Row row)
 {
     ChildRows.Add(row);
     row.ParentRow = this;
     row.Visible   = TreeOpen;
 }
Example #8
0
 public WTPRow[] GetChildRows()
 {
     return(ChildRows.ToArray());
 }