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);
        }
Exemplo n.º 2
0
        private void StartCurrent()
        {
            var type = CurrentRow.GetValue(_.Type);
            var path = CurrentRow.GetValue(_.Path);

            if (type == DirectoryItemType.Directory)
            {
                DirectoryTreePresenter.SelectSubDirectory(path);
            }
            else
            {
                ProcessStart(path);
            }
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public LargeIconListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree)
     : base(directoryListView, directoryTree)
 {
 }
Exemplo n.º 5
0
 protected DirectoryListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree)
     : base(directoryTree)
 {
     _currentDirectory = DirectoryTreePresenter.CurrentPath;
     Refresh(directoryListView);
 }
Exemplo n.º 6
0
 protected DirectoryPresenter(DirectoryTreePresenter directoryTree)
 {
     _directoryTreePresenter = directoryTree;
     _directoryTreePresenter.ViewInvalidated += OnDirectoryTreeViewInvalidated;
 }
Exemplo n.º 7
0
 public DetailsListPresenter(DataView directoryListView, DirectoryTreePresenter directoryTree)
     : base(directoryListView, directoryTree)
 {
 }