Exemplo n.º 1
0
 private void Backup()
 {
     try
       {
     List<DataMemento.DataItem> data = new List<DataMemento.DataItem>();
     for (int i = lstData.Items.Count - 1; i >= 0; i--)
     {
       ListViewItem item = lstData.Items[i];
       string atm = item.SubItems[0].Text;
       string nest = item.SubItems[1].Text;
       data.Add(new DataMemento.DataItem(atm, nest));
     }
     DataMemento mem = new DataMemento();
     mem.SetState(data);
       }
       catch (Exception)
       {
     //TODO: handle an exception
       }
 }