private void btnOK_Click(object sender, EventArgs e) { if (gridFunc.SelectedRows.Count == 1) { selected = gridFunc.SelectedRows[0].Cells[0].Value as ELFunction; DialogResult = DialogResult.OK; Close(); } }
void LoadWiki(ELFunction func) { webBrowser.Stop(); if (string.IsNullOrEmpty(func?.wikiUrl)) { webBrowser.DocumentText = $"<b>{func?.function}():</b> Wiki not available for this function"; } else { webBrowser.Navigate(func?.wikiUrl); } }
void LoadWiki(string name, ELFunction func) { webBrowser.Stop(); if (name == null) { webBrowser.DocumentText = $"no function highlighted"; } else if (string.IsNullOrEmpty(func?.wikiUrl)) { webBrowser.DocumentText = $"<b>{name}():</b> Wiki not available for this function"; } else { webBrowser.Navigate(func?.wikiUrl); } }