You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.2 KiB
56 lines
1.2 KiB
7 years ago
|
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<User> p = new List<User>();
|
||
|
|
||
|
|
||
|
|
||
|
public Form1()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
}
|
||
|
|
||
|
private void button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
|
||
|
//var users = o.Deser();
|
||
|
|
||
|
|
||
|
Parser o = new Parser();
|
||
|
|
||
|
var users = o.Deser();
|
||
|
List<User> p = new List<User>();
|
||
|
|
||
|
|
||
|
|
||
|
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);
|
||
|
// }
|
||
|
//}
|
||
|
}
|
||
|
}
|