protected ChildView(SourceView master, string name, string configFileName = null) : base(master, configFileName) { Title = name; Master = master; Frame.Activated += (a, b) => Master.SelectSource(Source); }
static Control CreateView(this Compound compound, int viewPosition, SourceView master) { var x = compound .CachedResults .Select(i => i.Data.CreateView(master)) .ToArray(); var result = new TableLayoutPanel { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, ColumnCount = 2, RowCount = x.Length, CellBorderStyle = TableLayoutPanelCellBorderStyle.Single }; for(var i = 0; i < x.Length; i++) { var control = ((i < viewPosition ? "" : "?") + i).CreateView(1.5); var sourcePart = compound.Syntax.Statements[i].SourcePart; control.Click += (a, b) => master.SelectSource(sourcePart); result.Controls.Add(control, 0, i); result.Controls.Add(x[i], 1, i); } return result; }