Esempio n. 1
0
 public override void RemoveLogic(ICoatingScheduleLogic child)
 {
     if (child.GetType() == typeof(CoatingScheduleLine))
     {
         ChildrenLogic.Remove((CoatingScheduleLine)child);
         Control.RemoveControl(child.Control);
     }
     else
     {
         foreach (var logic in ChildrenLogic)
         {
             logic.RemoveLogic(child);
         }
     }
 }
Esempio n. 2
0
        public override void SwapChildUp(ICoatingScheduleLogic upChild, ICoatingScheduleLogic lastLogic)
        {
            ICoatingScheduleLogic childProduct = upChild;
            Int32 currentIndex = ChildrenLogic.IndexOf(childProduct);

            if (currentIndex == 0)
            {
                ChildrenLogic.Remove(childProduct);
                Control.RemoveControl(childProduct.Control);
                ParentLogic.SwapChildUp(upChild, this);
            }
            else
            {
                ICoatingScheduleLogic swapProduct = ChildrenLogic[currentIndex - 1];
                ChildrenLogic[currentIndex - 1] = childProduct;
                ChildrenLogic[currentIndex]     = swapProduct;

                childProduct.SwapControls(swapProduct);
            }
        }
Esempio n. 3
0
        public override void SwapChildDown(ICoatingScheduleLogic downChild, ICoatingScheduleLogic lastParent)
        {
            ICoatingScheduleLogic childProduct = downChild;
            Int32 currentIndex = ChildrenLogic.IndexOf(childProduct);

            if (currentIndex == ChildrenLogic.Count - 1) // is at bottom
            {
                ChildrenLogic.Remove(childProduct);
                Control.RemoveControl(childProduct.Control);
                ParentLogic.SwapChildDown(downChild, this);
            }
            else
            {
                ICoatingScheduleLogic swapProduct = ChildrenLogic[currentIndex + 1];
                ChildrenLogic[currentIndex + 1] = childProduct;
                ChildrenLogic[currentIndex]     = swapProduct;

                childProduct.SwapControls(swapProduct);
            }
        }
Esempio n. 4
0
 public override void RemoveLogic(ICoatingScheduleLogic child)
 {
     ChildrenLogic.Remove(child);
     Control.RemoveControl(child.Control);
 }
 public void RemoveDay(CoatingScheduleDay day)
 {
     ChildrenLogic.Remove(day);
     UpdateDateText();
 }
 public override void RemoveLogic(ICoatingScheduleLogic child)
 {
     ChildrenLogic.Remove((CoatingScheduleDay)child);
     Control.RemoveControl(child.Control);
     UpdateDateText();
 }