port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using DynamicData;
using Intromat.Interfaces;
using Intromat.ViewModels;
namespace Intromat.Actions.Hierarchy
{
public class DeleteFolderAction : IUndoItem
{
private readonly FolderViewModel _folder;
private readonly FolderViewModel _parent;
public DeleteFolderAction(FolderViewModel folder)
{
File = folder.Module;
_parent = (FolderViewModel)folder.Parent;
_folder = folder;
}
public IFile File { get; }
public void Redo()
{
_parent.Folders.Remove(_folder);
_parent.IsSelected = true;
}
public void Undo()
{
_parent.Folders.Add(_folder);
_folder.IsSelected = true;
}
}
}