コード例 #1
0
        public override void AddLogic(ICoatingScheduleLogic newController = null)
        {
            CoatingScheduleLine newLogic;

            if (newController != null)
            {
                newLogic = (CoatingScheduleLine)newController;
                newLogic.Connect(this);
                if (Control != null)
                {
                    Control.AddControlToBottom(newLogic);
                }
            }
            else
            {
                newLogic       = new CoatingScheduleLine();
                newLogic.Shift = GetNextShift();
                newLogic.Connect(this);
                if (Control != null)
                {
                    Control.AddControlToBottom(newLogic);
                }
                newLogic.AddLogic();
            }
            ChildrenLogic.Add(newLogic);
        }
コード例 #2
0
 public override void AddLogic(ICoatingScheduleLogic newController = null) //update with a picker window. include a default.
 {
     try
     {
         if (newController != null)
         {
             newController.CoatingLine = CoatingLine;
         }
         else
         {
             newController = new CoatingScheduleProduct(0, "", "", "", "")
             {
                 CoatingLine = CoatingLine
             };
         }
         ChildrenLogic.Add(newController);
         newController.Connect(this);
         if (Control != null)
         {
             Control.AddControlToBottom(newController);
         }
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception.Message);
     }
 }
コード例 #3
0
 public override void AddLogic(ICoatingScheduleLogic newController = null)
 {
     if (newController == null)
     {
         foreach (string coatingLine in StaticFactoryValuesManager.CoatingLines)
         {
             CoatingScheduleShift newLogic = new CoatingScheduleShift();
             newLogic.CoatingLine = coatingLine;
             ChildrenLogic.Add(newLogic);
             newLogic.Connect(this);
             if (Control != null)
             {
                 Control.AddControlToBottom(newLogic);
             }
         }
     }
     else
     {
         ChildrenLogic.Add(newController);
         newController.Connect(this);
         if (Control != null)
         {
             Control.AddControlToBottom(newController);
         }
     }
 }
コード例 #4
0
 public CoatingScheduleLine(List <CoatingScheduleShift> shifts)
 {
     foreach (CoatingScheduleShift shift in shifts)
     {
         ChildrenLogic.Add(shift);
         shift.Connect(this);
         if (Control != null)
         {
             Control.AddControlToBottom(shift);
         }
     }
 }
コード例 #5
0
 public override void ReconnectToControls()
 {
     if (Control != null)
     {
         ((CoatingScheduleWindow)Control).LoadInstructions(InstructionSets);
         foreach (var logic in ChildrenLogic)
         {
             Control.AddControlToBottom(logic);
             logic.Connect(this);
             logic.ReconnectToControls();
         }
     }
 }
コード例 #6
0
 public override void ReconnectToControls()
 {
     if (Control != null)
     {
         foreach (var logic in ChildrenLogic) // foreach product or note, create a control
         {
             if (logic.Control == null)
             {
                 Control.AddControlToBottom(logic);
                 logic.Connect(this);
             }
         }
     }
 }
コード例 #7
0
 public override void ReconnectToControls()
 {
     if (Control != null)
     {
         foreach (var logic in ChildrenLogic)
         {
             if (logic.Control == null)
             {
                 Control.AddControlToBottom(logic);
                 logic.Connect(this);
                 logic.ReconnectToControls();
             }
         }
     }
 }
コード例 #8
0
        public override void AddLogic(ICoatingScheduleLogic newController = null)
        {
            CoatingScheduleDay newLogic;

            if (newController != null)
            {
                newLogic = (CoatingScheduleDay)newController;
            }
            else
            {
                newLogic      = new CoatingScheduleDay();
                newLogic.Date = GetNextDay();
            }
            ChildrenLogic.Add(newLogic);
            newLogic.Connect(this);
            if (Control != null)
            {
                Control.AddControlToBottom(newLogic);
            }
            UpdateDateText();
        }
コード例 #9
0
 public override void AddControlToBottom(ICoatingScheduleLogic upChild)
 {
     ChildrenLogic.Add(upChild);
     upChild.Connect(this);
     Control.AddControlToBottom(upChild);
 }