mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Create database works with new Vm
Refactoring
This commit is contained in:
27
WinAppCommon/ViewModels/AboutVm.cs
Normal file
27
WinAppCommon/ViewModels/AboutVm.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Windows.ApplicationModel;
|
||||
|
||||
namespace ModernKeePass.ViewModels
|
||||
{
|
||||
public class AboutVm
|
||||
{
|
||||
private readonly Package _package;
|
||||
|
||||
public string Name => _package.DisplayName;
|
||||
|
||||
public string Version
|
||||
{
|
||||
get
|
||||
{
|
||||
var version = _package.Id.Version;
|
||||
return $"{version.Major}.{version.Minor}";
|
||||
}
|
||||
}
|
||||
|
||||
public AboutVm() : this(Package.Current) { }
|
||||
|
||||
public AboutVm(Package package)
|
||||
{
|
||||
_package = package;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user