public CheckableItem(DeletableItem deletable, CheckableItem parent) { Deletable = deletable; children = new ObservableCollection <CheckableItem>(); IsChecked = false; this.parent = parent; }
private void DeleteSelected() { List <DeletableItem> checkedFiles = new List <DeletableItem>(); List <DeletableItem> uncheckedFiles = new List <DeletableItem>(); for (int i = 0; i < fileCheckList.Items.Count; i++) { DeletableItem item = (DeletableItem)fileCheckList.Items[i]; if (fileCheckList.GetItemChecked(i)) { checkedFiles.Add(item); } else { uncheckedFiles.Add(item); } } DeleteFiles(checkedFiles, uncheckedFiles); }