Пример #1
0
        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);
            }
        }
Пример #2
0
        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();
        }