/// <summary>
 /// Clears all subnodes.
 /// </summary>
 internal void Clear()
 {
     _parentNode = null;
     //If a group is collapsed the rows will not appear. Then if we clear the group the rows should not remain "collapsed"
     for (int i = 0; i < subNodes.Count; i++)
     {
         subNodes[i].Collapsed = false;
     }
     subNodes.Clear();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Determines if there is a parent node or a parent group collapsed.
 /// </summary>
 /// <param name="row">The specified row.</param>
 /// <param name="i">The i.</param>
 /// <returns></returns>
 public bool IsAParentNodeOrGroupCollapsed(OutlookGridRow row, int i)
 {
     i++;
     //Console.WriteLine(row.ToString());
     if (row.ParentNode != null)
     {
         //if it is not the original group but it is one parent and if it is collapsed just stop here
         //no need to look further to the parents (one of the parents can be expanded...)
         if (row.ParentNode.Collapsed)
         {
             return(true);
         }
         else
         {
             return(IsAParentNodeOrGroupCollapsed(row.ParentNode, i));
         }
     }
     else //no parent
     {
         if (i == 1) //if 1 that means there is no parent
         {
             return(false);
         }
         else //return the final parent collapsed state
         {
             if (row.group != null)
             {
                 return(row.Collapsed || (row.group.Collapsed || IsAParentCollapsed(row.group, 0)));
             }
             else
             {
                 return(row.Collapsed);
             }
         }
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="OutlookGridRowNodeCollection"/> class.
 /// </summary>
 /// <param name="parentNode">The parent node.</param>
 public OutlookGridRowNodeCollection(OutlookGridRow parentNode)
 {
     _parentNode = parentNode;
     subNodes    = new List <OutlookGridRow>();
 }
 /// <summary>
 /// Gets the Index of a row
 /// </summary>
 /// <param name="row">The OutlookGrid row.</param>
 /// <returns></returns>
 public int IndexOf(OutlookGridRow row)
 {
     return(subNodes.IndexOf(row));
 }
 /// <summary>
 /// Adds the specified row.
 /// </summary>
 /// <param name="row">The row.</param>
 public void Add(OutlookGridRow row)
 {
     row.ParentNode = _parentNode;
     row.NodeLevel  = ParentNode.NodeLevel + 1; //Not ++
     subNodes.Add(row);
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="row">The OutlookGridRow.</param>
 public OutlookGridGroupImageEventArgs(OutlookGridRow row)
 {
     this.row = row;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollapsingEventArgs"/> class.
 /// </summary>
 /// <param name="node">The node.</param>
 public CollapsingEventArgs(OutlookGridRow node)
     : base(node)
 {
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OutlookGridRowNodeCancelEventBase"/> class.
 /// </summary>
 /// <param name="node">The node.</param>
 public OutlookGridRowNodeCancelEventBase(OutlookGridRow node)
 {
     _row = node;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExpandedEventArgs"/> class.
 /// </summary>
 /// <param name="node">The node.</param>
 public ExpandedEventArgs(OutlookGridRow node) : base(node)
 {
 }