Exemplo n.º 1
0
 public FolderViewModel(Folder folder)
 {
     Folder = folder;
     ChangePathCommand = new RelayCommand(param => ChangePath());
     DeleteFolderCommand = new RelayCommand(param => Delete());
     RequestCleaningCommand = new RelayCommand(param => Cleaner.Clean(Folder));
     ShowFolderSettingsCommand = new RelayCommand(param => ShowFolderSettings());
     SettingsVisibility = Visibility.Collapsed;
 }
Exemplo n.º 2
0
        public FoldersViewModel()
        {
            folders = Folders.GetInstance;
            FolderList = new ObservableCollection<FolderViewModel>(folders.FolderList.Select(p => new FolderViewModel(p)));
            FolderList.CollectionChanged += DelegateChanges;
            foreach(FolderViewModel folder in FolderList)
            {
                folder.RequestDeletion += RemoveFolder;

            }
            AddFolderCommand = new RelayCommand(param => AddFolder());
            RemoveFolderCommand = new RelayCommand(param => RemoveFolder(SelectedFolder));
        }
Exemplo n.º 3
0
 public TrayIconViewModel()
 {
     OpenWindowCommand = new RelayCommand(param => RequestOpenWindow());
     CloseApplicationCommand = new RelayCommand(param => RequestCloseApplication());
 }