public IMasterControl AddMaster(string name, IMeasurementSource source) { var display = new MasterDataDisplay(source); display.Dock = DockStyle.Fill; TabPage page = new TabPage(name); this.tabControlStacks.TabPages.Add(page); page.Controls.Add(display); return display; }
public IMasterControl AddMaster(string name, IMeasurementSource source) { var display = new MasterDataDisplay(source); display.Dock = DockStyle.Fill; TabPage page = new TabPage(name); this.tabControlStacks.TabPages.Add(page); page.Controls.Add(display); return(display); }
private void stackBrowser1_OnAddMaster(string name, string port, FilterLevel level, MasterStackConfig config) { //create the new form var observer = new EventedDataObserver(this); var display = new MasterDataDisplay(observer.MeasurementSource); //synchronize all updates on this form display.Dock = DockStyle.Fill; TabPage page = new TabPage(name); this.tabControlDisplay.TabPages.Add(page); page.Controls.Add(display); display.CommandAcceptor = sm.AddMaster(port, name, level, observer, config); }