protected void BuildComparisonMatrix() { Dictionary <int, List <RSplitUnit <double> > > units = DataToProcess.GetGroupedList(); SampleComparisons = new List <List <Label> > (); uint width = (uint)units.Count; groupCountLabel.Text = units.Count.ToString(); int pairCount = 0; Table mainTable = new Table(width + 2, width + 1, true); mainTable.Attach(new Label("Groups"), 0, 1, 0, 1); uint rowInc = 1; SampleComparisons = new List <List <Label> > (); foreach (KeyValuePair <int, List <RSplitUnit <double> > > kvp in units) { List <Label> gn = new List <Label> (); mainTable.Attach(new Label("G - " + kvp.Key.ToString()), rowInc, rowInc + 1, 0, 1); mainTable.Attach(new Label("G - " + kvp.Key.ToString()), 0, 1, rowInc, rowInc + 1); for (uint i = 1; i <= width; i++) { Label next = new Label("-"); gn.Add(next); mainTable.Attach(next, i, i + 1, rowInc, rowInc + 1); } pairCount += kvp.Value.Count; rowInc++; SampleComparisons.Add(gn); } rankPairsLabel.Text = pairCount.ToString(); vbox10.PackStart(mainTable, true, true, 2); vbox10.ShowAll(); }