コード例 #1
0
ファイル: Form1.cs プロジェクト: DamienGuyton/College-Work
 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);
 }
コード例 #2
0
 //-------------------------------------------------------------------------------------------------
 // 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;
 }