public FilesTreePresenter(IFilesTreeView view, FilesTreeModel model)
        {
            _view  = view;
            _model = model;

            _view.TreeBuildingStarted   += TreeBuildingStartedHandler;
            _view.TreeBuildingCanceled  += TreeBuildingCanceledHandler;
            _view.ViewExceptionOccurred += ErrorOccurredHandler;
            view.TreeNodeSelected       += TreeNodeSelectedHandler;

            _view.ResetFilesTree();

            _model.ErrorOccurred        += ErrorOccurredHandler;
            _model.TreeBuildingFinished += TreeBuildingFinishedHandler;
            _model.TreeElementAdded     += TreeElementAddedHandler;
        }
        public FilesTreePresenter(IFilesTreeView view, FilesTreeModel model)
        {
            _view = view;
            _model = model;

            _view.TreeBuildingStarted += TreeBuildingStartedHandler;
            _view.TreeBuildingCanceled += TreeBuildingCanceledHandler;
            _view.ViewExceptionOccurred += ErrorOccurredHandler;
            view.TreeNodeSelected += TreeNodeSelectedHandler;

            _view.ResetFilesTree();

            _model.ErrorOccurred += ErrorOccurredHandler;
            _model.TreeBuildingFinished += TreeBuildingFinishedHandler;
            _model.TreeElementAdded += TreeElementAddedHandler;
        }
 private void TreeBuildingCanceledHandler(object sender, EventArgs e)
 {
     _model.AbortTreeBuilding();
     _view.ResetFilesTree();
 }