private void Form1_Load(object sender, EventArgs e) { //Initalize classes simulationData = new SimulationDisplayDataSubject(); statsData = new SimulationDisplayDataSubject(); statsDisplay = new StatsDataDisplayObserver(StatsDataGridView, statsData); calanderDisplay = new CalandarDataDisplayObserver(CalanderDataGrid, simulationData); otherQueueDisplay = new OtherProductDataDisplayObserver(OtherQueueDataGridView, simulationData); stereoQueueDisplay = new CarStereoQueueDataDisplayObserver(StereoQueueDataGridView, simulationData); graphicalDisplay = new GraphicsDisplayObserver(graphicsSurface, simulationData); }
//------------------------------------------------------------------------------------------------- // Simulator Constructor | Parameters: SimulationDisplayDataSubject, SimulationDisplayDataSubject //------------------------------------------------------------------------------------------------- public Simulator(SimulationDisplayDataSubject simData , SimulationDisplayDataSubject statsData) { //Initalize varrriables / classes this.MainCalandar = new Calendar(); this.theQueueManager = new QueueManager(); this.TheSalesRepManager = new SalesManager(); this.stats = new Stats(); this.theDice = new Dice(); this.simData = simData; this.statsData = statsData; }