2018-06-14 10:20:00 +02:00
|
|
|
|
using System.Collections.Generic;
|
2020-03-26 12:25:22 +01:00
|
|
|
|
using System.Threading.Tasks;
|
2018-06-20 18:41:56 +02:00
|
|
|
|
using System.Windows.Input;
|
2017-10-17 18:46:05 +02:00
|
|
|
|
using ModernKeePass.ViewModels;
|
|
|
|
|
|
|
|
|
|
namespace ModernKeePass.Interfaces
|
|
|
|
|
{
|
2020-03-26 12:25:22 +01:00
|
|
|
|
public interface IVmEntity
|
2017-10-17 18:46:05 +02:00
|
|
|
|
{
|
|
|
|
|
GroupVm ParentGroup { get; }
|
2017-10-31 18:49:18 +01:00
|
|
|
|
GroupVm PreviousGroup { get; }
|
2018-06-14 10:20:00 +02:00
|
|
|
|
int IconId { get; }
|
2017-10-17 18:46:05 +02:00
|
|
|
|
string Id { get; }
|
|
|
|
|
string Name { get; set; }
|
2020-03-26 12:25:22 +01:00
|
|
|
|
IEnumerable<IVmEntity> BreadCrumb { get; }
|
2017-10-17 18:46:05 +02:00
|
|
|
|
bool IsEditMode { get; }
|
2017-12-04 12:20:05 +01:00
|
|
|
|
bool IsRecycleOnDelete { get; }
|
2017-10-17 18:46:05 +02:00
|
|
|
|
|
2018-06-20 18:41:56 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Save changes to Model
|
|
|
|
|
/// </summary>
|
|
|
|
|
ICommand SaveCommand { get; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Restore ViewModel
|
|
|
|
|
/// </summary>
|
|
|
|
|
ICommand UndoDeleteCommand { get; }
|
2017-10-31 18:49:18 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Move a entity to the destination group
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="destination">The destination to move the entity to</param>
|
|
|
|
|
void Move(GroupVm destination);
|
2017-10-30 18:34:38 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Delete from Model
|
|
|
|
|
/// </summary>
|
2020-03-26 12:25:22 +01:00
|
|
|
|
Task CommitDelete();
|
2017-10-30 18:34:38 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Delete from ViewModel
|
|
|
|
|
/// </summary>
|
2020-03-26 12:25:22 +01:00
|
|
|
|
Task MarkForDelete(string recycleBinTitle);
|
2017-10-17 18:46:05 +02:00
|
|
|
|
}
|
|
|
|
|
}
|