private ListViewItem CreateSnapshotLVItem(bSnapshot snapshot) { ListViewItem lvi = lvSnapshots.Items.Add(snapshot.DateTime.ToString()); lvi.SubItems.Add(snapshot.Comment); lvi.SubItems.Add(snapshot.CountFiles().ToString()); lvi.Tag = snapshot; return lvi; }
public override void Execute() { try { Snapshot = new bSnapshot(); Snapshot.Comment = Comment; Snapshot.DateTime = DateTime.Now; Snapshot.RootFolder = ScanFolder(Folder, null); } catch (Exception ex) { Exception = ex; } }