private void listView1_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewItemResource lvi = (ListViewItemResource)listView1.GetItemAt(e.X, e.Y); if (lvi != null && lvi.resource != null) { OpenEditor(lvi.resource); } }
private void ActualizarListadoRecursos() { listView1.BeginUpdate(); Resource oldSelectedResource = SelectedResource; listView1.Items.Clear(); foreach (Resource res in Resource.AllResources) { if (res.Name != null && res.Name != "") { ListViewItemResource lvi = new ListViewItemResource(res); listView1.Items.Add(lvi); if (res == oldSelectedResource) { lvi.Selected = true; } } } listView1.EndUpdate(); }