Adding entries and groups works again

Entry history almost fully functional
Some refactoring
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-03 17:33:53 +02:00
parent 36aa8914fa
commit b875f3c89d
12 changed files with 75 additions and 40 deletions

View File

@@ -62,14 +62,17 @@ namespace ModernKeePass.Views
private void HamburgerMenuUserControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
{
var listView = sender as ListView;
switch (listView?.SelectedIndex)
if (listView == null) return;
var index = listView.SelectedIndex;
switch (index)
{
case -1:
return;
default:
var entry = listView?.SelectedItem as Application.Entry.Models.EntryVm;
StackPanel.DataContext = entry;
TopGrid.DataContext = entry;
Model.SetEntry(entry, index);
/*StackPanel.DataContext = entry;
TopGrid.DataContext = entry;*/
break;
}
}