public void AddResult(FindDetails details) { if (details == null) { return; } ResultItem rd = new ResultItem(details) { Width = this.Width - 28 }; SizeChanged += delegate { rd.Width = Width - 28; }; string filename = rd.fName.Text; rd.fName.Click += delegate { new Process() { StartInfo = new ProcessStartInfo() { Arguments = $"/A search=\"{searchPhrase}\"&page=\"{rd.CurrentPage()}\" \"{filename}\"", FileName = pdfReader } }.Start(); }; flowLayoutPanel1.Controls.Add(rd); }
public ResultItem(FindDetails fd) { InitializeComponent(); fName.Text = fd.filename; comboBox1.DataSource = fd.pagesSearchFound; if (comboBox1.Items.Count > 0) { comboBox1.Text = comboBox1.Items[0].ToString(); } }