or
By any chance does any one sample code on how I can load the root folder structure.
For example C:\Test\ is the root.
I need to list all the files and sub folders in the rad tree view with different icons for folders and different icons for the files.
Any sample code would be appreciated.
thanks,
Goran
| foreach (FileInfo photoFileInfo in m_photos) |
| { |
| Bitmap photoBitmap = new Bitmap(Image.FromFile(photoFileInfo.FullName), 313, 253); |
| RadImageItem radImageItem = new RadImageItem |
| { |
| Image = photoBitmap, |
| Tag = photoFileInfo.Name |
| }; |
| this.InvokeIfNeeded(() => photoRadRotator.Items.Add(radImageItem)); |
| } |
| if (photoRadRotator.CurrentItem != null) |
| { |
| RadItem currentItem = photoRadRotator.CurrentItem; |
| string fileNameString = currentItem.Tag.ToString(); |
| foreach (RadItem radItem in photoRadRotator.Items) |
| { |
| List<RadItem> items = new List<RadItem>(); |
| if (radItem != currentItem) |
| items.Add(radItem); |
| ((RadImageItem) radItem).Image = null; |
| } |
| photoRadRotator.Items.Clear(); |
| currentItem.Dispose(); |
| this.RemovePhotos(fileNameString); |
| } |
| if (!Directory.Exists(m_unusedFolder)) |
| { |
| Directory.CreateDirectory(m_unusedFolder); |
| } |
| File.Move(Path.Combine(m_associatedFolder, fileToRemove), |
| Path.Combine(m_unusedFolder, fileToRemove)); |
| RadGridView.CurrentRow.VisualElement.Focus(); |