/// <summary> /// The constructor method. /// </summary> /// <param name="ctlModel">A instance of the CTLModel class</param> /// <param name="parser">A instance of the XMLParser class</param> public CTLModelUtilityVC(CTLModel ctlModel, XMLParser parser) { this.View = new CTLModelUtilityView(); this.View.CTLModelUtilityViewShownHandler += new CTLModelUtilityView.EventHandler(viewControllerIsShown); this.View.openScenarioFileButtonClickedHandler += new CTLModelUtilityView.EventHandler(openScenarioFileDialog); this.View.clearListButtonClickedHandler += new CTLModelUtilityView.EventHandler(clearList); this.ctlModel = ctlModel; this.parser = parser; this.cachedActiveEvents = new List<CTLEvent>(); this.cachedActiveTasks = new List<CTLTask>(); this.eventsToDisplay = new List<CTLEvent>(); this.activeTasksToDisplay = new List<CTLTask>(); this.historyTasksToDisplay = new List<CTLTask>(); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); XMLParser parser = new XMLParser(); PRLDomain prlDomain = new PRLDomain(); CTLModel ctlModel = new CTLModel(parser, prlDomain); FuzzyModel fuzzyModel = new FuzzyModel(); // Main viewcontroller setup var controller = new MainViewController(ctlModel,fuzzyModel); // Cognitive Load setup CTLModelUtilityVC ctlUtilityVC = new CTLModelUtilityVC(ctlModel, parser); controller.clUtilityView = ctlUtilityVC.View; // Emotional State setup FuzzyModelUtilityVC esUtilityVC = new FuzzyModelUtilityVC(fuzzyModel); controller.esUtilityView = esUtilityVC.View; Application.Run(controller.View); }
public void setUp() { xmlParser = new XMLParser(); testInput1 = "<scenario>" + "<second>" + "</second>" + "</scenario>"; testInput2 = "<scenario>" + "<second>" + "<event id=\"1\">" + "<name>TREIN_GESTRAND</name>" + "<action>started</action>" + "</event>" + "<task id=\"2\" eventID=\"1\">" + "<name>ARI_UIT</name>" + "<action>started</action>" + "</task>" + "</second>"+ "<second>"+ "<task id=\"2\" eventID=\"1\">" + "<name>ARI_UIT</name>" + "<action>stopped</action>" + "</task>" + "<event id=\"1\">" + "<name>TREIN_GESTRAND</name>" + "<action>stopped</action>" + "</event>" + "</second>" + "</scenario>"; mockedDelegate = new Mock<CTLInputSourceDelegate>(); xmlParser.delegateObject = mockedDelegate.Object; }