コード例 #1
0
        private void stockStateSummaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StateSummary StockStateSummary = new StateSummary(this.RTD);

            // Set the parent form of the child window.
            StockStateSummary.MdiParent = this;
            // Display the new form.

            RTD.Register(StockStateSummary);
            RTD.Notify();
            StockStateSummary.Show();
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: nnur/MVC-StockMarket
        public MainForm()
        {
            InitializeComponent();

            //looping thru companies
            foreach (Company comp in RTD._company)
            {
                //make the drop down list with all the companies
                ToolStripMenuItem biteme = new ToolStripMenuItem();
                biteme.Text = comp.compName;
                biteme.Name = "foo";

                ToolStripMenuItem eatme = new ToolStripMenuItem();
                eatme.Text = comp.compName;
                eatme.Name = "boo";

                biteme.Click += new EventHandler(delegate
                    {//create the appropriate form
                        MarketDepthByOrder MarketByOrder = new MarketDepthByOrder(this.RTD, comp);
                        // Set the parent form of the child window.
                        MarketByOrder.MdiParent = this;
                        // Display the new form.
                        MarketByOrder.Show();
                        MarketByOrder.Update(this.RTD);
                        //register the view
                        RTD.Register(MarketByOrder);
                    }
                    );
                eatme.Click += new EventHandler(delegate
                    {
                        MarketDepthByPrice MarketByPrice = new MarketDepthByPrice(this.RTD,comp);
                        // Set the parent form of the child window.
                        MarketByPrice.MdiParent = this;
                        // Display the new form.
                        MarketByPrice.Show();
                        MarketByPrice.Update(this.RTD);

                        //register the view
                        RTD.Register(MarketByPrice);
                    });

                //add the forms to the drop down
                marketByOrderToolStripMenuItem.DropDownItems.Add(biteme);
                marketByPriceToolStripMenuItem.DropDownItems.Add(eatme);

            }

            //make a state summary form

            StateSummary StockStateSummary = new StateSummary(this.RTD);
               //register the obserer
            RTD.Register(StockStateSummary);
        }
コード例 #3
0
        public MainForm()
        {
            InitializeComponent();

            //looping thru companies
            foreach (Company comp in RTD._company)
            {
                //make the drop down list with all the companies
                ToolStripMenuItem biteme = new ToolStripMenuItem();
                biteme.Text = comp.compName;
                biteme.Name = "foo";

                ToolStripMenuItem eatme = new ToolStripMenuItem();
                eatme.Text = comp.compName;
                eatme.Name = "boo";

                biteme.Click += new EventHandler(delegate
                {    //create the appropriate form
                    MarketDepthByOrder MarketByOrder = new MarketDepthByOrder(this.RTD, comp);
                    // Set the parent form of the child window.
                    MarketByOrder.MdiParent = this;
                    // Display the new form.
                    MarketByOrder.Show();
                    MarketByOrder.Update(this.RTD);
                    //register the view
                    RTD.Register(MarketByOrder);
                }
                                                 );
                eatme.Click += new EventHandler(delegate
                {
                    MarketDepthByPrice MarketByPrice = new MarketDepthByPrice(this.RTD, comp);
                    // Set the parent form of the child window.
                    MarketByPrice.MdiParent = this;
                    // Display the new form.
                    MarketByPrice.Show();
                    MarketByPrice.Update(this.RTD);

                    //register the view
                    RTD.Register(MarketByPrice);
                });

                //add the forms to the drop down
                marketByOrderToolStripMenuItem.DropDownItems.Add(biteme);
                marketByPriceToolStripMenuItem.DropDownItems.Add(eatme);
            }

            //make a state summary form

            StateSummary StockStateSummary = new StateSummary(this.RTD);

            //register the obserer
            RTD.Register(StockStateSummary);
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: nnur/MVC-StockMarket
        private void stockStateSummaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StateSummary StockStateSummary = new StateSummary(this.RTD);
            // Set the parent form of the child window.
            StockStateSummary.MdiParent = this;
            // Display the new form.

            RTD.Register(StockStateSummary);
            RTD.Notify();
            StockStateSummary.Show();
        }