/// <summary> /// /// </summary> /// <param name="measure1"></param> /// <param name="measure2"></param> public void SwichtPosition(PresentationSlide slide1, PresentationSlide slide2) { int position = slide1.position; slide1.position = slide2.position; slide2.position = position; slideListChangeHandler.AddUpdated(slide1); slideListChangeHandler.AddUpdated(slide2); OnPropertyChanged("slideListChangeHandler.Items"); }
/// <summary> /// Définit la position /// </summary> public PresentationSlide CloneObject() { PresentationSlide slide = new PresentationSlide(); slide.name = this.name; slide.position = this.position; slide.parent = this.parent; slide.slideItemsListChangeHandler = this.slideItemsListChangeHandler; return(slide); }
public bool containsSlide(PresentationSlide slide) { foreach (PresentationSlide item in slideListChangeHandler.getItems()) { if (slide.position == item.position) { return(true); } } return(false); }
public void ForgetSlide(PresentationSlide slide) { foreach (PresentationSlide item in slideListChangeHandler.Items) { if (item.position > slide.position) { item.position = item.position - 1; } } slide.position = -1; slideListChangeHandler.forget((PresentationSlide)slide); }
/// <summary> /// Retire un fils /// </summary> /// <param name="child"></param> public void RemoveSlide(PresentationSlide slide) { foreach (PresentationSlide item in slideListChangeHandler.Items) { if (item.position > slide.position) { item.position = item.position - 1; slideListChangeHandler.AddUpdated((PresentationSlide)item); } } slide.position = -1; slideListChangeHandler.AddDeleted((PresentationSlide)slide); }
/// <summary> /// Met à jour un fils /// </summary> /// <param name="child"></param> public void UpdateSlide(PresentationSlide child) { slideListChangeHandler.AddUpdated((PresentationSlide)child); OnPropertyChanged("childrenListChangeHandler.Items"); }
public void AddSlide(PresentationSlide slide) { slide.position = slideListChangeHandler.Items.Count + 1; slideListChangeHandler.AddNew((PresentationSlide)slide); OnPropertyChanged("slideListChangeHandler.Items"); }