コード例 #1
0
        private void DeleteItem(object filenameitem)
        {
            FileNameItem fni = filenameitem as FileNameItem;

            Mementor.ElementRemove(FilePaths, fni);
            FilePaths.Remove(fni);
        }
コード例 #2
0
 void btnRemove_Click(object sender, RoutedEventArgs e)
 {
     if (FilePaths == null)
     {
         return;
     }
     FilePaths.Remove((string)lstFilePaths.SelectedValue);
 }
コード例 #3
0
 public void Dropped(IDropInfo dropInfo)
 {
     if (dropInfo.DragInfo != null)
     {
         if (dropInfo.DragInfo.VisualSource == dropInfo.VisualTarget && dropInfo.Data.GetType() == typeof(FileNameItem))
         {
             FileNameItem filenameitem    = dropInfo.Data as FileNameItem;
             FileNameItem newfilenameitem = filenameitem.Clone() as FileNameItem;
             FilePaths.Insert(dropInfo.InsertIndex, newfilenameitem);
             FilePaths.Remove(filenameitem);
         }
     }
 }
コード例 #4
0
 private void ClearUnselected()
 {
     Mementor.Batch(() =>
     {
         for (int i = FilePaths.Count - 1; i >= 0; i--)
         {
             if (!FilePaths[i].FileIsSelected)
             {
                 Mementor.ElementRemove(FilePaths, FilePaths[i]);
                 FilePaths.Remove(FilePaths[i]);
             }
         }
     });
 }