mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Updated release notes
Moved ViewModelLocator WIP ModernKeePass10
This commit is contained in:
@@ -24,7 +24,6 @@ using ModernKeePass.Common;
|
||||
using ModernKeePass.Domain.Dtos;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
using ModernKeePass.Infrastructure;
|
||||
using ModernKeePass.Views;
|
||||
|
||||
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=234227
|
||||
|
||||
@@ -187,7 +186,7 @@ namespace ModernKeePass
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
currentFrame?.Navigate(typeof(MainPage));
|
||||
_navigation.NavigateTo(Constants.Navigation.MainPage);
|
||||
#if DEBUG
|
||||
_notification.Show("App resumed", "Nothing to do, no previous database opened");
|
||||
#endif
|
||||
|
@@ -1,6 +1,5 @@
|
||||
using System.Reflection;
|
||||
using AutoMapper;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using GalaSoft.MvvmLight.Views;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.HockeyApp;
|
||||
|
98
ModernKeePass/ViewModels/ViewModelLocator.cs
Normal file
98
ModernKeePass/ViewModels/ViewModelLocator.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
In App.xaml:
|
||||
<Application.Resources>
|
||||
<vm:ViewModelLocator xmlns:vm="clr-namespace:ModernKeePass"
|
||||
x:Key="Locator" />
|
||||
</Application.Resources>
|
||||
|
||||
In the View:
|
||||
DataContext="{Binding Source={StaticResource Locator}, Path=ViewModelName}"
|
||||
|
||||
You can also use Blend to do all this with the tool's support.
|
||||
See http://www.galasoft.ch/mvvm
|
||||
*/
|
||||
|
||||
using System;
|
||||
using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
using GalaSoft.MvvmLight.Views;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.ViewModels.ListItems;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
{
|
||||
/// <summary>
|
||||
/// This class contains static references to all the view models in the
|
||||
/// application and provides an entry point for the bindings.
|
||||
/// </summary>
|
||||
public class ViewModelLocator
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the ViewModelLocator class.
|
||||
/// </summary>
|
||||
public ViewModelLocator()
|
||||
{
|
||||
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
|
||||
|
||||
if (ViewModelBase.IsInDesignModeStatic)
|
||||
{
|
||||
// Create design time view services and models
|
||||
//SimpleIoc.Default.Register<IDataService, DesignDataService>();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Create run time view services and models
|
||||
//SimpleIoc.Default.Register<IDataService, DataService>();IDataService
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IMediator>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IRecentProxy>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IResourceProxy>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<ISettingsProxy>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<ICredentialsProxy>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<IDialogService>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<INavigationService>());
|
||||
SimpleIoc.Default.Register(() => App.Services.GetRequiredService<INotificationService>());
|
||||
}
|
||||
|
||||
SimpleIoc.Default.Register<SettingsVm>();
|
||||
SimpleIoc.Default.Register<SettingsDatabaseVm>();
|
||||
SimpleIoc.Default.Register<SettingsNewVm>();
|
||||
SimpleIoc.Default.Register<SettingsSaveVm>();
|
||||
SimpleIoc.Default.Register<SettingsSecurityVm>();
|
||||
SimpleIoc.Default.Register<OpenDatabaseControlVm>();
|
||||
SimpleIoc.Default.Register<SetCredentialsVm>();
|
||||
SimpleIoc.Default.Register<TopMenuVm>();
|
||||
SimpleIoc.Default.Register<MainVm>();
|
||||
SimpleIoc.Default.Register<NewVm>();
|
||||
SimpleIoc.Default.Register<OpenVm>();
|
||||
SimpleIoc.Default.Register<RecentVm>();
|
||||
SimpleIoc.Default.Register<SaveVm>();
|
||||
SimpleIoc.Default.Register<GroupDetailVm>();
|
||||
SimpleIoc.Default.Register<EntryDetailVm>();
|
||||
}
|
||||
|
||||
public MainVm Main => ServiceLocator.Current.GetInstance<MainVm>(Guid.NewGuid().ToString());
|
||||
public SettingsVm Settings => ServiceLocator.Current.GetInstance<SettingsVm>(Guid.NewGuid().ToString());
|
||||
public SettingsDatabaseVm SettingsDatabase => ServiceLocator.Current.GetInstance<SettingsDatabaseVm>(Guid.NewGuid().ToString());
|
||||
public SettingsNewVm SettingsNew => ServiceLocator.Current.GetInstance<SettingsNewVm>(Guid.NewGuid().ToString());
|
||||
public SettingsSaveVm SettingsSave => ServiceLocator.Current.GetInstance<SettingsSaveVm>(Guid.NewGuid().ToString());
|
||||
public SettingsSecurityVm SettingsSecurity => ServiceLocator.Current.GetInstance<SettingsSecurityVm>(Guid.NewGuid().ToString());
|
||||
public OpenDatabaseControlVm OpenDatabaseControl => ServiceLocator.Current.GetInstance<OpenDatabaseControlVm>(Guid.NewGuid().ToString());
|
||||
public SetCredentialsVm SetCredentials => ServiceLocator.Current.GetInstance<SetCredentialsVm>(Guid.NewGuid().ToString());
|
||||
public TopMenuVm TopMenu => ServiceLocator.Current.GetInstance<TopMenuVm>(Guid.NewGuid().ToString());
|
||||
public NewVm New => ServiceLocator.Current.GetInstance<NewVm>(Guid.NewGuid().ToString());
|
||||
public OpenVm Open => ServiceLocator.Current.GetInstance<OpenVm>(Guid.NewGuid().ToString());
|
||||
public RecentVm Recent => ServiceLocator.Current.GetInstance<RecentVm>(Guid.NewGuid().ToString());
|
||||
public SaveVm Save => ServiceLocator.Current.GetInstance<SaveVm>(Guid.NewGuid().ToString());
|
||||
public GroupDetailVm Group => ServiceLocator.Current.GetInstance<GroupDetailVm>(Guid.NewGuid().ToString());
|
||||
public EntryDetailVm Entry => ServiceLocator.Current.GetInstance<EntryDetailVm>(Guid.NewGuid().ToString());
|
||||
|
||||
public static void Cleanup()
|
||||
{
|
||||
// TODO Clear the ViewModels
|
||||
SimpleIoc.Default.Reset();
|
||||
}
|
||||
}
|
||||
}
|
@@ -94,6 +94,7 @@
|
||||
</Compile>
|
||||
<Compile Include="DependencyInjection.cs" />
|
||||
<Compile Include="Models\NavigationItem.cs" />
|
||||
<Compile Include="ViewModels\ViewModelLocator.cs" />
|
||||
<Compile Include="Views\MainPageFrames\DonatePage.xaml.cs">
|
||||
<DependentUpon>DonatePage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@@ -1,5 +1,7 @@
|
||||
Database corruption issues should now be a thing of the past !
|
||||
Database corruption issues should now be a thing of the past:
|
||||
Database integrity is checked after each save
|
||||
Data is written to the filesystem using a transactional model (meaning: if an error occurs, the original file is left untouched)
|
||||
Auto-save on suspend/exit is now only active when database has changes and its size is under 1MB
|
||||
Added the ability to move entries and groups
|
||||
Edits are now in a popup instead of inline
|
||||
Allows restoring and deleting from entry history
|
||||
Updated KeePass lib to version 2.44
|
@@ -1,5 +1,7 @@
|
||||
Amelioration de la recherche
|
||||
Changer l'icone d'une entree cree un historique
|
||||
Correction de crash lors du lancement avec certaines versions de Windows
|
||||
Le bouton de suppression d'une entree apparait bien desormais
|
||||
La liste des icones n'affiche desormais que des valeurs valables
|
||||
Les problemes de corruption de bases de donn<6E>es sont maintenant totalement corrigees :
|
||||
L'integrite de la base de donnees est verfiee apres chaque sauvegarde
|
||||
Les donnees sont ecrites dans le systeme de fichiers en utilisant un modele transactionnel (autrement dit, s'il y a une erreur, le fichier original n'est pas modifie)
|
||||
L'auto-sauvegarde lors de la suspension/sortie ne se fait que lorsqu'il y a eu des changements et que la taille de la base de donnees est inferieure a 1MB
|
||||
Possibilite de deplacer des groupes et des entree
|
||||
Possibilite de supprimer et restaurer des versions de l'historique d'entrees
|
||||
Libraire mise a jour en version 2.44
|
Reference in New Issue
Block a user