private void OnTrade(object sender,Trade trade) { TabViewer viewer; int key = trade.InstrumentId; if (!this.viewers.TryGetValue(key, out viewer)) { viewer = new TabViewer(){Dock = DockStyle.Fill}; this.viewers.Add(key,viewer); TabPage page = new TabPage(); var instrument = base.framework.InstrumentManager.GetById(key); page.Text = instrument.ToString(); page.Controls.Add(viewer); this.tabViewers.TabPages.Add(page); } viewer.OnTrade(sender,trade); }
private void OnTrade(object sender, Trade trade) { TabViewer viewer; int key = trade.InstrumentId; if (!this.viewers.TryGetValue(key, out viewer)) { viewer = new TabViewer() { Dock = DockStyle.Fill }; this.viewers.Add(key, viewer); TabPage page = new TabPage(); var instrument = base.framework.InstrumentManager.GetById(key); page.Text = instrument.Symbol; page.Controls.Add(viewer); this.tabViewers.TabPages.Add(page); } viewer.OnTrade(sender, trade); }