Beispiel #1
0
 public CheckableItem(DeletableItem deletable, CheckableItem parent)
 {
     Deletable   = deletable;
     children    = new ObservableCollection <CheckableItem>();
     IsChecked   = false;
     this.parent = parent;
 }
Beispiel #2
0
        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);
        }