コード例 #1
0
        protected override async Task ExecuteAsync(object parameter)
        {
            Folder parentFolder = (Folder)parameter;
            Folder newFolder    = new Folder()
            {
                ParentFolder = parentFolder
            };

            await _dataStorage.AddFolder(newFolder, parentFolder);
        }
コード例 #2
0
        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);
        }