Ejemplo n.º 1
0
 public OpenFolderDialogContext(
     OpenFolderDialogViewModel viewModel,
     DirectorySearchComponent directorySearch)
 {
     ViewModel        = viewModel;
     _directorySearch = directorySearch;
 }
Ejemplo n.º 2
0
        public void Init()
        {
            _search = new DirectorySearchComponent();

            if (Directory.Exists("foo"))
            {
                Directory.Delete("foo", true);
            }
            if (Directory.Exists("bar"))
            {
                Directory.Delete("bar", true);
            }
        }
Ejemplo n.º 3
0
 public MainContext(
     MainViewModel viewModel,
     FilterComponent filter,
     RenamerComponent renamer,
     DirectorySearchComponent directorySearch,
     FileRenameComponent fileRename,
     DirectoryAutocompleteComponent autocomplete)
 {
     ViewModel        = viewModel;
     _filter          = filter;
     _renamer         = renamer;
     _directorySearch = directorySearch;
     _fileRename      = fileRename;
     _autocomplete    = autocomplete;
 }
Ejemplo n.º 4
0
        public MainWindow()
        {
            InitializeComponent();
            var ds = new DirectorySearchComponent();

            _context = new MainContext(
                new MainViewModel(),
                new FilterComponent(),
                new RenamerComponent(),
                ds,
                new FileRenameComponent(),
                new DirectoryAutocompleteComponent(ds));
            DataContext = _context.ViewModel;

            _context.OpenHomeDirectory();
            _context.ListFiles();
        }