Update groups finally implemented

Code cleanup
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-16 17:16:03 +02:00
parent 9befdc321a
commit f950564000
15 changed files with 123 additions and 101 deletions

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using ModernKeePass.Domain.Enums;
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
@@ -10,7 +11,7 @@ namespace ModernKeePass.Views.UserControls
{
public sealed partial class SymbolPickerUserControl
{
public IEnumerable<Symbol> Symbols { get; }
public List<Symbol> Symbols { get; }
public Symbol SelectedSymbol
{
@@ -27,7 +28,12 @@ namespace ModernKeePass.Views.UserControls
public SymbolPickerUserControl()
{
InitializeComponent();
Symbols = Enum.GetValues(typeof(Symbol)).Cast<Symbol>();
Symbols = new List<Symbol>();
var names = Enum.GetNames(typeof(Icon));
foreach (var name in names)
{
Symbols.Add((Symbol) Enum.Parse(typeof(Symbol), name));
}
}
private void ComboBox_OnLoaded(object sender, RoutedEventArgs e)