Ejemplo n.º 1
0
 public override void UnExecute()
 {
     MoveSectionIn.Move(mSection);
     for (int i = 0; i < mSection.SectionChildCount; ++i)
     {
         MoveSectionIn.Move(mSection.SectionChild(i));
     }
     base.UnExecute();
 }
Ejemplo n.º 2
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.º 3
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);
        }