mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Updated Settings page
Added new settings (history and clipboard) Renamed and moved Settings Vms
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
|
||||
namespace ModernKeePass.Application.Parameters.Commands.SetMaxHistorySize
|
||||
{
|
||||
public class SetMaxHistorySizeCommand : IRequest
|
||||
{
|
||||
public long MaxHistorySize { get; set; }
|
||||
|
||||
public class SetMaxHistorySizeCommandHandler : IRequestHandler<SetMaxHistorySizeCommand>
|
||||
{
|
||||
private readonly IDatabaseProxy _database;
|
||||
|
||||
public SetMaxHistorySizeCommandHandler(IDatabaseProxy database)
|
||||
{
|
||||
_database = database;
|
||||
}
|
||||
|
||||
public void Handle(SetMaxHistorySizeCommand message)
|
||||
{
|
||||
if (_database.IsOpen) _database.MaxHistorySize = message.MaxHistorySize;
|
||||
else throw new DatabaseClosedException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user