public frmMain() { InitializeComponent(); Serialiaze.DeserializationFromXml <List <Book> >(ref book, "books.xml"); if (book.Count != 0) { DgvKatalog.Rows.Clear(); for (int i = 0; i < book.Count; i++) { DgvKatalog.Rows.Add(book[i].kode, book[i].author, book[i].name, book[i].city, book[i].pubHouse, book[i].year, book[i].page, book[i].instance, book[i].image, book[i].cd); } } }
private void btWrite_Click(object sender, EventArgs e) { Serialiaze.SerialiazeToXml <List <Book> >(ref book, "books.xml"); }
private void frmMain_Load(object sender, EventArgs e) { Serialiaze.SerialiazeToXml <List <Book> >(ref book, "books.xml"); }