public CrewSelectionWindow(RoutineControl routineControl, string crewSelectionString, string title) : base(title, new Rect(), 200, 60)
        {
            _routineControl      = routineControl;
            _crewSelectionString = crewSelectionString;

            preferredCrewList.Clear();
            string[] prefCrewNames = GetPreferredCrewNames(_crewSelectionString);
            foreach (String name in prefCrewNames)
            {
                foreach (ProtoCrewMember cr in HighLogic.CurrentGame.CrewRoster.Crew)
                {
                    if (name == cr.name)
                    {
                        preferredCrewList.Add(cr);
                    }
                }
                foreach (ProtoCrewMember to in HighLogic.CurrentGame.CrewRoster.Tourist)
                {
                    if (name == to.name)
                    {
                        preferredCrewList.Add(to);
                    }
                }
            }
        }
Esempio n. 2
0
 private IEnumerator ByEnumeratorWithArgAndRoutineControlShouldProvideRoutine(bool arg,
                                                                              RoutineControl routineControl)
 {
     Assert.True(arg);
     Assert.NotNull(routineControl.GetRoutine());
     yield return(null);
 }
Esempio n. 3
0
        private IEnumerator ByEnumeratorWithResultShouldProvideResult(RoutineControl <bool> routineControl)
        {
            yield return(null);

            yield return(null);

            routineControl.SetResult(true);
        }
Esempio n. 4
0
        public void RoutineControlShouldThrowExceptionWhenCallSetResultAndRoutineIsNotDefinedTest()
        {
            var routineControl = new RoutineControl <bool>();

            Assert.Throws(ExceptionHelper.SetResultCannotCalledWhenRoutineIsNotDefined.GetType(),
                          () => routineControl.SetResult(true),
                          ExceptionHelper.Messages.SetResultCannotCalledWhenRoutineIsNotDefined,
                          Array.Empty <object>());
        }
Esempio n. 5
0
        private IEnumerator ByEnumeratorWithControlShouldProvideRoutine(RoutineControl routineControl)
        {
            Assert.NotNull(routineControl.GetRoutine());
            yield return(null);

            yield return(null);

            flagByEnumeratorWithControlShouldProvideRoutineTest = true;
        }
Esempio n. 6
0
 public RoutineOverviewWindow(RoutineControl routineControl) : base("Launch Missions", new Rect(), 300, 60)
 {
     _routineControl = routineControl;
 }
Esempio n. 7
0
 private IEnumerator ByEnumeratorWithArgAndRoutineControlResultShouldProvideRoutine(bool arg,
                                                                                    RoutineControl <bool> routineControl)
 {
     Assert.True(arg);
     routineControl.SetResult(true);
     yield return(null);
 }
 public RoutineDepartureOverviewWindow(RoutineControl routineControl) : base("Departure Missions", new Rect(), 300, 60)
 {
     _routineControl = routineControl;
 }
 public OrderedMissionsWindow(RoutineControl routineControl) : base("Ordered Missions", new Rect(), 400)
 {
     _routineControl = routineControl;
 }
 public RoutineDepartureDetailWindow(RoutineControl routineControl) : base("Departure Mission", new Rect(), 200, 60)
 {
     _routineControl = routineControl;
 }
 public DockingPortSelectionWindow(RoutineControl routineControl, uint dockingPortFlightId) : base("Docking Port", new Rect(), 200, 60)
 {
     _routineControl      = routineControl;
     _dockingPortFlightId = dockingPortFlightId;
 }
Esempio n. 12
0
 public RoutineDetailWindow(RoutineControl routineControl) : base("Launch Mission", new Rect(), 200, 60)
 {
     _routineControl = routineControl;
 }