Exemplo n.º 1
0
            public StockLine(string symbol, StockList parentList, SummaryPanel infoPanel)
            {
                this.Size  = new System.Drawing.Size(275, 50);
                ParentList = parentList;

                TickerLabel          = new Label();
                TickerLabel.Size     = new System.Drawing.Size(50, 15);
                TickerLabel.Location = new System.Drawing.Point(5, (this.Size.Height / 2) - (TickerLabel.Size.Height / 2));
                TickerLabel.MouseUp += (sender, e) => { this.OnMouseUp(e); };
                Controls.Add(TickerLabel);

                SummaryChart                 = new StockChartBasic(symbol);
                SummaryChart.Canvas.Size     = new System.Drawing.Size(150, this.Size.Height);
                SummaryChart.Canvas.Location = new System.Drawing.Point((TickerLabel.Location.X + TickerLabel.Size.Width) + 5, 0);
                SummaryChart.Canvas.MouseUp += (sender, e) => { this.OnMouseUp(e); };
                SummaryChart.SetSubscritpion(infoPanel.StockSubscription);
                Controls.Add(SummaryChart.Canvas);

                InfoPanel            = infoPanel;
                InfoPanel.Location   = new System.Drawing.Point((SummaryChart.Canvas.Location.X + SummaryChart.Canvas.Width) + 5, 0);
                InfoPanel.Size       = new System.Drawing.Size(this.Size.Width - InfoPanel.Location.X, this.Height);
                InfoPanel.ParentLine = this;
                InfoPanel.Initialize();
                Controls.Add(InfoPanel);

                this.Symbol      = symbol;
                TickerLabel.Text = symbol;
            }