public CTCGUITest() { //using all testing classes the ctc office (created a new instance of ctc) //create environment instance _env = new SimulationEnvironment.SimulationEnvironment(); //create testing track model _trackMod = new TestingTrackModel(_env); //creating testing track controllers _red = new TestingTrackController(0, _trackMod, _env, true); _green = new TestingTrackController(1, _trackMod, _env, true); //hook to environment _env.PrimaryTrackControllerRed = _red; _env.PrimaryTrackControllerGreen = _green; _env.TrackModel = _trackMod; //creating office instance _ctc = new CTCOffice.CTCOffice(_env, _red, _green); _env.CTCOffice = _ctc; _ctc.StartAutomation += new EventHandler <EventArgs>(_ctc_StartAutomation); _ctc.StopAutomation += new EventHandler <EventArgs>(_ctc_StopAutomation); //making Request Panel Objects (For red and green) _redRequest = new RequestFrame("Red", _red); _greenRequest = new RequestFrame("Green", _green); //creating office gui _ctcGui = new CTCOfficeGUI(_env, _ctc); _ctcGui.ShowSchedule += new EventHandler <EventArgs>(_ctcGui_ShowSchedule); var MyTestingControls = new TestingControls(_trackMod); //creating testing gui _control = new OfficeGUITest( _ctcGui, _redRequest, _greenRequest, MyTestingControls ); _env.StartTick(); Form f = new Form(); f.AutoSize = true; f.Text = "CTC Office Standalone GUI Test"; f.Controls.Add(_control); f.Show(); }
public CTCGUITest() { //using all testing classes the ctc office (created a new instance of ctc) //create environment instance _env = new SimulationEnvironment.SimulationEnvironment(); //create testing track model _trackMod = new TestingTrackModel(_env); //creating testing track controllers _red = new TestingTrackController(0,_trackMod,_env, true); _green = new TestingTrackController(1,_trackMod,_env, true); //hook to environment _env.PrimaryTrackControllerRed = _red; _env.PrimaryTrackControllerGreen = _green; _env.TrackModel = _trackMod; //creating office instance _ctc = new CTCOffice.CTCOffice(_env, _red, _green); _env.CTCOffice = _ctc; _ctc.StartAutomation += new EventHandler<EventArgs>(_ctc_StartAutomation); _ctc.StopAutomation += new EventHandler<EventArgs>(_ctc_StopAutomation); //making Request Panel Objects (For red and green) _redRequest = new RequestFrame("Red", _red); _greenRequest = new RequestFrame("Green", _green); //creating office gui _ctcGui = new CTCOfficeGUI(_env, _ctc); _ctcGui.ShowSchedule += new EventHandler<EventArgs>(_ctcGui_ShowSchedule); var MyTestingControls = new TestingControls(_trackMod); //creating testing gui _control = new OfficeGUITest( _ctcGui, _redRequest, _greenRequest, MyTestingControls ); _env.StartTick(); Form f = new Form(); f.AutoSize = true; f.Text = "CTC Office Standalone GUI Test"; f.Controls.Add(_control); f.Show(); }
public OfficeGUITest(CTCOfficeGUI ctc, RequestFrame red, RequestFrame green, TestingControls tc) { InitializeComponent(); _panelCTC.Controls.Clear(); _panelCTC.Controls.Add(ctc); _panelRequestRed.Controls.Clear(); _panelRequestRed.Controls.Add(red); _panelRequestGreen.Controls.Clear(); _panelRequestGreen.Controls.Add(green); _panelTestingControls.Controls.Clear(); _panelTestingControls.Controls.Add(tc); }