public researcharea(Research research, String s) { InitializeComponent(); for (int i = 0; i < research.byInterestArea.Find(x => x.areaName.Equals(s)).citations.Count; i++) { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = research.byInterestArea.Find(x => x.areaName.Equals(s)).citations[i]; } }
public factRea(Research r, String s) { InitializeComponent(); for (int i = 0; i < r.byFaculty.Find(x => x.facultyName.Equals(s)).citations.Count; i++) { rtb_factr.Text += r.byFaculty.Find(x => x.facultyName.Equals(s)).citations[i]; rtb_factr.Text += "\n"; } }
private void tb_factrese_Enter(object sender, EventArgs e) { string jsonResearch = getRestData("/research/"); research = JToken.Parse(jsonResearch).ToObject <Research>(); tbl_byfact.Controls.Clear(); for (int i = 0; i < research.byFaculty.Count; i++) { if (i != 0) { tbl_byfact.RowCount = tbl_byfact.RowCount + 1; } int row = 0; // RichTextBox richTB = new RichTextBox(); String s = research.byFaculty[i].facultyName; if (!s.Equals("Deborah Gears")) { PictureBox richTB = new PictureBox(); richTB.Text = research.byFaculty[i].facultyName; richTB.Name = "factBox1" + i + row; richTB.Load(people.faculty.Find(x => x.name.Equals(s)).imagePath); richTB.SizeMode = PictureBoxSizeMode.StretchImage; richTB.Click += new EventHandler(this.byfactname); tbl_byfact.Controls.Add(richTB); tbl_byfact.SetColumn(richTB, i); tbl_byfact.SetRow(richTB, row); row++; } } }