public IHierarchyObject CloneObject()
        {
            PresentationSlideItem slide = new PresentationSlideItem();

            slide.name     = this.name;
            slide.position = this.position;
            slide.parent   = this.parent;
            slide.childrenListChangeHandler = this.childrenListChangeHandler;
            return(slide);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="measure1"></param>
        /// <param name="measure2"></param>
        public void SwichtPosition(PresentationSlideItem shape1, PresentationSlideItem shape2)
        {
            int position = shape1.position;

            shape1.SetPosition(shape1.position);
            shape2.SetPosition(position);
            childrenListChangeHandler.AddUpdated(shape1);
            childrenListChangeHandler.AddUpdated(shape2);
            UpdateParents();
            OnPropertyChanged("childrenListChangeHandler.Items");
        }
Esempio n. 3
0
        public void DeleteShape(PresentationSlideItem shape)
        {
            foreach (PresentationSlideItem item in slideItemsListChangeHandler.Items)
            {
                if (item.GetPosition() > shape.GetPosition())
                {
                    item.SetPosition(item.GetPosition() - 1);
                    slideItemsListChangeHandler.AddUpdated(item);
                }
            }

            shape.SetPosition(-1);
            slideItemsListChangeHandler.AddDeleted(shape);
        }
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IHierarchyObject GetCopy()
        {
            PresentationSlideItem slide = new PresentationSlideItem();

            slide.name     = "Copy Of " + this.name;
            slide.position = -1;
            slide.parent   = null;

            foreach (PresentationSlideItem child in this.childrenListChangeHandler.Items)
            {
                IHierarchyObject copy = child.GetCopy();
                slide.AddChild(copy);
            }
            return(slide);
        }
 /// <summary>
 /// return existing child with name: name and in not edition mode
 /// </summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public IHierarchyObject GetNotEditedChildByName(PresentationSlideItem editedValue, string name)
 {
     if (editedValue.name.ToUpper().Equals(name.ToUpper()))
     {
         foreach (PresentationSlideItem slide in childrenListChangeHandler.Items)
         {
             if (slide.name.ToUpper().Equals(name.ToUpper()) && !slide.Equals(editedValue))
             {
                 return(slide);
             }
             IHierarchyObject ob = slide.GetNotEditedChildByName(editedValue, name);
             if (ob != null)
             {
                 return(ob);
             }
         }
     }
     return(null);
 }
Esempio n. 6
0
 public void UpdateShape(PresentationSlideItem shape)
 {
     slideItemsListChangeHandler.AddUpdated(shape);
 }
Esempio n. 7
0
 public void AddShape(PresentationSlideItem shape)
 {
     shape.SetPosition(slideItemsListChangeHandler.Items.Count + 1);
     slideItemsListChangeHandler.AddNew(shape);
 }