using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace xmlDeserWin { public partial class Form1 : Form { //Parser o = new Parser(); //List p = new List(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //var users = o.Deser(); Parser o = new Parser(); var users = o.Deser(); List p = new List(); foreach (User c in users) { ListViewItem newItem = listView.Items.Add(c.id); newItem.SubItems.Add(c.name); } } //public void users_Retrieve_items(object sender, RetrieveVirtualItemEventArgs e) //{ // if(e.ItemIndex >= 0 && e.ItemIndex < p.Count) // { // e.Item = new ListViewItem(p[e.ItemIndex].id); // e.Item.SubItems.Add(p[e.ItemIndex].name); // } //} } }