Ejemplo n.º 1
0
        /// <summary>
        /// William Clark
        /// Created: 2021/03/04
        ///
        /// Constructer that accepts an IRoutineManager and a RoutineVM
        /// </summary>
        ///
        /// <remarks>
        /// </remarks>
        /// <param name="routineManager">The IRoutineManager Logic Layer class</param>
        /// <param name="selectedRoutine">The RoutineVM for which to view details</param>
        public AddEditDetailRoutine(IRoutineManager routineManager, RoutineVM selectedRoutine)
        {
            _routine        = selectedRoutine;
            _routineManager = routineManager;

            InitializeComponent();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// William Clark
 /// Created: 2021/02/24
 ///
 /// Constructs an CompleteRoutine
 /// </summary>
 ///
 /// <remarks>
 /// </remarks>
 ///
 /// <param name="routineManager">The RoutineManager Reference</param>
 /// <param name="routine">The Routine to be completed</param>
 /// <param name="user">The UserAccount which will complete the Routine</param>
 public CompleteRoutine(IRoutineManager routineManager, Routine routine, UserAccount user)
 {
     this._routineManager = routineManager;
     this._user           = user;
     try
     {
         this._routine = new RoutineVM(routine, _routineManager.GetRoutineStepsByRoutine(routine));
     }
     catch (Exception)
     {
         MessageBox.Show("The Routine steps could not be loaded.");
     }
     _currentRoutineStep = 0;
     InitializeComponent();
 }
 public void TestSetup()
 {
     _routineManager = new RoutineManager(new RoutineFakes());
 }