public CurrentDirectoryPresenter(DataView dataView, DirectoryTreePresenter directoryTree) : base(directoryTree) { _directoryTree = directoryTree; _currentDirectory = NewScalar <string>(null, StringComparer.OrdinalIgnoreCase).AddValidator(ValidateDirectory); CurrentDirectory = DirectoryTreePresenter.CurrentPath; var dataSet = DataSet <Item> .Create(); Show(dataView, dataSet); }
private void StartCurrent() { var type = CurrentRow.GetValue(_.Type); var path = CurrentRow.GetValue(_.Path); if (type == DirectoryItemType.Directory) { DirectoryTreePresenter.SelectSubDirectory(path); } else { ProcessStart(path); } }
private bool RenameCurrent() { var type = CurrentRow.GetValue(_.Type); var path = CurrentRow.GetValue(_.Path); var displayName = CurrentRow.GetValue(_.DisplayName); var newPath = Path.Combine(Path.GetDirectoryName(path), displayName); if (!PerformRename(type, path, newPath)) { return(false); } CurrentRow.EditValue(_.Path, newPath); if (type == DirectoryItemType.Directory) { DirectoryTreePresenter.OnSubDirectoryRenamed(path, newPath); } return(true); }
public LargeIconListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree) : base(directoryListView, directoryTree) { }
protected DirectoryListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree) : base(directoryTree) { _currentDirectory = DirectoryTreePresenter.CurrentPath; Refresh(directoryListView); }
protected DirectoryPresenter(DirectoryTreePresenter directoryTree) { _directoryTreePresenter = directoryTree; _directoryTreePresenter.ViewInvalidated += OnDirectoryTreeViewInvalidated; }
public DetailsListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree) : base(directoryListView, directoryTree) { }