mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Added ability to change Entries background and foreground colors
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Windows.Input;
|
||||
using ModernKeePass.Common;
|
||||
using ModernKeePass.Interfaces;
|
||||
@@ -16,8 +17,6 @@ namespace ModernKeePass.ViewModels
|
||||
{
|
||||
public GroupVm ParentGroup { get; private set; }
|
||||
public GroupVm PreviousGroup { get; private set; }
|
||||
public System.Drawing.Color? BackgroundColor => _pwEntry?.BackgroundColor;
|
||||
public System.Drawing.Color? ForegroundColor => _pwEntry?.ForegroundColor;
|
||||
public bool IsRevealPasswordEnabled => !string.IsNullOrEmpty(Password);
|
||||
public bool HasExpired => HasExpirationDate && _pwEntry.ExpiryTime < DateTime.Now;
|
||||
public double PasswordComplexityIndicator => QualityEstimation.EstimatePasswordBits(Password?.ToCharArray());
|
||||
@@ -160,6 +159,24 @@ namespace ModernKeePass.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Color? BackgroundColor
|
||||
{
|
||||
get { return _pwEntry?.BackgroundColor; }
|
||||
set
|
||||
{
|
||||
if (value != null) _pwEntry.BackgroundColor = (Color) value;
|
||||
}
|
||||
}
|
||||
public Color? ForegroundColor
|
||||
{
|
||||
get { return _pwEntry?.ForegroundColor; }
|
||||
set
|
||||
{
|
||||
if (value != null) _pwEntry.ForegroundColor = (Color)value;
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand SaveCommand { get; }
|
||||
public ICommand GeneratePasswordCommand { get; }
|
||||
public ICommand UndoDeleteCommand { get; }
|
||||
|
Reference in New Issue
Block a user