Exemple #1
0
        private List <string> GetSelectedPaths()
        {
            List <string> filePaths = new List <string>();

            foreach (object item in ImageListBox.SelectedItems)
            {
                ExerciseEditor.ImageBrowserItem browserItem = (ExerciseEditor.ImageBrowserItem)item;
                filePaths.Add(browserItem.FilePath);
            }
            return(filePaths);
        }
Exemple #2
0
 private void SetSelectedPaths(List <string> paths)
 {
     foreach (object item in ImageListBox.Items)
     {
         ExerciseEditor.ImageBrowserItem browserItem = (ExerciseEditor.ImageBrowserItem)item;
         if (paths.Contains(browserItem.FilePath))
         {
             ImageListBox.SelectedItems.Add(browserItem);
         }
     }
 }