public CarStereoQueueDataDisplayObserver(object displayObject, ISimulationDataSubject simData) : base(displayObject, simData) { //Initalize variables //cast the object to a data grid view carStereoQueueGV = (DataGridView)displayObject; simData.AddObserver(this); }
public StatsDataDisplayObserver(Object displayObject, ISimulationDataSubject simData) : base(displayObject, simData) { //Initalize variables //cast the object to a data grid view this.statsGV = (DataGridView)displayObject; simData.AddObserver(this); }
//---------------------------------------------------------------------------------------------------------------------- // Other Product Data Display Observer Constructer | Parameters : Parameters : Object, ISImulationDataSubject (parent) //---------------------------------------------------------------------------------------------------------------------- public OtherProductDataDisplayObserver(Object displayObject, ISimulationDataSubject simData) : base(displayObject, simData) { //Initalize variables //cast the object to a data grid view otherProductQueueGV = (DataGridView) displayObject; simData.AddObserver(this); }
public GraphicsDisplayObserver(Object displayObject, ISimulationDataSubject simData) : base(displayObject, simData) { //Initalize variables width = 28; height = 28; //Creating the brushes for drawing greenBrush = new SolidBrush(Color.PaleGreen); blueBrush = new SolidBrush(Color.PaleTurquoise); redBrush = new SolidBrush(Color.LightPink); yellowBrush = new SolidBrush(Color.LightGoldenrodYellow); //Create the font style to paint on the entity drawFont = new Font("Arial", 16); drawBrush = new SolidBrush(Color.Black); blackPen = new Pen(Color.Black, 2); blackBrush = new SolidBrush(Color.Silver); //cast the object to a panel this.graphicsSurface = (Panel)displayObject; g = graphicsSurface.CreateGraphics(); simData.AddObserver(this); }