Ejemplo n.º 1
0
        /// <summary>
        /// Increase the level of the section.
        /// </summary>
        public static void Move(SectionNode section)
        {
            SectionNode sibling = section.PrecedingSibling;

            section.Detach();
            sibling.AppendChild(section);
            int children = section.SectionChildCount;

            for (int i = 0; i < children; ++i)
            {
                SectionNode child = section.SectionChild(0);
                child.Detach();
                sibling.AppendChild(child);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Increase the level of the section.
        /// </summary>
        public static void Move(SectionNode section)
        {
            int         index    = section.Index + 1;
            SectionNode sibling  = section.ParentAs <SectionNode>();
            int         children = sibling.SectionChildCount;

            for (int i = index; i < children; ++i)
            {
                SectionNode child = sibling.SectionChild(index);
                child.Detach();
                section.AppendChild(child);
            }
            section.Detach();
            sibling.ParentAs <ObiNode>().InsertAfter(section, sibling);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Remove the section node.
 /// </summary>
 public override void UnExecute()
 {
     mNode.Detach();
     base.UnExecute();
 }