Exemplo n.º 1
0
        public MarketDepthByPrice(RealTimeData RTD, Company comp)
        {
            InitializeComponent();
            this.comp = comp; //the current compnay for this window
            this.Text += " " + comp.compName; //set the text at the top of the form
            Update(RTD); //add any data from the data model to the view
            realdata = RTD; //store a copy of the data model

            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(delegate
            {
                realdata.unRegister(this);
            });
        }
Exemplo n.º 2
0
        //CONSTRUCTORS======================
        public MarketDepthByOrder(RealTimeData RTD, Company comp)
        {
            //some image stuff
            InitializeComponent();
            this.comp = comp;
            this.Text += " " + comp.compName;
            Update(realdata);
            realdata = RTD;

            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(delegate
            {
                realdata.unRegister(this);
            });
        }
Exemplo n.º 3
0
 public RealTimeData()
 {
     //lists to store companies and stock views
     this._company = new List<Company>();
     this._stock = new List<StockMarketDisplay>();
     this.tradingDate = DateTime.Now;
        //instantiate 3 companies
     Company Microsoft= new Company("Microsoft", 46.13f );
     Company Apple= new Company("Apple Inc.", 105.22f );
     Company Facebook = new Company("Facebook", 80.67f );
     _company.Add(Microsoft);
     _company.Add(Apple);
     _company.Add(Facebook);
 }