mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
WIP Lib version 2.39.1
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using ModernKeePass.Services;
|
||||
|
||||
namespace ModernKeePass.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class DatabaseChangedAttribute: Attribute
|
||||
{
|
||||
public DatabaseChangedAttribute()
|
||||
{
|
||||
DatabaseService.Instance.HasChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,26 +0,0 @@
|
||||
using System.Reflection;
|
||||
using ModernKeePass.Interfaces;
|
||||
|
||||
namespace ModernKeePass.Aop
|
||||
{
|
||||
public class DatabaseChangedProxy<T>: IProxyInvocationHandler
|
||||
{
|
||||
private readonly T _decorated;
|
||||
private readonly IDatabaseService _databaseService;
|
||||
|
||||
public DatabaseChangedProxy(T decorated, IDatabaseService databaseService)
|
||||
{
|
||||
_decorated = decorated;
|
||||
_databaseService = databaseService;
|
||||
}
|
||||
|
||||
public object Invoke(object proxy, MethodInfo method, object[] parameters)
|
||||
{
|
||||
object retVal = null;
|
||||
retVal = method.Invoke(proxy, parameters);
|
||||
_databaseService.HasChanged = true;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
}
|
@@ -111,11 +111,9 @@
|
||||
<Compile Include="Actions\ClipboardAction.cs" />
|
||||
<Compile Include="Actions\NavigateToUrlAction.cs" />
|
||||
<Compile Include="Actions\SetupFocusAction.cs" />
|
||||
<Compile Include="Aop\DatabaseChangedProxy.cs" />
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Aop\DatabaseChanged.cs" />
|
||||
<Compile Include="Exceptions\DatabaseOpenedException.cs" />
|
||||
<Compile Include="Interfaces\ILicenseService.cs" />
|
||||
<Compile Include="Interfaces\IProxyInvocationHandler.cs" />
|
||||
|
Reference in New Issue
Block a user