mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Entries and groups icons are now handled with int
Static mapping is changed to a converter
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using ModernKeePass.Interfaces;
|
||||
using ModernKeePass.Mappings;
|
||||
using ModernKeePass.Services;
|
||||
using ModernKeePassLib;
|
||||
using ModernKeePassLib.Cryptography.PasswordGenerator;
|
||||
@@ -79,14 +77,12 @@ namespace ModernKeePass.ViewModels
|
||||
set { SetEntryValue(PwDefs.NotesField, value); }
|
||||
}
|
||||
|
||||
public Symbol IconSymbol
|
||||
public int IconId
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_pwEntry == null) return Symbol.Add;
|
||||
if (HasExpired) return Symbol.Priority;
|
||||
var result = PwIconToSegoeMapping.GetSymbolFromIcon(_pwEntry.IconId);
|
||||
return result == Symbol.More ? Symbol.Permissions : result;
|
||||
if (_pwEntry?.IconId != null) return (int) _pwEntry?.IconId;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user