yavsc/BookAStar/BookAStar/ViewModels/UserProfile/DirectoryInfoViewModel.cs
2016-11-14 17:54:06 +01:00

32 lines
1.2 KiB
C#

using System.Collections.ObjectModel;
using System.Windows.Input;
using XLabs.Forms.Mvvm;
namespace BookAStar.ViewModels.UserProfile
{
using Model.FileSystem;
public class DirectoryInfoViewModel : ViewModel
{
public ObservableString SubPath { get; set; }
public ObservableCollection<string> SubDirectories { get; set; }
public ObservableCollection<UserFileInfo> FileInfo { get; set; }
public ICommand RefreshCommand { get; set; }
public DirectoryInfoViewModel (UserDirectoryInfo model=null)
{
Data.DataManager.Current.RemoteFiles.CollectionChanged += RemoteFiles_CollectionChanged;
if (model == null)
model = Data.DataManager.Current.RemoteFiles.CurrentItem;
SubDirectories = new ObservableCollection<string> (model.SubDirectories);
SubPath = new ObservableString (model.SubPath);
FileInfo = new ObservableCollection<Model.FileSystem.UserFileInfo> (model.Files);
}
private void RemoteFiles_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
throw new System.NotImplementedException();
}
}
}