Ejemplo n.º 1
0
        protected override async Task ExecuteAsync(object parameter)
        {
            Folder parentFolder = (Folder)parameter;
            Folder newFolder    = new Folder()
            {
                ParentFolder = parentFolder
            };

            await _dataStorage.AddFolder(newFolder, parentFolder);
        }
        protected override async Task ExecuteAsync(object parameter)
        {
            Folder parentFolder = (Folder)parameter;

            DialogFolderVM dialogFolderVM = new DialogFolderVM(new Folder(), "Создание папки");

            Folder newFolder = (Folder)await MaterialDesignThemes.Wpf.DialogHost.Show(dialogFolderVM, _dialogId);

            if (newFolder == null)
            {
                return;
            }

            newFolder.ParentFolder = parentFolder;

            await _dataStorage.AddFolder(newFolder, parentFolder);
        }