mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Compare commits
32 Commits
Author | SHA1 | Date | |
---|---|---|---|
638bfacadd | |||
d341535d60 | |||
![]() |
38e2d1ac51 | ||
![]() |
5b1039b81f | ||
![]() |
37deac2ab9 | ||
![]() |
34f6d4e793 | ||
![]() |
bbae2c356a | ||
deec19a60c | |||
b1167594db | |||
![]() |
0da6a5fc60 | ||
![]() |
549006036b | ||
![]() |
6ed29e788c | ||
![]() |
e437f65f83 | ||
![]() |
6f96e698ec | ||
![]() |
b2dd028fc7 | ||
![]() |
62f2be8823 | ||
![]() |
89d43e21eb | ||
![]() |
5d9831efb5 | ||
![]() |
b65cb87e58 | ||
![]() |
7e687f7001 | ||
![]() |
1d5a4d6fab | ||
![]() |
2a2a934006 | ||
![]() |
4ae65fdbac | ||
![]() |
dd347b56a2 | ||
![]() |
ff1cdc265a | ||
![]() |
9863195684 | ||
![]() |
d6765904a1 | ||
![]() |
7e4d6a2836 | ||
![]() |
8a0b3a0870 | ||
![]() |
6f53fc79bb | ||
![]() |
6f161e8699 | ||
![]() |
8f1f80ae38 |
@@ -17,6 +17,7 @@ namespace ModernKeePass.Actions
|
|||||||
|
|
||||||
public object Execute(object sender, object parameter)
|
public object Execute(object sender, object parameter)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(Text)) return null;
|
||||||
var dataPackage = new DataPackage { RequestedOperation = DataPackageOperation.Copy };
|
var dataPackage = new DataPackage { RequestedOperation = DataPackageOperation.Copy };
|
||||||
dataPackage.SetText(Text);
|
dataPackage.SetText(Text);
|
||||||
Clipboard.SetContent(dataPackage);
|
Clipboard.SetContent(dataPackage);
|
||||||
|
@@ -1,46 +0,0 @@
|
|||||||
using System.Windows.Input;
|
|
||||||
using Windows.UI.Xaml;
|
|
||||||
using Microsoft.Xaml.Interactivity;
|
|
||||||
using ModernKeePass.Common;
|
|
||||||
using ModernKeePass.Interfaces;
|
|
||||||
using ModernKeePass.Services;
|
|
||||||
using ModernKeePass.ViewModels;
|
|
||||||
|
|
||||||
namespace ModernKeePass.Actions
|
|
||||||
{
|
|
||||||
public class RestoreEntityAction : DependencyObject, IAction
|
|
||||||
{
|
|
||||||
public IPwEntity Entity
|
|
||||||
{
|
|
||||||
get { return (IPwEntity)GetValue(EntityProperty); }
|
|
||||||
set { SetValue(EntityProperty, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public static readonly DependencyProperty EntityProperty =
|
|
||||||
DependencyProperty.Register("Entity", typeof(IPwEntity), typeof(RestoreEntityAction),
|
|
||||||
new PropertyMetadata(null));
|
|
||||||
|
|
||||||
public ICommand Command
|
|
||||||
{
|
|
||||||
get { return (ICommand)GetValue(CommandProperty); }
|
|
||||||
set { SetValue(CommandProperty, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public static readonly DependencyProperty CommandProperty =
|
|
||||||
DependencyProperty.Register("Command", typeof(ICommand), typeof(RestoreEntityAction),
|
|
||||||
new PropertyMetadata(null));
|
|
||||||
|
|
||||||
|
|
||||||
public object Execute(object sender, object parameter)
|
|
||||||
{
|
|
||||||
var resource = new ResourcesService();
|
|
||||||
var type = Entity is GroupVm ? "Group" : "Entry";
|
|
||||||
|
|
||||||
ToastNotificationHelper.ShowMovedToast(Entity, resource.GetResourceValue("EntityRestoredTitle"),
|
|
||||||
resource.GetResourceValue($"{type}Restored"));
|
|
||||||
Command.Execute(null);
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -6,7 +6,6 @@
|
|||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
<ResourceDictionary Source="ResourceDictionaries/Globals.xaml" />
|
|
||||||
<ResourceDictionary Source="ResourceDictionaries/TextBoxWithButtonStyle.xaml" />
|
<ResourceDictionary Source="ResourceDictionaries/TextBoxWithButtonStyle.xaml" />
|
||||||
<ResourceDictionary Source="ResourceDictionaries/HamburgerButtonStyle.xaml" />
|
<ResourceDictionary Source="ResourceDictionaries/HamburgerButtonStyle.xaml" />
|
||||||
<ResourceDictionary Source="ResourceDictionaries/ListViewLeftIndicatorStyle.xaml" />
|
<ResourceDictionary Source="ResourceDictionaries/ListViewLeftIndicatorStyle.xaml" />
|
||||||
|
@@ -30,7 +30,11 @@ namespace ModernKeePass
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
HockeyClient.Current.Configure("2fe83672887b4910b9de93a4398d0f8f");
|
HockeyClient.Current.Configure("2fe83672887b4910b9de93a4398d0f8f");
|
||||||
|
#else
|
||||||
|
HockeyClient.Current.Configure("9eb5fbb79b484fbd8daf04635e975c84");
|
||||||
|
#endif
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Suspending += OnSuspending;
|
Suspending += OnSuspending;
|
||||||
Resuming += OnResuming;
|
Resuming += OnResuming;
|
||||||
@@ -95,7 +99,7 @@ namespace ModernKeePass
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
if (System.Diagnostics.Debugger.IsAttached)
|
if (System.Diagnostics.Debugger.IsAttached)
|
||||||
{
|
{
|
||||||
DebugSettings.EnableFrameRateCounter = true;
|
//DebugSettings.EnableFrameRateCounter = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ namespace ModernKeePass.Common
|
|||||||
public RelayCommand(Action execute, Func<bool> canExecute)
|
public RelayCommand(Action execute, Func<bool> canExecute)
|
||||||
{
|
{
|
||||||
if (execute == null)
|
if (execute == null)
|
||||||
throw new ArgumentNullException("execute");
|
throw new ArgumentNullException(nameof(execute));
|
||||||
_execute = execute;
|
_execute = execute;
|
||||||
_canExecute = canExecute;
|
_canExecute = canExecute;
|
||||||
}
|
}
|
||||||
@@ -72,11 +72,7 @@ namespace ModernKeePass.Common
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void RaiseCanExecuteChanged()
|
public void RaiseCanExecuteChanged()
|
||||||
{
|
{
|
||||||
var handler = CanExecuteChanged;
|
CanExecuteChanged?.Invoke(this, EventArgs.Empty);
|
||||||
if (handler != null)
|
|
||||||
{
|
|
||||||
handler(this, EventArgs.Empty);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -11,16 +11,16 @@ namespace ModernKeePass.Common
|
|||||||
{
|
{
|
||||||
public static void ShowMovedToast(IPwEntity entity, string action, string text)
|
public static void ShowMovedToast(IPwEntity entity, string action, string text)
|
||||||
{
|
{
|
||||||
var entityType = entity is GroupVm ? "Group" : "Entry";
|
|
||||||
var notificationXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);
|
var notificationXml = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText02);
|
||||||
var toastElements = notificationXml.GetElementsByTagName("text");
|
var toastElements = notificationXml.GetElementsByTagName("text");
|
||||||
toastElements[0].AppendChild(notificationXml.CreateTextNode($"{action} {entityType} {entity.Name}"));
|
toastElements[0].AppendChild(notificationXml.CreateTextNode($"{action} {entity.Name}"));
|
||||||
toastElements[1].AppendChild(notificationXml.CreateTextNode(text));
|
toastElements[1].AppendChild(notificationXml.CreateTextNode(text));
|
||||||
var toastNode = notificationXml.SelectSingleNode("/toast");
|
var toastNode = notificationXml.SelectSingleNode("/toast");
|
||||||
|
|
||||||
|
// This is useful only for Windows 10 UWP
|
||||||
var launch = new JsonObject
|
var launch = new JsonObject
|
||||||
{
|
{
|
||||||
{"entityType", JsonValue.CreateStringValue(entityType)},
|
{"entityType", JsonValue.CreateStringValue(entity.GetType().Name)},
|
||||||
{"entityId", JsonValue.CreateStringValue(entity.Id)}
|
{"entityId", JsonValue.CreateStringValue(entity.Id)}
|
||||||
};
|
};
|
||||||
((XmlElement)toastNode)?.SetAttribute("launch", launch.Stringify());
|
((XmlElement)toastNode)?.SetAttribute("launch", launch.Stringify());
|
||||||
|
@@ -1,12 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Controls.Primitives;
|
|
||||||
|
|
||||||
namespace ModernKeePass.Controls
|
namespace ModernKeePass.Controls
|
||||||
{
|
{
|
||||||
public class TextBoxWithButton : TextBox
|
public class TextBoxWithButton : TextBox
|
||||||
{
|
{
|
||||||
|
public event EventHandler<RoutedEventArgs> ButtonClick;
|
||||||
|
|
||||||
public string ButtonSymbol
|
public string ButtonSymbol
|
||||||
{
|
{
|
||||||
get { return (string)GetValue(ButtonSymbolProperty); }
|
get { return (string)GetValue(ButtonSymbolProperty); }
|
||||||
@@ -18,7 +19,6 @@ namespace ModernKeePass.Controls
|
|||||||
typeof(string),
|
typeof(string),
|
||||||
typeof(TextBoxWithButton),
|
typeof(TextBoxWithButton),
|
||||||
new PropertyMetadata("", (o, args) => { }));
|
new PropertyMetadata("", (o, args) => { }));
|
||||||
public event EventHandler<RoutedEventArgs> ButtonClick;
|
|
||||||
|
|
||||||
public string ButtonTooltip
|
public string ButtonTooltip
|
||||||
{
|
{
|
||||||
|
@@ -75,6 +75,7 @@ namespace ModernKeePass.Converters
|
|||||||
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var symbol = (Symbol) value;
|
var symbol = (Symbol) value;
|
||||||
|
var defaultIcon = parameter != null ? int.Parse(parameter as string) : -1;
|
||||||
switch (symbol)
|
switch (symbol)
|
||||||
{
|
{
|
||||||
case Symbol.Delete: return (int)PwIcon.TrashBin;
|
case Symbol.Delete: return (int)PwIcon.TrashBin;
|
||||||
@@ -123,7 +124,7 @@ namespace ModernKeePass.Converters
|
|||||||
case Symbol.ZeroBars: return (int) PwIcon.Energy;
|
case Symbol.ZeroBars: return (int) PwIcon.Energy;
|
||||||
case Symbol.FourBars: return (int) PwIcon.EnergyCareful;
|
case Symbol.FourBars: return (int) PwIcon.EnergyCareful;
|
||||||
case Symbol.Scan: return (int) PwIcon.Scanner;
|
case Symbol.Scan: return (int) PwIcon.Scanner;
|
||||||
default: return (int) PwIcon.Key;
|
default: return defaultIcon;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
35
ModernKeePass/ImportFormats/CsvImportFormat.cs
Normal file
35
ModernKeePass/ImportFormats/CsvImportFormat.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Storage;
|
||||||
|
using ModernKeePass.Interfaces;
|
||||||
|
|
||||||
|
namespace ModernKeePass.ImportFormats
|
||||||
|
{
|
||||||
|
public class CsvImportFormat: IFormat
|
||||||
|
{
|
||||||
|
public bool HasHeaderRow { get; set; } = true;
|
||||||
|
public char Delimiter { get; set; } = ';';
|
||||||
|
public char LineDelimiter { get; set; } = '\n';
|
||||||
|
|
||||||
|
public async Task<List<Dictionary<string, string>>> Import(IStorageFile source)
|
||||||
|
{
|
||||||
|
var parsedResult = new List<Dictionary<string, string>>();
|
||||||
|
var content = await FileIO.ReadLinesAsync(source);
|
||||||
|
foreach (var line in content)
|
||||||
|
{
|
||||||
|
var fields = line.Split(Delimiter);
|
||||||
|
var recordItem = new Dictionary<string, string>();
|
||||||
|
var i = 0;
|
||||||
|
foreach (var field in fields)
|
||||||
|
{
|
||||||
|
recordItem.Add(i.ToString(), field);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
parsedResult.Add(recordItem);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parsedResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
ModernKeePass/ImportFormats/NullImportFormat.cs
Normal file
16
ModernKeePass/ImportFormats/NullImportFormat.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using Windows.Storage;
|
||||||
|
using ModernKeePass.Interfaces;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace ModernKeePass.ImportFormats
|
||||||
|
{
|
||||||
|
public class NullImportFormat: IFormat
|
||||||
|
{
|
||||||
|
public Task<List<Dictionary<string, string>>> Import(IStorageFile source)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
ModernKeePass/Interfaces/IFormat.cs
Normal file
11
ModernKeePass/Interfaces/IFormat.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Storage;
|
||||||
|
|
||||||
|
namespace ModernKeePass.Interfaces
|
||||||
|
{
|
||||||
|
public interface IFormat
|
||||||
|
{
|
||||||
|
Task<List<Dictionary<string, string>>> Import(IStorageFile source);
|
||||||
|
}
|
||||||
|
}
|
11
ModernKeePass/Interfaces/IImportService.cs
Normal file
11
ModernKeePass/Interfaces/IImportService.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Storage;
|
||||||
|
using ModernKeePass.ViewModels;
|
||||||
|
|
||||||
|
namespace ModernKeePass.Interfaces
|
||||||
|
{
|
||||||
|
public interface IImportService<in T> where T: IFormat
|
||||||
|
{
|
||||||
|
Task Import(T format, IStorageFile source, GroupVm group);
|
||||||
|
}
|
||||||
|
}
|
@@ -23,7 +23,6 @@ namespace ModernKeePass.Interfaces
|
|||||||
/// Restore ViewModel
|
/// Restore ViewModel
|
||||||
/// </summary>
|
/// </summary>
|
||||||
ICommand UndoDeleteCommand { get; }
|
ICommand UndoDeleteCommand { get; }
|
||||||
ICommand GoBackCommand { get; set; }
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Move a entity to the destination group
|
/// Move a entity to the destination group
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
|
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_APP</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
@@ -109,7 +110,6 @@
|
|||||||
<Compile Include="Actions\ClipboardAction.cs" />
|
<Compile Include="Actions\ClipboardAction.cs" />
|
||||||
<Compile Include="Actions\DeleteEntityAction.cs" />
|
<Compile Include="Actions\DeleteEntityAction.cs" />
|
||||||
<Compile Include="Actions\NavigateToUrlAction.cs" />
|
<Compile Include="Actions\NavigateToUrlAction.cs" />
|
||||||
<Compile Include="Actions\RestoreEntityAction.cs" />
|
|
||||||
<Compile Include="Actions\SetupFocusAction.cs" />
|
<Compile Include="Actions\SetupFocusAction.cs" />
|
||||||
<Compile Include="Actions\ToastAction.cs" />
|
<Compile Include="Actions\ToastAction.cs" />
|
||||||
<Compile Include="App.xaml.cs">
|
<Compile Include="App.xaml.cs">
|
||||||
@@ -117,10 +117,15 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Converters\IntToSymbolConverter.cs" />
|
<Compile Include="Converters\IntToSymbolConverter.cs" />
|
||||||
<Compile Include="Exceptions\NavigationException.cs" />
|
<Compile Include="Exceptions\NavigationException.cs" />
|
||||||
|
<Compile Include="ImportFormats\CsvImportFormat.cs" />
|
||||||
|
<Compile Include="ImportFormats\NullImportFormat.cs" />
|
||||||
|
<Compile Include="Interfaces\IFormat.cs" />
|
||||||
|
<Compile Include="Interfaces\IImportService.cs" />
|
||||||
<Compile Include="Interfaces\IProxyInvocationHandler.cs" />
|
<Compile Include="Interfaces\IProxyInvocationHandler.cs" />
|
||||||
<Compile Include="Interfaces\IRecentService.cs" />
|
<Compile Include="Interfaces\IRecentService.cs" />
|
||||||
<Compile Include="Interfaces\IRecentItem.cs" />
|
<Compile Include="Interfaces\IRecentItem.cs" />
|
||||||
<Compile Include="Interfaces\IResourceService.cs" />
|
<Compile Include="Interfaces\IResourceService.cs" />
|
||||||
|
<Compile Include="Services\ImportService.cs" />
|
||||||
<Compile Include="Services\SingletonServiceBase.cs" />
|
<Compile Include="Services\SingletonServiceBase.cs" />
|
||||||
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
<Compile Include="TemplateSelectors\SelectableDataTemplateSelector.cs" />
|
||||||
<Compile Include="ViewModels\Items\SettingsSaveVm.cs" />
|
<Compile Include="ViewModels\Items\SettingsSaveVm.cs" />
|
||||||
@@ -148,6 +153,9 @@
|
|||||||
<Compile Include="Interfaces\IHasSelectableObject.cs" />
|
<Compile Include="Interfaces\IHasSelectableObject.cs" />
|
||||||
<Compile Include="Interfaces\ISelectableModel.cs" />
|
<Compile Include="Interfaces\ISelectableModel.cs" />
|
||||||
<Compile Include="Views\BasePages\LayoutAwarePageBase.cs" />
|
<Compile Include="Views\BasePages\LayoutAwarePageBase.cs" />
|
||||||
|
<Compile Include="Views\MainPageFrames\ImportExportPage.xaml.cs">
|
||||||
|
<DependentUpon>ImportExportPage.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Views\SettingsPageFrames\SettingsDatabasePage.xaml.cs">
|
<Compile Include="Views\SettingsPageFrames\SettingsDatabasePage.xaml.cs">
|
||||||
<DependentUpon>SettingsDatabasePage.xaml</DependentUpon>
|
<DependentUpon>SettingsDatabasePage.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -261,16 +269,15 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
<Page Include="ResourceDictionaries\Globals.xaml">
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
<Generator>MSBuild:Compile</Generator>
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Page>
|
|
||||||
<Page Include="ResourceDictionaries\NoBorderToggleButtonStyle.xaml">
|
<Page Include="ResourceDictionaries\NoBorderToggleButtonStyle.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Views\MainPageFrames\ImportExportPage.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Views\SettingsPageFrames\SettingsSavePage.xaml">
|
<Page Include="Views\SettingsPageFrames\SettingsSavePage.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
@@ -386,8 +393,8 @@
|
|||||||
</Page>
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.2\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
<HintPath>..\packages\Portable.BouncyCastle.1.8.3\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.HockeyApp.Core45, Version=4.1.6.1005, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.HockeyApp.Core45, Version=4.1.6.1005, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
@@ -410,10 +417,38 @@
|
|||||||
<HintPath>..\packages\Splat.3.0.0\lib\netstandard1.1\Splat.dll</HintPath>
|
<HintPath>..\packages\Splat.3.0.0\lib\netstandard1.1\Splat.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Composition.AttributedModel, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Composition.AttributedModel.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Composition.Convention, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Composition.Convention.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Composition.Hosting, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Composition.Hosting.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Composition.Runtime, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Composition.Runtime.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Composition.TypedParts, Version=1.0.33.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Composition.TypedParts.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\netstandard1.1\System.Drawing.Primitives.dll</HintPath>
|
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\netstandard1.1\System.Drawing.Primitives.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Reflection.Metadata, Version=1.4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\System.Reflection.Metadata.1.6.0\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\win8\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\win8\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
|
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
|
||||||
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.14.0.32" />
|
<Identity Name="wismna.ModernKeePass" Publisher="CN=0719A91A-C322-4EE0-A257-E60733EECF06" Version="1.15.0.0" />
|
||||||
<Properties>
|
<Properties>
|
||||||
<DisplayName>ModernKeePass</DisplayName>
|
<DisplayName>ModernKeePass</DisplayName>
|
||||||
<PublisherDisplayName>wismna</PublisherDisplayName>
|
<PublisherDisplayName>wismna</PublisherDisplayName>
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
<ResourceDictionary
|
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
||||||
<x:Double x:Key="MenuSize">60</x:Double>
|
|
||||||
<GridLength x:Key="MenuGridLength">60</GridLength>
|
|
||||||
<SolidColorBrush x:Key="MainColor" Color="{StaticResource SystemAccentColor}" />
|
|
||||||
<SolidColorBrush x:Key="TextColor" Color="{StaticResource SystemColorHighlightTextColor}" />
|
|
||||||
</ResourceDictionary>
|
|
@@ -2,7 +2,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
|
||||||
<Style TargetType="ToggleButton" x:Name="HamburgerToggleButton">
|
<Style TargetType="ToggleButton" x:Key="HamburgerToggleButton">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="ToggleButton">
|
<ControlTemplate TargetType="ToggleButton">
|
||||||
|
@@ -191,7 +191,7 @@
|
|||||||
To="1" />
|
To="1" />
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter"
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter"
|
||||||
Storyboard.TargetProperty="Foreground">
|
Storyboard.TargetProperty="Foreground">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource MainColor}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MainColor}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
@@ -358,13 +358,13 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<Border x:Name="SelectedLeftIndicator"
|
<Border x:Name="SelectedLeftIndicator"
|
||||||
BorderBrush="{ThemeResource MainColor}"
|
BorderBrush="{StaticResource MainColor}"
|
||||||
BorderThickness="5,0,0,0"
|
BorderThickness="5,0,0,0"
|
||||||
Opacity="0"/>
|
Opacity="0"/>
|
||||||
<Rectangle x:Name="SelectedBorder"
|
<Rectangle x:Name="SelectedBorder"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
Opacity="0"
|
Opacity="0"
|
||||||
Stroke="{ThemeResource MainColor}"
|
Stroke="{StaticResource MainColor}"
|
||||||
StrokeThickness="{ThemeResource ListViewItemSelectedBorderThemeThickness}"
|
StrokeThickness="{ThemeResource ListViewItemSelectedBorderThemeThickness}"
|
||||||
Margin="0" />
|
Margin="0" />
|
||||||
<Border x:Name="SelectedCheckMarkOuter"
|
<Border x:Name="SelectedCheckMarkOuter"
|
||||||
@@ -373,7 +373,7 @@
|
|||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="4">
|
Margin="4">
|
||||||
<Grid x:Name="SelectedCheckMark" Opacity="0" Height="40" Width="40">
|
<Grid x:Name="SelectedCheckMark" Opacity="0" Height="40" Width="40">
|
||||||
<Path x:Name="SelectedEarmark" Data="M0,0 L40,0 L40,40 z" Fill="{ThemeResource MainColor}" Stretch="Fill"/>
|
<Path x:Name="SelectedEarmark" Data="M0,0 L40,0 L40,40 z" Fill="{StaticResource MainColor}" Stretch="Fill"/>
|
||||||
<Path Data="F1 M133.1,17.9 L137.2,13.2 L144.6,19.6 L156.4,5.8 L161.2,9.9 L145.6,28.4 z" Fill="{ThemeResource ListViewItemCheckThemeBrush}" Height="13" Stretch="Fill" Width="15" HorizontalAlignment="Right" Margin="0,5.5,5.5,0" VerticalAlignment="Top" FlowDirection="LeftToRight"/>
|
<Path Data="F1 M133.1,17.9 L137.2,13.2 L144.6,19.6 L156.4,5.8 L161.2,9.9 L145.6,28.4 z" Fill="{ThemeResource ListViewItemCheckThemeBrush}" Height="13" Stretch="Fill" Width="15" HorizontalAlignment="Right" Margin="0,5.5,5.5,0" VerticalAlignment="Top" FlowDirection="LeftToRight"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -3,13 +3,13 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:controls="using:ModernKeePass.Controls">
|
xmlns:controls="using:ModernKeePass.Controls">
|
||||||
|
|
||||||
<Style TargetType="controls:TextBoxWithButton" x:Name="TextBoxWithButtonStyle">
|
<Style TargetType="controls:TextBoxWithButton" x:Key="TextBoxWithButtonStyle">
|
||||||
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||||
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
||||||
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
||||||
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextSelectionHighlightColorThemeBrush}" />
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource MainColor}" />
|
||||||
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
||||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<!--<VisualState x:Name="Disabled">
|
<VisualState x:Name="Disabled">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
<DoubleAnimation Storyboard.TargetName="BackgroundElement"
|
||||||
Storyboard.TargetProperty="Opacity"
|
Storyboard.TargetProperty="Opacity"
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
To="0"
|
To="0"
|
||||||
Duration="0" />
|
Duration="0" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>-->
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<Border x:Name="BorderElement"
|
<Border x:Name="BorderElement"
|
||||||
@@ -82,16 +82,15 @@
|
|||||||
<Border x:Name="BackgroundElement"
|
<Border x:Name="BackgroundElement"
|
||||||
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
Background="{ThemeResource TextBoxButtonBackgroundThemeBrush}"
|
||||||
Margin="{TemplateBinding BorderThickness}">
|
Margin="{TemplateBinding BorderThickness}">
|
||||||
<TextBlock x:Name="GlyphElement"
|
<TextBlock x:Name="GlyphElement"
|
||||||
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
Foreground="{ThemeResource TextBoxButtonForegroundThemeBrush}"
|
||||||
Padding="4,0,4,0"
|
VerticalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
FontStyle="Normal"
|
||||||
FontStyle="Normal"
|
Padding="4,0,4,0"
|
||||||
Text="{TemplateBinding Content}"
|
Text="{TemplateBinding Content}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
AutomationProperties.AccessibilityView="Raw"/>
|
||||||
AutomationProperties.AccessibilityView="Raw"/>
|
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
@@ -194,24 +193,22 @@
|
|||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
Margin="{TemplateBinding BorderThickness}"
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2" />
|
||||||
Grid.RowSpan="1"/>
|
|
||||||
<Border x:Name="BorderElement"
|
<Border x:Name="BorderElement"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2" Grid.Column="0" />
|
||||||
Grid.RowSpan="1"/>
|
|
||||||
<ContentPresenter x:Name="HeaderContentPresenter"
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
Foreground="{ThemeResource TextBoxForegroundHeaderThemeBrush}"
|
||||||
Margin="0,4,0,4"
|
Margin="0,4,0,4"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2" Grid.Column="0"
|
||||||
Content="{TemplateBinding Header}"
|
Content="{TemplateBinding Header}"
|
||||||
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
||||||
FontWeight="Semilight" />
|
FontWeight="Semilight" />
|
||||||
<ScrollViewer x:Name="ContentElement"
|
<ScrollViewer x:Name="ContentElement"
|
||||||
Grid.Row="1"
|
Grid.Row="1" Grid.Column="0"
|
||||||
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||||
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||||
@@ -219,7 +216,6 @@
|
|||||||
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
||||||
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
||||||
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
||||||
Margin="{TemplateBinding BorderThickness}"
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
@@ -230,9 +226,8 @@
|
|||||||
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
Foreground="{ThemeResource TextBoxPlaceholderTextThemeBrush}"
|
||||||
Margin="{TemplateBinding BorderThickness}"
|
Margin="{TemplateBinding BorderThickness}"
|
||||||
Padding="{TemplateBinding Padding}"
|
Padding="{TemplateBinding Padding}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2" Grid.Column="0"
|
||||||
Content="{TemplateBinding PlaceholderText}"
|
Content="{TemplateBinding PlaceholderText}"
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
<Button x:Name="ActionButton"
|
<Button x:Name="ActionButton"
|
||||||
|
@@ -5,11 +5,9 @@ using ModernKeePass.Exceptions;
|
|||||||
using ModernKeePass.Interfaces;
|
using ModernKeePass.Interfaces;
|
||||||
using ModernKeePass.ViewModels;
|
using ModernKeePass.ViewModels;
|
||||||
using ModernKeePassLib;
|
using ModernKeePassLib;
|
||||||
using ModernKeePassLib.Collections;
|
|
||||||
using ModernKeePassLib.Cryptography.KeyDerivation;
|
using ModernKeePassLib.Cryptography.KeyDerivation;
|
||||||
using ModernKeePassLib.Interfaces;
|
using ModernKeePassLib.Interfaces;
|
||||||
using ModernKeePassLib.Keys;
|
using ModernKeePassLib.Keys;
|
||||||
using ModernKeePassLib.Security;
|
|
||||||
using ModernKeePassLib.Serialization;
|
using ModernKeePassLib.Serialization;
|
||||||
|
|
||||||
namespace ModernKeePass.Services
|
namespace ModernKeePass.Services
|
||||||
@@ -73,7 +71,7 @@ namespace ModernKeePass.Services
|
|||||||
{
|
{
|
||||||
_settings = settings;
|
_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Open a KeePass database
|
/// Open a KeePass database
|
||||||
@@ -100,9 +98,7 @@ namespace ModernKeePass.Services
|
|||||||
if (createNew)
|
if (createNew)
|
||||||
{
|
{
|
||||||
_pwDatabase.New(ioConnection, key);
|
_pwDatabase.New(ioConnection, key);
|
||||||
|
|
||||||
//Get settings default values
|
|
||||||
if (_settings.GetSetting<bool>("Sample")) CreateSampleData();
|
|
||||||
var fileFormat = _settings.GetSetting<string>("DefaultFileFormat");
|
var fileFormat = _settings.GetSetting<string>("DefaultFileFormat");
|
||||||
switch (fileFormat)
|
switch (fileFormat)
|
||||||
{
|
{
|
||||||
@@ -122,7 +118,7 @@ namespace ModernKeePass.Services
|
|||||||
throw new ArgumentException(ex.Message, ex);
|
throw new ArgumentException(ex.Message, ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReOpen()
|
public void ReOpen()
|
||||||
{
|
{
|
||||||
Open(_databaseFile, _compositeKey);
|
Open(_databaseFile, _compositeKey);
|
||||||
@@ -190,37 +186,5 @@ namespace ModernKeePass.Services
|
|||||||
_compositeKey = newCompositeKey;
|
_compositeKey = newCompositeKey;
|
||||||
_pwDatabase.MasterKey = newCompositeKey;
|
_pwDatabase.MasterKey = newCompositeKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateSampleData()
|
|
||||||
{
|
|
||||||
_pwDatabase.RootGroup.AddGroup(new PwGroup(true, true, "Banking", PwIcon.Count), true);
|
|
||||||
_pwDatabase.RootGroup.AddGroup(new PwGroup(true, true, "Email", PwIcon.EMail), true);
|
|
||||||
_pwDatabase.RootGroup.AddGroup(new PwGroup(true, true, "Internet", PwIcon.World), true);
|
|
||||||
|
|
||||||
var pe = new PwEntry(true, true);
|
|
||||||
pe.Strings.Set(PwDefs.TitleField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectTitle,
|
|
||||||
"Sample Entry"));
|
|
||||||
pe.Strings.Set(PwDefs.UserNameField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectUserName,
|
|
||||||
"Username"));
|
|
||||||
pe.Strings.Set(PwDefs.UrlField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectUrl,
|
|
||||||
PwDefs.HomepageUrl));
|
|
||||||
pe.Strings.Set(PwDefs.PasswordField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectPassword,
|
|
||||||
"Password"));
|
|
||||||
pe.Strings.Set(PwDefs.NotesField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectNotes,
|
|
||||||
"You may safely delete this sample"));
|
|
||||||
_pwDatabase.RootGroup.AddEntry(pe, true);
|
|
||||||
|
|
||||||
pe = new PwEntry(true, true);
|
|
||||||
pe.Strings.Set(PwDefs.TitleField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectTitle,
|
|
||||||
"Sample Entry #2"));
|
|
||||||
pe.Strings.Set(PwDefs.UserNameField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectUserName,
|
|
||||||
"Michael321"));
|
|
||||||
pe.Strings.Set(PwDefs.UrlField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectUrl,
|
|
||||||
PwDefs.HelpUrl + "kb/testform.html"));
|
|
||||||
pe.Strings.Set(PwDefs.PasswordField, new ProtectedString(_pwDatabase.MemoryProtection.ProtectPassword,
|
|
||||||
"12345"));
|
|
||||||
pe.AutoType.Add(new AutoTypeAssociation("*Test Form - KeePass*", string.Empty));
|
|
||||||
_pwDatabase.RootGroup.AddEntry(pe, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
25
ModernKeePass/Services/ImportService.cs
Normal file
25
ModernKeePass/Services/ImportService.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using System.Threading.Tasks;
|
||||||
|
using Windows.Storage;
|
||||||
|
using ModernKeePass.Interfaces;
|
||||||
|
using ModernKeePass.ViewModels;
|
||||||
|
|
||||||
|
namespace ModernKeePass.Services
|
||||||
|
{
|
||||||
|
public class ImportService : IImportService<IFormat>
|
||||||
|
{
|
||||||
|
public async Task Import(IFormat format, IStorageFile source, GroupVm group)
|
||||||
|
{
|
||||||
|
var data = await format.Import(source);
|
||||||
|
|
||||||
|
foreach (var entity in data)
|
||||||
|
{
|
||||||
|
var entry = group.AddNewEntry();
|
||||||
|
entry.Name = entity["0"];
|
||||||
|
entry.UserName = entity["1"];
|
||||||
|
entry.Password = entity["2"];
|
||||||
|
if (entity.Count > 3) entry.Url = entity["3"];
|
||||||
|
if (entity.Count > 4) entry.Notes = entity["4"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -4,8 +4,6 @@ namespace ModernKeePass.Services
|
|||||||
{
|
{
|
||||||
public abstract class SingletonServiceBase<T> where T : new()
|
public abstract class SingletonServiceBase<T> where T : new()
|
||||||
{
|
{
|
||||||
protected SingletonServiceBase() { }
|
|
||||||
|
|
||||||
private static readonly Lazy<T> LazyInstance =
|
private static readonly Lazy<T> LazyInstance =
|
||||||
new Lazy<T>(() => new T());
|
new Lazy<T>(() => new T());
|
||||||
|
|
||||||
|
@@ -135,48 +135,6 @@
|
|||||||
<data name="CompositeKeyUpdated" xml:space="preserve">
|
<data name="CompositeKeyUpdated" xml:space="preserve">
|
||||||
<value>Database composite key updated.</value>
|
<value>Database composite key updated.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DonateAlreadyPurchasedMessage" xml:space="preserve">
|
|
||||||
<value>Your product has already been purchased.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateAlreadyPurchasedTitle" xml:space="preserve">
|
|
||||||
<value>Purchase</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNothingToFulfillMessage" xml:space="preserve">
|
|
||||||
<value>No purchased product to fulfill</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNothingToFulfillTitle" xml:space="preserve">
|
|
||||||
<value>Fulfillment</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNotPurchasedMessage" xml:space="preserve">
|
|
||||||
<value>The purchase failed because we haven't confirmed fulfillment of a previous purchase.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNotPurchasedTitle" xml:space="preserve">
|
|
||||||
<value>Purchase</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchasePendingMessage" xml:space="preserve">
|
|
||||||
<value>The purchase is pending so we cannot fulfill the product.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchasePendingTitle" xml:space="preserve">
|
|
||||||
<value>Purchase</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchaseRevertedMessage" xml:space="preserve">
|
|
||||||
<value>Your purchase has been reverted.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchaseRevertedTitle" xml:space="preserve">
|
|
||||||
<value>Purchase</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateServerErrorMessage" xml:space="preserve">
|
|
||||||
<value>Impossible to contact the Windows Store, there was an error when fulfilling.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateServerErrorTitle" xml:space="preserve">
|
|
||||||
<value>Error</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateSucceededMessage" xml:space="preserve">
|
|
||||||
<value>Your donation was successful.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateSucceededTitle" xml:space="preserve">
|
|
||||||
<value>Thank you!</value>
|
|
||||||
</data>
|
|
||||||
<data name="EntityDeleteActionButton" xml:space="preserve">
|
<data name="EntityDeleteActionButton" xml:space="preserve">
|
||||||
<value>Delete</value>
|
<value>Delete</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -297,4 +255,7 @@
|
|||||||
<data name="ToastSavedMessage" xml:space="preserve">
|
<data name="ToastSavedMessage" xml:space="preserve">
|
||||||
<value>Database successfully saved!</value>
|
<value>Database successfully saved!</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="NewImportFormatHelpCSV" xml:space="preserve">
|
||||||
|
<value>The CSV file needs to be formatted as such: Name of the account;Login;Password;URL;Comments</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -210,9 +210,6 @@
|
|||||||
<data name="GroupCreateEntry.Text" xml:space="preserve">
|
<data name="GroupCreateEntry.Text" xml:space="preserve">
|
||||||
<value>Create new entry</value>
|
<value>Create new entry</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupFilter.PlaceholderText" xml:space="preserve">
|
|
||||||
<value>Filter...</value>
|
|
||||||
</data>
|
|
||||||
<data name="GroupSearch.PlaceholderText" xml:space="preserve">
|
<data name="GroupSearch.PlaceholderText" xml:space="preserve">
|
||||||
<value>Search...</value>
|
<value>Search...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -388,13 +385,13 @@
|
|||||||
<value>History</value>
|
<value>History</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyLogin.Message" xml:space="preserve">
|
<data name="ToastCopyLogin.Message" xml:space="preserve">
|
||||||
<value>Login successfully copied!</value>
|
<value>Login copied to clipboard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyPassword.Message" xml:space="preserve">
|
<data name="ToastCopyPassword.Message" xml:space="preserve">
|
||||||
<value>Password successfully copied!</value>
|
<value>Password copied to clipboard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyUrl.Message" xml:space="preserve">
|
<data name="ToastCopyUrl.Message" xml:space="preserve">
|
||||||
<value>URL successfully copied!</value>
|
<value>URL copied to clipboard</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EntryBackgroundColor.Text" xml:space="preserve">
|
<data name="EntryBackgroundColor.Text" xml:space="preserve">
|
||||||
<value>Background color</value>
|
<value>Background color</value>
|
||||||
@@ -465,4 +462,34 @@
|
|||||||
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
||||||
<value>New entry name...</value>
|
<value>New entry name...</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
||||||
|
<value>Search</value>
|
||||||
|
</data>
|
||||||
|
<data name="SearchButtonTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Search</value>
|
||||||
|
</data>
|
||||||
|
<data name="LoginTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copy login</value>
|
||||||
|
</data>
|
||||||
|
<data name="PasswordTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copy password</value>
|
||||||
|
</data>
|
||||||
|
<data name="UrlTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Navigate to URL</value>
|
||||||
|
</data>
|
||||||
|
<data name="RestoreEntryCommand.Message" xml:space="preserve">
|
||||||
|
<value>Entry restored to its original position</value>
|
||||||
|
</data>
|
||||||
|
<data name="RestoreGroupCommand.Message" xml:space="preserve">
|
||||||
|
<value>Group restored to its original position</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportCheckbox.Content" xml:space="preserve">
|
||||||
|
<value>Import existing data</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportFile.Content" xml:space="preserve">
|
||||||
|
<value>Select a file to import...</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportFormat.Text" xml:space="preserve">
|
||||||
|
<value>Format</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -135,48 +135,6 @@
|
|||||||
<data name="CompositeKeyUpdated" xml:space="preserve">
|
<data name="CompositeKeyUpdated" xml:space="preserve">
|
||||||
<value>Clé composite de la base de données mise à jour.</value>
|
<value>Clé composite de la base de données mise à jour.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DonateAlreadyPurchasedMessage" xml:space="preserve">
|
|
||||||
<value>Vous avez déjà acheté ce produit.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateAlreadyPurchasedTitle" xml:space="preserve">
|
|
||||||
<value>Achat</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNothingToFulfillMessage" xml:space="preserve">
|
|
||||||
<value>Il n'y a aucun produit acheté à valider.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNothingToFulfillTitle" xml:space="preserve">
|
|
||||||
<value>Validation</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNotPurchasedMessage" xml:space="preserve">
|
|
||||||
<value>L'achat a échoué parce que nous n'avons pas pu valider un achat précédent.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateNotPurchasedTitle" xml:space="preserve">
|
|
||||||
<value>Achat</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchasePendingMessage" xml:space="preserve">
|
|
||||||
<value>Un achat est en cours donc nous ne pouvons le valider.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchasePendingTitle" xml:space="preserve">
|
|
||||||
<value>Achat</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchaseRevertedMessage" xml:space="preserve">
|
|
||||||
<value>Votre achat a été annulé.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonatePurchaseRevertedTitle" xml:space="preserve">
|
|
||||||
<value>Achat</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateServerErrorMessage" xml:space="preserve">
|
|
||||||
<value>Impossible de contacter le Windows Store, l'achat n'a pas été réalisé.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateServerErrorTitle" xml:space="preserve">
|
|
||||||
<value>Erreur</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateSucceededMessage" xml:space="preserve">
|
|
||||||
<value>Votre don a été enregistré.</value>
|
|
||||||
</data>
|
|
||||||
<data name="DonateSucceededTitle" xml:space="preserve">
|
|
||||||
<value>Merci!</value>
|
|
||||||
</data>
|
|
||||||
<data name="EntityDeleteActionButton" xml:space="preserve">
|
<data name="EntityDeleteActionButton" xml:space="preserve">
|
||||||
<value>Supprimer</value>
|
<value>Supprimer</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -297,4 +255,7 @@
|
|||||||
<data name="ToastSavedMessage" xml:space="preserve">
|
<data name="ToastSavedMessage" xml:space="preserve">
|
||||||
<value>Base de données sauvegardée avec succès !</value>
|
<value>Base de données sauvegardée avec succès !</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="NewImportFormatHelpCSV" xml:space="preserve">
|
||||||
|
<value>Le fichier CSV doit être formatté de la façon suivante: Nom du compte;Login;Mot de passe;URL;Commentaires</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -210,9 +210,6 @@
|
|||||||
<data name="GroupCreateEntry.Text" xml:space="preserve">
|
<data name="GroupCreateEntry.Text" xml:space="preserve">
|
||||||
<value>Créer une nouvelle entrée</value>
|
<value>Créer une nouvelle entrée</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupFilter.PlaceholderText" xml:space="preserve">
|
|
||||||
<value>Filtrer...</value>
|
|
||||||
</data>
|
|
||||||
<data name="GroupSearch.PlaceholderText" xml:space="preserve">
|
<data name="GroupSearch.PlaceholderText" xml:space="preserve">
|
||||||
<value>Rechercher...</value>
|
<value>Rechercher...</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -388,13 +385,13 @@
|
|||||||
<value>Historique</value>
|
<value>Historique</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyLogin.Message" xml:space="preserve">
|
<data name="ToastCopyLogin.Message" xml:space="preserve">
|
||||||
<value>Login copié avec succès !</value>
|
<value>Login copié dans le presse-papiers</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyPassword.Message" xml:space="preserve">
|
<data name="ToastCopyPassword.Message" xml:space="preserve">
|
||||||
<value>Mot de passe copié avec succès !</value>
|
<value>Mot de passe copié dans le presse-papiers</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ToastCopyUrl.Message" xml:space="preserve">
|
<data name="ToastCopyUrl.Message" xml:space="preserve">
|
||||||
<value>URL copié avec succès !</value>
|
<value>URL copié dans le presse-papiers</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EntryBackgroundColor.Text" xml:space="preserve">
|
<data name="EntryBackgroundColor.Text" xml:space="preserve">
|
||||||
<value>Couleur d'arrière plan</value>
|
<value>Couleur d'arrière plan</value>
|
||||||
@@ -465,4 +462,37 @@
|
|||||||
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
<data name="EntryTitle.PlaceholderText" xml:space="preserve">
|
||||||
<value>Nom de la nouvelle entrée...</value>
|
<value>Nom de la nouvelle entrée...</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SearchButtonLabel.Text" xml:space="preserve">
|
||||||
|
<value>Recherche</value>
|
||||||
|
</data>
|
||||||
|
<data name="SearchButtonTooltip.Content" xml:space="preserve">
|
||||||
|
<value>Rechercher</value>
|
||||||
|
</data>
|
||||||
|
<data name="LoginTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copier le login</value>
|
||||||
|
</data>
|
||||||
|
<data name="PasswordTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Copier le mot de passe</value>
|
||||||
|
</data>
|
||||||
|
<data name="UrlTextBox.ButtonTooltip" xml:space="preserve">
|
||||||
|
<value>Naviguer vers l'URL</value>
|
||||||
|
</data>
|
||||||
|
<data name="RestoreEntryCommand.Message" xml:space="preserve">
|
||||||
|
<value>Entrée replacée à son emplacement d'origine</value>
|
||||||
|
</data>
|
||||||
|
<data name="RestoreGroupCommand.Message" xml:space="preserve">
|
||||||
|
<value>Groupe replacée à son emplacement d'origine</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportCheckbox.Content" xml:space="preserve">
|
||||||
|
<value>Importer des données existantes</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportFile.Content" xml:space="preserve">
|
||||||
|
<value>Sélectionnez un fichier à importer...</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportFormat.Text" xml:space="preserve">
|
||||||
|
<value>Format</value>
|
||||||
|
</data>
|
||||||
|
<data name="NewImportFormatHelp.Text" xml:space="preserve">
|
||||||
|
<value>Le fichier CSV doit être formatté de la façon suivante: Nom du compte;Login;Mot de passe:URL;Commentaires</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
@@ -125,6 +125,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
_isOpening = true;
|
_isOpening = true;
|
||||||
|
OnPropertyChanged("IsValid");
|
||||||
Database.Open(databaseFile, CreateCompositeKey(), createNew);
|
Database.Open(databaseFile, CreateCompositeKey(), createNew);
|
||||||
await Task.Run(() => RootGroup = Database.RootGroup);
|
await Task.Run(() => RootGroup = Database.RootGroup);
|
||||||
return true;
|
return true;
|
||||||
@@ -145,6 +146,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_isOpening = false;
|
_isOpening = false;
|
||||||
|
OnPropertyChanged("IsValid");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -92,19 +92,33 @@ namespace ModernKeePass.ViewModels
|
|||||||
if (_pwEntry?.IconId != null) return (int) _pwEntry?.IconId;
|
if (_pwEntry?.IconId != null) return (int) _pwEntry?.IconId;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
set { _pwEntry.IconId = (PwIcon)value; }
|
set
|
||||||
|
{
|
||||||
|
HandleBackup();
|
||||||
|
_pwEntry.IconId = (PwIcon)value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public DateTimeOffset ExpiryDate
|
public DateTimeOffset ExpiryDate
|
||||||
{
|
{
|
||||||
get { return new DateTimeOffset(_pwEntry.ExpiryTime.Date); }
|
get { return new DateTimeOffset(_pwEntry.ExpiryTime.Date); }
|
||||||
set { if (HasExpirationDate) _pwEntry.ExpiryTime = value.DateTime; }
|
set
|
||||||
|
{
|
||||||
|
if (!HasExpirationDate) return;
|
||||||
|
HandleBackup();
|
||||||
|
_pwEntry.ExpiryTime = value.DateTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TimeSpan ExpiryTime
|
public TimeSpan ExpiryTime
|
||||||
{
|
{
|
||||||
get { return _pwEntry.ExpiryTime.TimeOfDay; }
|
get { return _pwEntry.ExpiryTime.TimeOfDay; }
|
||||||
set { if (HasExpirationDate) _pwEntry.ExpiryTime = _pwEntry.ExpiryTime.Date.Add(value); }
|
set
|
||||||
|
{
|
||||||
|
if (!HasExpirationDate) return;
|
||||||
|
HandleBackup();
|
||||||
|
_pwEntry.ExpiryTime = _pwEntry.ExpiryTime.Date.Add(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEditMode
|
public bool IsEditMode
|
||||||
@@ -170,6 +184,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
if (value != null) _pwEntry.BackgroundColor = (Color) value;
|
if (value != null) _pwEntry.BackgroundColor = (Color) value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Color? ForegroundColor
|
public Color? ForegroundColor
|
||||||
{
|
{
|
||||||
get { return _pwEntry?.ForegroundColor; }
|
get { return _pwEntry?.ForegroundColor; }
|
||||||
@@ -182,7 +197,6 @@ namespace ModernKeePass.ViewModels
|
|||||||
public ICommand SaveCommand { get; }
|
public ICommand SaveCommand { get; }
|
||||||
public ICommand GeneratePasswordCommand { get; }
|
public ICommand GeneratePasswordCommand { get; }
|
||||||
public ICommand UndoDeleteCommand { get; }
|
public ICommand UndoDeleteCommand { get; }
|
||||||
public ICommand GoBackCommand { get; set; }
|
|
||||||
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
@@ -190,7 +204,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
private readonly IDatabaseService _database;
|
private readonly IDatabaseService _database;
|
||||||
private readonly IResourceService _resource;
|
private readonly IResourceService _resource;
|
||||||
private bool _isEditMode;
|
private bool _isEditMode;
|
||||||
private bool _isDirty;
|
private bool _isDirty = true;
|
||||||
private bool _isRevealPassword;
|
private bool _isRevealPassword;
|
||||||
private double _passwordLength = 25;
|
private double _passwordLength = 25;
|
||||||
private bool _isVisible = true;
|
private bool _isVisible = true;
|
||||||
@@ -213,7 +227,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
|
|
||||||
SaveCommand = new RelayCommand(() => _database.Save());
|
SaveCommand = new RelayCommand(() => _database.Save());
|
||||||
GeneratePasswordCommand = new RelayCommand(GeneratePassword);
|
GeneratePasswordCommand = new RelayCommand(GeneratePassword);
|
||||||
UndoDeleteCommand = new RelayCommand(() => Move(PreviousGroup));
|
UndoDeleteCommand = new RelayCommand(() => Move(PreviousGroup), () => PreviousGroup != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GeneratePassword()
|
public void GeneratePassword()
|
||||||
@@ -286,6 +300,14 @@ namespace ModernKeePass.ViewModels
|
|||||||
return IsSelected ? _resource.GetResourceValue("EntryCurrent") : _pwEntry.LastModificationTime.ToString("g");
|
return IsSelected ? _resource.GetResourceValue("EntryCurrent") : _pwEntry.LastModificationTime.ToString("g");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void HandleBackup()
|
||||||
|
{
|
||||||
|
if (_isDirty) return;
|
||||||
|
_pwEntry?.Touch(true);
|
||||||
|
_pwEntry?.CreateBackup(null);
|
||||||
|
_isDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
private string GetEntryValue(string key)
|
private string GetEntryValue(string key)
|
||||||
{
|
{
|
||||||
return _pwEntry?.Strings.GetSafe(key).ReadString();
|
return _pwEntry?.Strings.GetSafe(key).ReadString();
|
||||||
@@ -293,13 +315,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
|
|
||||||
private void SetEntryValue(string key, ProtectedString newValue)
|
private void SetEntryValue(string key, ProtectedString newValue)
|
||||||
{
|
{
|
||||||
if (!_isDirty)
|
HandleBackup();
|
||||||
{
|
|
||||||
_pwEntry.Touch(true);
|
|
||||||
_pwEntry?.CreateBackup(null);
|
|
||||||
}
|
|
||||||
_pwEntry?.Strings.Set(key, newValue);
|
_pwEntry?.Strings.Set(key, newValue);
|
||||||
_isDirty = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,12 @@ namespace ModernKeePass.ViewModels
|
|||||||
public bool IsEditMode
|
public bool IsEditMode
|
||||||
{
|
{
|
||||||
get { return _isEditMode; }
|
get { return _isEditMode; }
|
||||||
set { SetProperty(ref _isEditMode, value); }
|
set
|
||||||
|
{
|
||||||
|
SetProperty(ref _isEditMode, value);
|
||||||
|
((RelayCommand)SortEntriesCommand).RaiseCanExecuteChanged();
|
||||||
|
((RelayCommand)SortGroupsCommand).RaiseCanExecuteChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMenuClosed
|
public bool IsMenuClosed
|
||||||
@@ -113,7 +118,6 @@ namespace ModernKeePass.ViewModels
|
|||||||
public ICommand SortEntriesCommand { get; }
|
public ICommand SortEntriesCommand { get; }
|
||||||
public ICommand SortGroupsCommand { get; }
|
public ICommand SortGroupsCommand { get; }
|
||||||
public ICommand UndoDeleteCommand { get; }
|
public ICommand UndoDeleteCommand { get; }
|
||||||
public ICommand GoBackCommand { get; set; }
|
|
||||||
|
|
||||||
private readonly PwGroup _pwGroup;
|
private readonly PwGroup _pwGroup;
|
||||||
private readonly IDatabaseService _database;
|
private readonly IDatabaseService _database;
|
||||||
@@ -136,10 +140,10 @@ namespace ModernKeePass.ViewModels
|
|||||||
|
|
||||||
SaveCommand = new RelayCommand(() => _database.Save());
|
SaveCommand = new RelayCommand(() => _database.Save());
|
||||||
SortEntriesCommand = new RelayCommand(async () =>
|
SortEntriesCommand = new RelayCommand(async () =>
|
||||||
await SortEntriesAsync().ConfigureAwait(false));
|
await SortEntriesAsync().ConfigureAwait(false), () => IsEditMode);
|
||||||
SortGroupsCommand = new RelayCommand(async () =>
|
SortGroupsCommand = new RelayCommand(async () =>
|
||||||
await SortGroupsAsync().ConfigureAwait(false));
|
await SortGroupsAsync().ConfigureAwait(false), () => IsEditMode);
|
||||||
UndoDeleteCommand = new RelayCommand(() => Move(PreviousGroup));
|
UndoDeleteCommand = new RelayCommand(() => Move(PreviousGroup), () => PreviousGroup != null);
|
||||||
|
|
||||||
if (recycleBinId != null && _pwGroup.Uuid.Equals(recycleBinId)) _database.RecycleBin = this;
|
if (recycleBinId != null && _pwGroup.Uuid.Equals(recycleBinId)) _database.RecycleBin = this;
|
||||||
Entries = new ObservableCollection<EntryVm>(pwGroup.Entries.Select(e => new EntryVm(e, this)));
|
Entries = new ObservableCollection<EntryVm>(pwGroup.Entries.Select(e => new EntryVm(e, this)));
|
||||||
@@ -186,6 +190,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
if (_database.RecycleBinEnabled && _database.RecycleBin?.IdUuid == null)
|
if (_database.RecycleBinEnabled && _database.RecycleBin?.IdUuid == null)
|
||||||
_database.CreateRecycleBin(recycleBinTitle);
|
_database.CreateRecycleBin(recycleBinTitle);
|
||||||
Move(_database.RecycleBinEnabled && !IsSelected ? _database.RecycleBin : null);
|
Move(_database.RecycleBinEnabled && !IsSelected ? _database.RecycleBin : null);
|
||||||
|
((RelayCommand)UndoDeleteCommand).RaiseCanExecuteChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UndoDelete()
|
public void UndoDelete()
|
||||||
|
@@ -62,7 +62,7 @@ namespace ModernKeePass.ViewModels
|
|||||||
Destination = destinationFrame,
|
Destination = destinationFrame,
|
||||||
Parameter = databaseFile,
|
Parameter = databaseFile,
|
||||||
SymbolIcon = Symbol.Page2,
|
SymbolIcon = Symbol.Page2,
|
||||||
IsSelected = databaseFile != null
|
IsSelected = databaseFile != null && !database.IsOpen
|
||||||
},
|
},
|
||||||
new MainMenuItemVm
|
new MainMenuItemVm
|
||||||
{
|
{
|
||||||
|
@@ -1,7 +1,66 @@
|
|||||||
namespace ModernKeePass.ViewModels
|
using Windows.Storage;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using ModernKeePass.Converters;
|
||||||
|
using ModernKeePass.ImportFormats;
|
||||||
|
using ModernKeePass.Interfaces;
|
||||||
|
using ModernKeePassLib;
|
||||||
|
|
||||||
|
namespace ModernKeePass.ViewModels
|
||||||
{
|
{
|
||||||
public class NewVm : OpenVm
|
public class NewVm : OpenVm
|
||||||
{
|
{
|
||||||
|
private string _importFormatHelp;
|
||||||
public string Password { get; set; }
|
public string Password { get; set; }
|
||||||
|
|
||||||
|
public bool IsImportChecked { get; set; }
|
||||||
|
|
||||||
|
public IStorageFile ImportFile { get; set; }
|
||||||
|
|
||||||
|
public string ImportFileExtensionFilter { get; set; } = "*";
|
||||||
|
|
||||||
|
public IFormat ImportFormat { get; set; }
|
||||||
|
|
||||||
|
public string ImportFormatHelp
|
||||||
|
{
|
||||||
|
get { return _importFormatHelp; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_importFormatHelp = value;
|
||||||
|
OnPropertyChanged(nameof(ImportFormatHelp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PopulateInitialData(IDatabaseService database, ISettingsService settings, IImportService<IFormat> importService)
|
||||||
|
{
|
||||||
|
if (settings.GetSetting<bool>("Sample") && !IsImportChecked) CreateSampleData(database.RootGroup);
|
||||||
|
else if (IsImportChecked && ImportFile != null && ! (ImportFormat is NullImportFormat)) importService.Import(ImportFormat, ImportFile, database.RootGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CreateSampleData(GroupVm group)
|
||||||
|
{
|
||||||
|
var converter = new IntToSymbolConverter();
|
||||||
|
|
||||||
|
var bankingGroup = group.AddNewGroup("Banking");
|
||||||
|
bankingGroup.IconId = (int)converter.ConvertBack(Symbol.Calculator, null, null, string.Empty);
|
||||||
|
|
||||||
|
var emailGroup = group.AddNewGroup("Email");
|
||||||
|
emailGroup.IconId = (int)converter.ConvertBack(Symbol.Mail, null, null, string.Empty);
|
||||||
|
|
||||||
|
var internetGroup = group.AddNewGroup("Internet");
|
||||||
|
internetGroup.IconId = (int)converter.ConvertBack(Symbol.World, null, null, string.Empty);
|
||||||
|
|
||||||
|
var sample1 = group.AddNewEntry();
|
||||||
|
sample1.Name = "Sample Entry";
|
||||||
|
sample1.UserName = "Username";
|
||||||
|
sample1.Url = PwDefs.HomepageUrl;
|
||||||
|
sample1.Password = "Password";
|
||||||
|
sample1.Notes = "You may safely delete this sample";
|
||||||
|
|
||||||
|
var sample2 = group.AddNewEntry();
|
||||||
|
sample2.Name = "Sample Entry #2";
|
||||||
|
sample2.UserName = "Michael321";
|
||||||
|
sample2.Url = PwDefs.HelpUrl + "kb/testform.html";
|
||||||
|
sample2.Password = "12345";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,16 +12,8 @@ namespace ModernKeePass.ViewModels
|
|||||||
public string Name => DatabaseFile?.DisplayName;
|
public string Name => DatabaseFile?.DisplayName;
|
||||||
|
|
||||||
public StorageFile DatabaseFile { get; private set; }
|
public StorageFile DatabaseFile { get; private set; }
|
||||||
|
|
||||||
public OpenVm() : this(null) { }
|
internal void OpenFile(StorageFile file)
|
||||||
|
|
||||||
public OpenVm(StorageFile file)
|
|
||||||
{
|
|
||||||
if (!IsFileSelected) return;
|
|
||||||
OpenFile(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OpenFile(StorageFile file)
|
|
||||||
{
|
{
|
||||||
OpenFile(file, RecentService.Instance);
|
OpenFile(file, RecentService.Instance);
|
||||||
}
|
}
|
||||||
|
@@ -16,7 +16,7 @@ namespace ModernKeePass.Views.BasePages
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public NavigationHelper NavigationHelper { get; }
|
public NavigationHelper NavigationHelper { get; }
|
||||||
|
|
||||||
public virtual ListView ListView { get; set; }
|
public ListView ListView { get; set; }
|
||||||
public virtual CollectionViewSource ListViewSource { get; set; }
|
public virtual CollectionViewSource ListViewSource { get; set; }
|
||||||
public virtual IHasSelectableObject Model { get; set; }
|
public virtual IHasSelectableObject Model { get; set; }
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ namespace ModernKeePass.Views.BasePages
|
|||||||
|
|
||||||
// Setup the logical page navigation components that allow
|
// Setup the logical page navigation components that allow
|
||||||
// the page to only show one pane at a time.
|
// the page to only show one pane at a time.
|
||||||
NavigationHelper.GoBackCommand = new RelayCommand(() => GoBack(), () => CanGoBack());
|
NavigationHelper.GoBackCommand = new RelayCommand(GoBack, CanGoBack);
|
||||||
|
|
||||||
// Start listening for Window size changes
|
// Start listening for Window size changes
|
||||||
// to change from showing two panes to showing a single pane
|
// to change from showing two panes to showing a single pane
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
|
<converters:InverseBooleanToVisibilityConverter x:Key="InverseBooleanToVisibilityConverter" />
|
||||||
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
<converters:ProgressBarLegalValuesConverter x:Key="ProgressBarLegalValuesConverter" />
|
||||||
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroungBrushComplexityConverter" />
|
<converters:DoubleToSolidColorBrushConverter x:Key="DoubleToForegroungBrushComplexityConverter" />
|
||||||
<converters:NullToBooleanConverter x:Key="NullToBooleanConverter" />
|
|
||||||
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
<converters:ColorToBrushConverter x:Key="ColorToBrushConverter" />
|
||||||
<converters:IntToSymbolConverter x:Key="IntToSymbolConverter" />
|
<converters:IntToSymbolConverter x:Key="IntToSymbolConverter" />
|
||||||
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
<Style TargetType="PasswordBox" x:Name="PasswordBoxWithButtonStyle">
|
||||||
@@ -27,7 +26,7 @@
|
|||||||
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||||
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
|
||||||
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
|
||||||
<Setter Property="SelectionHighlightColor" Value="{ThemeResource MainColor}" />
|
<Setter Property="SelectionHighlightColor" Value="{StaticResource MainColor}" />
|
||||||
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
|
||||||
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}" />
|
||||||
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||||
@@ -118,7 +117,7 @@
|
|||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement"
|
||||||
Storyboard.TargetProperty="Background">
|
Storyboard.TargetProperty="Background">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource MainColor}" />
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource MainColor}" />
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement"
|
||||||
Storyboard.TargetProperty="BorderBrush">
|
Storyboard.TargetProperty="BorderBrush">
|
||||||
@@ -348,7 +347,7 @@
|
|||||||
<Run x:Uid="PasswordGeneratorLength" />
|
<Run x:Uid="PasswordGeneratorLength" />
|
||||||
<Run Text="{Binding PasswordLength}" />
|
<Run Text="{Binding PasswordLength}" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<Slider Value="{Binding PasswordLength, Mode=TwoWay}" Margin="0,-10,0,-20" />
|
<Slider Value="{Binding PasswordLength, Mode=TwoWay}" Margin="0,-10,0,-20" Style="{StaticResource MainColorSlider}"/>
|
||||||
<CheckBox IsChecked="{Binding UpperCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorUpper" />
|
<CheckBox IsChecked="{Binding UpperCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorUpper" />
|
||||||
<CheckBox IsChecked="{Binding LowerCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorLower" />
|
<CheckBox IsChecked="{Binding LowerCasePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorLower" />
|
||||||
<CheckBox IsChecked="{Binding DigitsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorDigits" />
|
<CheckBox IsChecked="{Binding DigitsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorDigits" />
|
||||||
@@ -357,7 +356,7 @@
|
|||||||
<CheckBox IsChecked="{Binding SpacePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpace" />
|
<CheckBox IsChecked="{Binding SpacePatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpace" />
|
||||||
<CheckBox IsChecked="{Binding SpecialPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpecial" />
|
<CheckBox IsChecked="{Binding SpecialPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorSpecial" />
|
||||||
<CheckBox IsChecked="{Binding BracketsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorBrackets" />
|
<CheckBox IsChecked="{Binding BracketsPatternSelected, Mode=TwoWay}" x:Uid="PasswordGeneratorBrackets" />
|
||||||
<TextBlock x:Uid="PasswordGeneratorAlso" Margin="0,5,0,0"/>
|
<TextBlock x:Uid="PasswordGeneratorAlso" Margin="0,5,0,0"/>
|
||||||
<TextBox Text="{Binding CustomChars, Mode=TwoWay}" />
|
<TextBox Text="{Binding CustomChars, Mode=TwoWay}" />
|
||||||
<Button x:Uid="PasswordGeneratorButton" Command="{Binding GeneratePasswordCommand}" />
|
<Button x:Uid="PasswordGeneratorButton" Command="{Binding GeneratePasswordCommand}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -398,13 +397,21 @@
|
|||||||
<StackPanel.Resources>
|
<StackPanel.Resources>
|
||||||
<Style TargetType="TextBlock">
|
<Style TargetType="TextBlock">
|
||||||
<Setter Property="Margin" Value="0,20,0,0"/>
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
||||||
|
<Setter Property="FontSize" Value="18"/>
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="CheckBox">
|
<Style TargetType="CheckBox">
|
||||||
<Setter Property="Margin" Value="0,20,0,0"/>
|
<Setter Property="Margin" Value="0,20,0,0"/>
|
||||||
|
<Setter Property="FontSize" Value="18"/>
|
||||||
|
</Style>
|
||||||
|
<Style BasedOn="{StaticResource TextBoxWithButtonStyle}" TargetType="local:TextBoxWithButton" x:Key="EntryTextBoxWithButtonStyle">
|
||||||
|
<Setter Property="Width" Value="350"/>
|
||||||
|
<Setter Property="Height" Value="32"/>
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||||
</Style>
|
</Style>
|
||||||
</StackPanel.Resources>
|
</StackPanel.Resources>
|
||||||
<TextBlock x:Uid="EntryLogin" TextWrapping="Wrap" FontSize="18" />
|
<TextBlock x:Uid="EntryLogin" />
|
||||||
<local:TextBoxWithButton HorizontalAlignment="Left" Text="{Binding UserName, Mode=TwoWay}" Width="350" Height="32" Style="{StaticResource TextBoxWithButtonStyle}" SelectionHighlightColor="{StaticResource MainColor}" ButtonSymbol="" ButtonTooltip="Copy" IsEnabled="{Binding IsSelected}">
|
<local:TextBoxWithButton x:Uid="LoginTextBox" Text="{Binding UserName, Mode=TwoWay}" Style="{StaticResource EntryTextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsSelected}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
<core:EventTriggerBehavior EventName="ButtonClick">
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
||||||
<actions:ClipboardAction Text="{Binding UserName}" />
|
<actions:ClipboardAction Text="{Binding UserName}" />
|
||||||
@@ -412,9 +419,9 @@
|
|||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
</local:TextBoxWithButton>
|
</local:TextBoxWithButton>
|
||||||
<TextBlock x:Uid="EntryPassword" TextWrapping="Wrap" FontSize="18" />
|
<TextBlock x:Uid="EntryPassword" />
|
||||||
<PasswordBox HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" Height="32" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" Style="{StaticResource PasswordBoxWithButtonStyle}" IsEnabled="{Binding IsSelected}" />
|
<PasswordBox HorizontalAlignment="Left" Password="{Binding Password, Mode=TwoWay}" Width="350" Height="32" IsPasswordRevealButtonEnabled="True" Visibility="{Binding IsRevealPassword, Converter={StaticResource InverseBooleanToVisibilityConverter}}" Style="{StaticResource PasswordBoxWithButtonStyle}" IsEnabled="{Binding IsSelected}" />
|
||||||
<local:TextBoxWithButton HorizontalAlignment="Left" Text="{Binding Password, Mode=TwoWay}" Width="350" Height="32" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource TextBoxWithButtonStyle}" SelectionHighlightColor="{StaticResource MainColor}" ButtonSymbol="" ButtonTooltip="Copy" IsEnabled="{Binding IsSelected}">
|
<local:TextBoxWithButton x:Uid="PasswordTextBox" Text="{Binding Password, Mode=TwoWay}" Visibility="{Binding IsRevealPassword, Converter={StaticResource BooleanToVisibilityConverter}}" Style="{StaticResource EntryTextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsSelected}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
<core:EventTriggerBehavior EventName="ButtonClick">
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
||||||
<actions:ClipboardAction Text="{Binding Password}" />
|
<actions:ClipboardAction Text="{Binding Password}" />
|
||||||
@@ -425,16 +432,16 @@
|
|||||||
<ProgressBar Value="{Binding PasswordComplexityIndicator, ConverterParameter=0\,128, Converter={StaticResource ProgressBarLegalValuesConverter}}" Maximum="128" Width="350" HorizontalAlignment="Left" Foreground="{Binding PasswordComplexityIndicator, ConverterParameter=128, Converter={StaticResource DoubleToForegroungBrushComplexityConverter}}" />
|
<ProgressBar Value="{Binding PasswordComplexityIndicator, ConverterParameter=0\,128, Converter={StaticResource ProgressBarLegalValuesConverter}}" Maximum="128" Width="350" HorizontalAlignment="Left" Foreground="{Binding PasswordComplexityIndicator, ConverterParameter=128, Converter={StaticResource DoubleToForegroungBrushComplexityConverter}}" />
|
||||||
<CheckBox x:Uid="EntryShowPassword" HorizontalAlignment="Left" Margin="-3,0,0,0" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}" IsEnabled="{Binding IsRevealPasswordEnabled}" />
|
<CheckBox x:Uid="EntryShowPassword" HorizontalAlignment="Left" Margin="-3,0,0,0" IsChecked="{Binding IsRevealPassword, Mode=TwoWay}" IsEnabled="{Binding IsRevealPasswordEnabled}" />
|
||||||
<TextBlock TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
<TextBlock TextWrapping="Wrap" Text="URL" FontSize="18"/>
|
||||||
<local:TextBoxWithButton HorizontalAlignment="Left" Text="{Binding Url, Mode=TwoWay}" Height="32" Width="350" MaxLength="256" Style="{StaticResource TextBoxWithButtonStyle}" SelectionHighlightColor="{StaticResource MainColor}" ButtonSymbol="" ButtonTooltip="Navigate to URL" IsEnabled="{Binding IsSelected}">
|
<local:TextBoxWithButton x:Uid="UrlTextBox" Text="{Binding Url, Mode=TwoWay}" MaxLength="256" Style="{StaticResource EntryTextBoxWithButtonStyle}" ButtonSymbol="" IsEnabled="{Binding IsSelected}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
<core:EventTriggerBehavior EventName="ButtonClick">
|
<core:EventTriggerBehavior EventName="ButtonClick">
|
||||||
<actions:NavigateToUrlAction Url="{Binding Url}" />
|
<actions:NavigateToUrlAction Url="{Binding Url}" />
|
||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
</local:TextBoxWithButton>
|
</local:TextBoxWithButton>
|
||||||
<TextBlock x:Uid="EntryNotes" TextWrapping="Wrap" FontSize="18" />
|
<TextBlock x:Uid="EntryNotes" />
|
||||||
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" IsEnabled="{Binding IsSelected}" />
|
<TextBox HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Notes, Mode=TwoWay}" Width="350" Height="200" AcceptsReturn="True" IsSpellCheckEnabled="True" IsEnabled="{Binding IsSelected}" />
|
||||||
<CheckBox x:Uid="EntryExpirationDate" FontSize="18" IsChecked="{Binding HasExpirationDate, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
<CheckBox x:Uid="EntryExpirationDate" IsChecked="{Binding HasExpirationDate, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
@@ -453,11 +460,11 @@
|
|||||||
<StackPanel x:Name="EditDesign" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
|
<StackPanel x:Name="EditDesign" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}" Orientation="Horizontal">
|
||||||
<StackPanel Width="250" HorizontalAlignment="Left">
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
||||||
<TextBlock x:Uid="EntryBackgroundColor" />
|
<TextBlock x:Uid="EntryBackgroundColor" />
|
||||||
<userControls:ColorPickerUserControl SelectedColor="{Binding BackgroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
<userControls:ColorPickerUserControl SelectedColor="{Binding BackgroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<StackPanel Width="250" HorizontalAlignment="Left">
|
<StackPanel Width="250" HorizontalAlignment="Left">
|
||||||
<TextBlock x:Uid="EntryForegroundColor" />
|
<TextBlock x:Uid="EntryForegroundColor" />
|
||||||
<userControls:ColorPickerUserControl SelectedColor="{Binding ForegroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" />
|
<userControls:ColorPickerUserControl SelectedColor="{Binding ForegroundColor, Converter={StaticResource ColorToBrushConverter}, Mode=TwoWay}" IsEnabled="{Binding IsSelected}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -481,7 +488,7 @@
|
|||||||
Style="{StaticResource NoBorderButtonStyle}">
|
Style="{StaticResource NoBorderButtonStyle}">
|
||||||
<SymbolIcon Symbol="Back" />
|
<SymbolIcon Symbol="Back" />
|
||||||
</Button>
|
</Button>
|
||||||
<Grid Grid.Column="1" >
|
<Grid Grid.Column="1" x:Name="TopGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="60" />
|
<ColumnDefinition Width="60" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
@@ -491,19 +498,17 @@
|
|||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="20" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, Mode=TwoWay}" />
|
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=0, Mode=TwoWay}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
||||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Width="80" Height="40" />
|
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Width="80" Height="40" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<TextBox Grid.Column="1" Grid.Row="0"
|
<TextBox Grid.Column="1" Grid.Row="0"
|
||||||
x:Name="TitleTextBox"
|
|
||||||
Text="{Binding Name, Mode=TwoWay}"
|
Text="{Binding Name, Mode=TwoWay}"
|
||||||
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
SelectionHighlightColor="{StaticResource MainColor}"
|
SelectionHighlightColor="{StaticResource MainColor}"
|
||||||
IsHitTestVisible="{Binding IsEditMode}"
|
IsHitTestVisible="{Binding IsEditMode}"
|
||||||
IsEnabled="{Binding IsSelected}"
|
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
FontSize="20"
|
FontSize="20"
|
||||||
FontWeight="Light"
|
FontWeight="Light"
|
||||||
@@ -521,17 +526,20 @@
|
|||||||
<userControls:TopMenuUserControl
|
<userControls:TopMenuUserControl
|
||||||
x:Name="TopMenu" Grid.Column="2"
|
x:Name="TopMenu" Grid.Column="2"
|
||||||
RestoreButtonVisibility="{Binding ParentGroup.IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}"
|
RestoreButtonVisibility="{Binding ParentGroup.IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
DeleteButtonVisibility="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
DeleteButtonVisibility="{Binding IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
||||||
IsRestoreButtonEnabled="{Binding PreviousGroup, Converter={StaticResource NullToBooleanConverter}}"
|
|
||||||
SaveCommand="{Binding SaveCommand}"
|
SaveCommand="{Binding SaveCommand}"
|
||||||
RestoreCommand="{Binding UndoDeleteCommand}">
|
RestoreCommand="{Binding UndoDeleteCommand}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="EditButtonClick">
|
||||||
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
<core:EventTriggerBehavior EventName="DeleteButtonClick">
|
<core:EventTriggerBehavior EventName="DeleteButtonClick">
|
||||||
<actions:DeleteEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
<actions:DeleteEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
<core:EventTriggerBehavior EventName="RestoreButtonClick">
|
<core:EventTriggerBehavior EventName="RestoreButtonClick">
|
||||||
<actions:RestoreEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
<core:InvokeCommandAction Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
||||||
|
<actions:ToastAction x:Uid="RestoreEntryCommand" Title="{Binding Name}" />
|
||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
</userControls:TopMenuUserControl>
|
</userControls:TopMenuUserControl>
|
||||||
@@ -543,12 +551,6 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="OverflowButtonsVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="MoreButtonVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Vertical"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
@@ -559,12 +561,6 @@
|
|||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpirationDatePanel" Storyboard.TargetProperty="Orientation">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="OverflowButtonsVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="MoreButtonVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EditDesign" Storyboard.TargetProperty="Orientation">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Horizontal"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
@@ -44,7 +44,6 @@ namespace ModernKeePass.Views
|
|||||||
NavigationHelper.OnNavigatedTo(e);
|
NavigationHelper.OnNavigatedTo(e);
|
||||||
if (!(e.Parameter is EntryVm)) return;
|
if (!(e.Parameter is EntryVm)) return;
|
||||||
DataContext = (EntryVm)e.Parameter;
|
DataContext = (EntryVm)e.Parameter;
|
||||||
Model.GoBackCommand = NavigationHelper.GoBackCommand;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||||
@@ -58,6 +57,7 @@ namespace ModernKeePass.Views
|
|||||||
private void EntryDetailPage_OnSizeChanged(object sender, SizeChangedEventArgs e)
|
private void EntryDetailPage_OnSizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
VisualStateManager.GoToState(this, e.NewSize.Width < 700 ? "Small" : "Large", true);
|
VisualStateManager.GoToState(this, e.NewSize.Width < 700 ? "Small" : "Large", true);
|
||||||
|
VisualStateManager.GoToState(TopMenu, e.NewSize.Width < 800 ? "Collapsed" : "Overflowed", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HamburgerMenuUserControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void HamburgerMenuUserControl_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
@@ -70,7 +70,7 @@ namespace ModernKeePass.Views
|
|||||||
default:
|
default:
|
||||||
var entry = listView?.SelectedItem as EntryVm;
|
var entry = listView?.SelectedItem as EntryVm;
|
||||||
StackPanel.DataContext = entry;
|
StackPanel.DataContext = entry;
|
||||||
TitleTextBox.DataContext = entry;
|
TopGrid.DataContext = entry;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -105,7 +105,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Grid.Column="0" Background="{Binding BackgroundColor, ConverterParameter={StaticResource MainColor}, Converter={StaticResource ColorToBrushConverter}}">
|
<Border Grid.Column="0" Background="{Binding BackgroundColor, ConverterParameter={StaticResource MainColor}, Converter={StaticResource ColorToBrushConverter}}">
|
||||||
<Viewbox MaxHeight="50" Width="100">
|
<Viewbox MaxHeight="50" Width="100">
|
||||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Foreground="{StaticResource TextColor}" />
|
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=0}" Foreground="{StaticResource TextColor}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
</Border>
|
</Border>
|
||||||
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,10,0,0" >
|
<StackPanel Grid.Column="1" VerticalAlignment="Top" Margin="10,10,0,0" >
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
<RowDefinition Height="20" />
|
<RowDefinition Height="20" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, Mode=TwoWay}" />
|
<userControls:SymbolPickerUserControl Width="80" Height="40" SelectedSymbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=48, Mode=TwoWay}" />
|
||||||
</Viewbox>
|
</Viewbox>
|
||||||
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
<Viewbox MaxHeight="30" Width="50" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsEditMode, Converter={StaticResource InverseBooleanToVisibilityConverter}}">
|
||||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Width="80" Height="40" />
|
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Width="80" Height="40" />
|
||||||
@@ -233,40 +233,54 @@
|
|||||||
</TextBox>
|
</TextBox>
|
||||||
<userControls:BreadCrumbUserControl Grid.Column="1" Grid.Row="1" ItemsSource="{Binding BreadCrumb}" Margin="5,-5,0,0" />
|
<userControls:BreadCrumbUserControl Grid.Column="1" Grid.Row="1" ItemsSource="{Binding BreadCrumb}" Margin="5,-5,0,0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<userControls:TopMenuUserControl x:Name="TopMenu" Grid.Column="2"
|
<userControls:TopMenuUserControl x:Name="TopMenu" Grid.Column="2"
|
||||||
RestoreButtonVisibility="{Binding ShowRestore, Converter={StaticResource BooleanToVisibilityConverter}}"
|
RestoreButtonVisibility="{Binding ShowRestore, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
DeleteButtonVisibility="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
DeleteButtonVisibility="{Binding IsSelected, Converter={StaticResource InverseBooleanToVisibilityConverter}}"
|
||||||
SortButtonVisibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}"
|
SortButtonVisibility="{Binding IsEditMode, Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
IsEditButtonChecked="{Binding IsEditMode, Mode=TwoWay}"
|
||||||
IsDeleteButtonEnabled="{Binding IsNotRoot}"
|
IsDeleteButtonEnabled="{Binding IsNotRoot}"
|
||||||
IsRestoreButtonEnabled="{Binding PreviousGroup, Converter={StaticResource NullToBooleanConverter}}"
|
|
||||||
SaveCommand="{Binding SaveCommand}"
|
SaveCommand="{Binding SaveCommand}"
|
||||||
RestoreCommand="{Binding UndoDeleteCommand}"
|
RestoreCommand="{Binding UndoDeleteCommand}"
|
||||||
SortEntriesCommand="{Binding SortEntriesCommand}"
|
SortEntriesCommand="{Binding SortEntriesCommand}"
|
||||||
SortGroupsCommand="{Binding SortGroupsCommand}">
|
SortGroupsCommand="{Binding SortGroupsCommand}">
|
||||||
<interactivity:Interaction.Behaviors>
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="EditButtonClick">
|
||||||
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=TitleTextBox}" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
<core:EventTriggerBehavior EventName="DeleteButtonClick">
|
<core:EventTriggerBehavior EventName="DeleteButtonClick">
|
||||||
<actions:DeleteEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
<actions:DeleteEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
<core:EventTriggerBehavior EventName="RestoreButtonClick">
|
<core:EventTriggerBehavior EventName="RestoreButtonClick">
|
||||||
<actions:RestoreEntityAction Entity="{Binding}" Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
<core:InvokeCommandAction Command="{Binding NavigationHelper.GoBackCommand, ElementName=PageRoot}" />
|
||||||
|
<actions:ToastAction x:Uid="RestoreGroupCommand" Title="{Binding Name}" />
|
||||||
</core:EventTriggerBehavior>
|
</core:EventTriggerBehavior>
|
||||||
</interactivity:Interaction.Behaviors>
|
</interactivity:Interaction.Behaviors>
|
||||||
</userControls:TopMenuUserControl>
|
</userControls:TopMenuUserControl>
|
||||||
<Button Grid.Column="3" x:Name="SearchButton" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<Button Grid.Column="3" x:Name="SearchButton" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
||||||
<SymbolIcon Symbol="Find" />
|
<StackPanel Orientation="Horizontal">
|
||||||
<Button.Flyout>
|
<SymbolIcon Symbol="Find" />
|
||||||
<Flyout>
|
<TextBlock x:Uid="SearchButtonLabel" x:Name="SearchButtonLabel" TextWrapping="NoWrap" FontSize="16" VerticalAlignment="Center" Margin="10,0,0,0" />
|
||||||
<Flyout.FlyoutPresenterStyle>
|
</StackPanel>
|
||||||
<Style TargetType="FlyoutPresenter">
|
<ToolTipService.ToolTip>
|
||||||
<Setter Property="Padding" Value="0" />
|
<ToolTip x:Uid="SearchButtonTooltip" />
|
||||||
</Style>
|
</ToolTipService.ToolTip>
|
||||||
</Flyout.FlyoutPresenterStyle>
|
<interactivity:Interaction.Behaviors>
|
||||||
<SearchBox x:Uid="GroupSearch" Width="350" Padding="12" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" FontSize="18" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
<core:EventTriggerBehavior EventName="Click">
|
||||||
</Flyout>
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=SearchBox}" PropertyName="Visibility" Value="Visible" />
|
||||||
</Button.Flyout>
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=SearchButton}" PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
<!-- TODO: make this work -->
|
||||||
|
<actions:SetupFocusAction TargetObject="{Binding ElementName=SearchBox}" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
</Button>
|
</Button>
|
||||||
<SearchBox Grid.Column="3" x:Uid="GroupSearch" x:Name="SearchBox" Padding="12" Width="350" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" Margin="0,5,0,5" FontSize="15" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}" />
|
<SearchBox Grid.Column="3" x:Uid="GroupSearch" x:Name="SearchBox" Padding="12" Width="350" Visibility="Collapsed" Background="{ThemeResource TextBoxDisabledBackgroundThemeBrush}" BorderThickness="0" Margin="0,5,0,5" FontSize="15" SuggestionsRequested="SearchBox_OnSuggestionsRequested" SearchHistoryEnabled="False" ResultSuggestionChosen="SearchBox_OnResultSuggestionChosen" Style="{StaticResource MainColorSearchBox}">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="LostFocus">
|
||||||
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=SearchBox}" PropertyName="Visibility" Value="Collapsed" />
|
||||||
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=SearchButton}" PropertyName="Visibility" Value="Visible" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</SearchBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="DragDropGroup">
|
<VisualStateGroup x:Name="DragDropGroup">
|
||||||
@@ -288,40 +302,22 @@
|
|||||||
<VisualStateGroup x:Name="TopMenuGroup">
|
<VisualStateGroup x:Name="TopMenuGroup">
|
||||||
<VisualState x:Name="Small">
|
<VisualState x:Name="Small">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="OverflowButtonsVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="MoreButtonVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBox" Storyboard.TargetProperty="Visibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButtonLabel" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Large">
|
<VisualState x:Name="Large">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="OverflowButtonsVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopMenu" Storyboard.TargetProperty="MoreButtonVisibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButton" Storyboard.TargetProperty="Visibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchBox" Storyboard.TargetProperty="Visibility">
|
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
|
||||||
</ObjectAnimationUsingKeyFrames>
|
|
||||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AddEntryTextBlock" Storyboard.TargetProperty="Visibility">
|
||||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
</ObjectAnimationUsingKeyFrames>
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SearchButtonLabel" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
|
@@ -56,7 +56,6 @@ namespace ModernKeePass.Views
|
|||||||
if (vm != null)
|
if (vm != null)
|
||||||
DataContext = vm;
|
DataContext = vm;
|
||||||
}
|
}
|
||||||
Model.GoBackCommand = NavigationHelper.GoBackCommand;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
protected override void OnNavigatedFrom(NavigationEventArgs e)
|
||||||
@@ -137,6 +136,7 @@ namespace ModernKeePass.Views
|
|||||||
private void GroupDetailPage_OnSizeChanged(object sender, SizeChangedEventArgs e)
|
private void GroupDetailPage_OnSizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
{
|
{
|
||||||
VisualStateManager.GoToState(this, e.NewSize.Width < 800 ? "Small" : "Large", true);
|
VisualStateManager.GoToState(this, e.NewSize.Width < 800 ? "Small" : "Large", true);
|
||||||
|
VisualStateManager.GoToState(TopMenu, e.NewSize.Width < 800 ? "Collapsed" : "Overflowed", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@@ -22,8 +22,8 @@
|
|||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="30,0,0,0">
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="30,0,0,0">
|
||||||
<Run x:Uid="AboutHomepage" />
|
<Run x:Uid="AboutHomepage" />
|
||||||
<Hyperlink NavigateUri="https://github.com/wismna/ModernKeePass" Foreground="{StaticResource MainColor}">
|
<Hyperlink NavigateUri="https://wismna.github.io/ModernKeePass/" Foreground="{StaticResource MainColor}">
|
||||||
<Run Text="https://github.com/wismna/ModernKeePass"/>
|
<Run Text="https://wismna.github.io/ModernKeePass/"/>
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="10,0,0,0">
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="10,0,0,0">
|
||||||
|
@@ -4,6 +4,17 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
||||||
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<WebView Source="https://PayPal.Me/wismna"></WebView>
|
<Grid>
|
||||||
|
<ProgressRing x:Name="LoadingRing" IsActive="True" Width="50" Height="50" Foreground="{StaticResource MainColor}" />
|
||||||
|
<WebView Source="https://PayPal.Me/wismna">
|
||||||
|
<interactivity:Interaction.Behaviors>
|
||||||
|
<core:EventTriggerBehavior EventName="DOMContentLoaded">
|
||||||
|
<core:ChangePropertyAction TargetObject="{Binding ElementName=LoadingRing}" PropertyName="IsActive" Value="False" />
|
||||||
|
</core:EventTriggerBehavior>
|
||||||
|
</interactivity:Interaction.Behaviors>
|
||||||
|
</WebView>
|
||||||
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
37
ModernKeePass/Views/MainPageFrames/ImportExportPage.xaml
Normal file
37
ModernKeePass/Views/MainPageFrames/ImportExportPage.xaml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
<Page
|
||||||
|
x:Class="ModernKeePass.Views.ImportExportPage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
|
||||||
|
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="100" />
|
||||||
|
<ColumnDefinition Width="200" />
|
||||||
|
<ColumnDefinition Width="200" />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TextBlock Text="Import" Style="{StaticResource SubheaderTextBlockStyle}" />
|
||||||
|
<HyperlinkButton Grid.Column="0" Grid.Row="1" Content="Select file..." Style="{StaticResource MainColorHyperlinkButton}" Click="ImportFileButton_OnClick" />
|
||||||
|
<StackPanel Grid.Column="1" Grid.Row="1" >
|
||||||
|
<TextBlock Text="Format" Style="{StaticResource BodyTextBlockStyle}" Margin="0,0,0,10" />
|
||||||
|
<ComboBox Style="{StaticResource MainColorComboBox}">
|
||||||
|
<ComboBoxItem>CSV</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
</StackPanel>
|
||||||
|
<StackPanel Grid.Column="2" Grid.Row="1" >
|
||||||
|
<TextBlock Text="Import into..." Style="{StaticResource BodyTextBlockStyle}" Margin="0,0,0,10" />
|
||||||
|
<RadioButton GroupName="ImportDestination" Content="New database" />
|
||||||
|
<RadioButton GroupName="ImportDestination" Content="Currently opened database" />
|
||||||
|
</StackPanel>
|
||||||
|
<Button Grid.Column="3" Grid.Row="1" Content="Import" Style="{StaticResource MainColorButton}" />
|
||||||
|
</Grid>
|
||||||
|
</Page>
|
35
ModernKeePass/Views/MainPageFrames/ImportExportPage.xaml.cs
Normal file
35
ModernKeePass/Views/MainPageFrames/ImportExportPage.xaml.cs
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
using System;
|
||||||
|
using Windows.Storage.Pickers;
|
||||||
|
using Windows.UI.Xaml;
|
||||||
|
|
||||||
|
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||||
|
|
||||||
|
namespace ModernKeePass.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The import/export page.
|
||||||
|
/// </summary>
|
||||||
|
public sealed partial class ImportExportPage
|
||||||
|
{
|
||||||
|
public ImportExportPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ImportFileButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var picker =
|
||||||
|
new FileOpenPicker
|
||||||
|
{
|
||||||
|
ViewMode = PickerViewMode.List,
|
||||||
|
SuggestedStartLocation = PickerLocationId.DocumentsLibrary
|
||||||
|
};
|
||||||
|
picker.FileTypeFilter.Add(".csv");
|
||||||
|
|
||||||
|
// Application now has read/write access to the picked file
|
||||||
|
var file = await picker.PickSingleFileAsync();
|
||||||
|
if (file == null) return;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -6,8 +6,6 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:converters="using:ModernKeePass.Converters"
|
xmlns:converters="using:ModernKeePass.Converters"
|
||||||
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
xmlns:viewModels="using:ModernKeePass.ViewModels"
|
||||||
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
|
||||||
xmlns:core="using:Microsoft.Xaml.Interactions.Core"
|
|
||||||
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
xmlns:userControls="using:ModernKeePass.Views.UserControls"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
@@ -16,20 +14,38 @@
|
|||||||
<Page.DataContext>
|
<Page.DataContext>
|
||||||
<viewModels:NewVm />
|
<viewModels:NewVm />
|
||||||
</Page.DataContext>
|
</Page.DataContext>
|
||||||
|
|
||||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<HyperlinkButton x:Uid="NewCreateButton" Click="ButtonBase_OnClick" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
<HyperlinkButton x:Uid="NewCreateButton" Click="CreateDatabaseButton_OnClick" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
||||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="NewCreateDesc" />
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="NewCreateDesc" />
|
||||||
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding IsFileSelected, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding IsFileSelected, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<StackPanel Margin="25,0,25,0">
|
<StackPanel Margin="25,0,25,0">
|
||||||
<TextBlock Text="{Binding Name}" />
|
<TextBlock Text="{Binding Name}" />
|
||||||
<userControls:CompositeKeyUserControl x:Uid="CompositeKeyNewButton" CreateNew="True" DatabaseFile="{Binding DatabaseFile}">
|
<userControls:CompositeKeyUserControl x:Uid="CompositeKeyNewButton" CreateNew="True" DatabaseFile="{Binding DatabaseFile}" ValidationChecked="CompositeKeyUserControl_OnValidationChecked" />
|
||||||
<interactivity:Interaction.Behaviors>
|
</StackPanel>
|
||||||
<core:EventTriggerBehavior EventName="ValidationChecked">
|
</Border>
|
||||||
<core:NavigateToPageAction TargetPage="ModernKeePass.Views.GroupDetailPage" />
|
<CheckBox x:Name="CheckBox" x:Uid="NewImportCheckbox" Margin="15,10,0,0" IsChecked="{Binding IsImportChecked, Mode=TwoWay}" Visibility="{Binding IsFileSelected, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
||||||
</core:EventTriggerBehavior>
|
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=CheckBox}">
|
||||||
</interactivity:Interaction.Behaviors>
|
<StackPanel Margin="25,0,25,0">
|
||||||
</userControls:CompositeKeyUserControl>
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock x:Uid="NewImportFormat" Margin="0,15,0,10" Style="{StaticResource BodyTextBlockStyle}" />
|
||||||
|
<ComboBox Style="{StaticResource MainColorComboBox}" Margin="15,15,0,0" SelectionChanged="ImportFormatComboBox_OnSelectionChanged">
|
||||||
|
<ComboBoxItem>CSV</ComboBoxItem>
|
||||||
|
</ComboBox>
|
||||||
|
<Button Margin="5,10,0,0" Style="{StaticResource TextBlockButtonStyle}">
|
||||||
|
<SymbolIcon Symbol="Help" RenderTransformOrigin="0.5,0.5" >
|
||||||
|
<SymbolIcon.RenderTransform>
|
||||||
|
<CompositeTransform ScaleX="0.7" ScaleY="0.7"/>
|
||||||
|
</SymbolIcon.RenderTransform>
|
||||||
|
</SymbolIcon>
|
||||||
|
<Button.Flyout>
|
||||||
|
<Flyout>
|
||||||
|
<TextBlock Text="{Binding ImportFormatHelp}" TextWrapping="WrapWholeWords" MaxWidth="400" />
|
||||||
|
</Flyout>
|
||||||
|
</Button.Flyout>
|
||||||
|
</Button>
|
||||||
|
</StackPanel>
|
||||||
|
<HyperlinkButton x:Name="ImportFileLink" x:Uid="NewImportFile" Margin="-15,0,0,0" Style="{StaticResource MainColorHyperlinkButton}" Click="ImportFileButton_OnClick" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
@@ -2,6 +2,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Windows.Storage.Pickers;
|
using Windows.Storage.Pickers;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using Windows.UI.Xaml.Navigation;
|
||||||
|
using ModernKeePass.Events;
|
||||||
|
using ModernKeePass.ImportFormats;
|
||||||
|
using ModernKeePass.Services;
|
||||||
using ModernKeePass.ViewModels;
|
using ModernKeePass.ViewModels;
|
||||||
|
|
||||||
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
|
||||||
@@ -13,14 +18,22 @@ namespace ModernKeePass.Views
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class NewDatabasePage
|
public sealed partial class NewDatabasePage
|
||||||
{
|
{
|
||||||
|
private Frame _mainFrame;
|
||||||
|
|
||||||
public NewVm Model => (NewVm)DataContext;
|
public NewVm Model => (NewVm)DataContext;
|
||||||
|
|
||||||
public NewDatabasePage()
|
public NewDatabasePage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnNavigatedTo(e);
|
||||||
|
_mainFrame = e.Parameter as Frame;
|
||||||
|
}
|
||||||
|
|
||||||
private async void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
private async void CreateDatabaseButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
var savePicker = new FileSavePicker
|
var savePicker = new FileSavePicker
|
||||||
{
|
{
|
||||||
@@ -33,5 +46,44 @@ namespace ModernKeePass.Views
|
|||||||
if (file == null) return;
|
if (file == null) return;
|
||||||
Model.OpenFile(file);
|
Model.OpenFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ImportFormatComboBox_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var resources = new ResourcesService();
|
||||||
|
var comboBox = sender as ComboBox;
|
||||||
|
switch (comboBox?.SelectedIndex)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
Model.ImportFormat = new CsvImportFormat();
|
||||||
|
Model.ImportFileExtensionFilter = ".csv";
|
||||||
|
Model.ImportFormatHelp = resources.GetResourceValue("NewImportFormatHelpCSV");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Model.ImportFormat = new NullImportFormat();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void ImportFileButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var picker =
|
||||||
|
new FileOpenPicker
|
||||||
|
{
|
||||||
|
ViewMode = PickerViewMode.List,
|
||||||
|
SuggestedStartLocation = PickerLocationId.DocumentsLibrary
|
||||||
|
};
|
||||||
|
if (!string.IsNullOrEmpty(Model.ImportFileExtensionFilter))
|
||||||
|
picker.FileTypeFilter.Add(Model.ImportFileExtensionFilter);
|
||||||
|
|
||||||
|
// Application now has read/write access to the picked file
|
||||||
|
Model.ImportFile = await picker.PickSingleFileAsync();
|
||||||
|
if (Model.ImportFile != null) ImportFileLink.Content = Model.ImportFile.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompositeKeyUserControl_OnValidationChecked(object sender, PasswordEventArgs e)
|
||||||
|
{
|
||||||
|
Model.PopulateInitialData(DatabaseService.Instance, new SettingsService(), new ImportService());
|
||||||
|
_mainFrame.Navigate(typeof(GroupDetailPage), DatabaseService.Instance.RootGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,8 +19,8 @@
|
|||||||
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<HyperlinkButton x:Uid="OpenBrowseButton" Click="ButtonBase_OnClick" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
<HyperlinkButton x:Uid="OpenBrowseButton" Click="ButtonBase_OnClick" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
||||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="OpenBrowseDesc" />
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="OpenBrowseDesc" />
|
||||||
<HyperlinkButton x:Uid="OpenUrlButton" IsEnabled="False" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
<!--<HyperlinkButton x:Uid="OpenUrlButton" IsEnabled="False" Foreground="{StaticResource MainColor}" Style="{StaticResource MainColorHyperlinkButton}" />
|
||||||
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="OpenUrlDesc" />
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Margin="15,0,0,30" x:Uid="OpenUrlDesc" />-->
|
||||||
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding IsFileSelected, Converter={StaticResource BooleanToVisibilityConverter}}">
|
<Border HorizontalAlignment="Left" BorderThickness="1" BorderBrush="AliceBlue" Width="550" Visibility="{Binding IsFileSelected, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
<StackPanel Margin="25,0,25,0">
|
<StackPanel Margin="25,0,25,0">
|
||||||
<TextBlock Text="{Binding Name}" />
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
@@ -27,10 +27,10 @@
|
|||||||
<ComboBox ItemsSource="{Binding Source={StaticResource RecycleBinGroups}}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" IsEnabled="{Binding IsChecked, ElementName=RadioButton}" />
|
<ComboBox ItemsSource="{Binding Source={StaticResource RecycleBinGroups}}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" IsEnabled="{Binding IsChecked, ElementName=RadioButton}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock x:Uid="SettingsDatabaseEncryption" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
<TextBlock x:Uid="SettingsDatabaseEncryption" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||||
<ComboBox ItemsSource="{Binding Source={StaticResource Ciphers}}" SelectedIndex="{Binding CipherIndex, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
<ComboBox ItemsSource="{Binding Source={StaticResource Ciphers}}" SelectedIndex="{Binding CipherIndex, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}" />
|
||||||
<TextBlock x:Uid="SettingsDatabaseCompression" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
<TextBlock x:Uid="SettingsDatabaseCompression" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||||
<ComboBox ItemsSource="{Binding Source={StaticResource Compressions}}" SelectedItem="{Binding CompressionName, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
<ComboBox ItemsSource="{Binding Source={StaticResource Compressions}}" SelectedItem="{Binding CompressionName, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}" />
|
||||||
<TextBlock x:Uid="SettingsDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
<TextBlock x:Uid="SettingsDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
|
||||||
<ComboBox ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding KeyDerivationName, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
<ComboBox ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding KeyDerivationName, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Page>
|
</Page>
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ComboBox Grid.Column="1" ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding FileFormatVersion, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" />
|
<ComboBox Grid.Column="1" ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding FileFormatVersion, Mode=TwoWay}" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}" />
|
||||||
<Button Grid.Column="2" Style="{StaticResource TextBlockButtonStyle}">
|
<Button Grid.Column="2" Style="{StaticResource TextBlockButtonStyle}">
|
||||||
<SymbolIcon Symbol="Help" RenderTransformOrigin="0.5,0.5" >
|
<SymbolIcon Symbol="Help" RenderTransformOrigin="0.5,0.5" >
|
||||||
<SymbolIcon.RenderTransform>
|
<SymbolIcon.RenderTransform>
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Colors, ElementName=UserControl}" SelectionChanged="Selector_OnSelectionChanged" Loaded="ComboBox_Loaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}">
|
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Colors, ElementName=UserControl}" SelectionChanged="Selector_OnSelectionChanged" Loaded="ComboBox_Loaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
</HyperlinkButton>
|
</HyperlinkButton>
|
||||||
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" Content="{Binding ButtonLabel, ElementName=UserControl}" Click="OpenButton_OnClick" Background="{ThemeResource MainColor}" Foreground="{ThemeResource TextColor}" IsEnabled="{Binding IsValid}" />
|
<Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="2" Content="{Binding ButtonLabel, ElementName=UserControl}" Click="OpenButton_OnClick" Style="{StaticResource MainColorButton}" IsEnabled="{Binding IsValid}" />
|
||||||
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Height="Auto" FontSize="14" FontWeight="Light" Text="{Binding Status}" Foreground="{Binding StatusType, Converter={StaticResource DiscreteIntToSolidColorBrushConverter}}" Visibility="{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}}" />
|
<TextBlock Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" Height="Auto" FontSize="14" FontWeight="Light" Text="{Binding Status}" Foreground="{Binding StatusType, Converter={StaticResource DiscreteIntToSolidColorBrushConverter}}" Visibility="{Binding Status, Converter={StaticResource EmptyStringToVisibilityConverter}}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
@@ -76,10 +76,8 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
public event PasswordCheckingEventHandler ValidationChecking;
|
public event EventHandler ValidationChecking;
|
||||||
public delegate void PasswordCheckingEventHandler(object sender, EventArgs e);
|
public event EventHandler<PasswordEventArgs> ValidationChecked;
|
||||||
public event PasswordCheckedEventHandler ValidationChecked;
|
|
||||||
public delegate void PasswordCheckedEventHandler(object sender, PasswordEventArgs e);
|
|
||||||
|
|
||||||
private async void OpenButton_OnClick(object sender, RoutedEventArgs e)
|
private async void OpenButton_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
<x:Double x:Key="HamburgerMenuSize">300</x:Double>
|
<x:Double x:Key="HamburgerMenuSize">300</x:Double>
|
||||||
<DataTemplate x:Name="IsSpecial">
|
<DataTemplate x:Name="IsSpecial">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Margin="7,15,0,15">
|
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=48}" Margin="7,15,0,15">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip Content="{Binding Path={Binding DisplayMemberPath, ElementName=UserControl}}" />
|
<ToolTip Content="{Binding Path={Binding DisplayMemberPath, ElementName=UserControl}}" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate x:Name="IsNormal">
|
<DataTemplate x:Name="IsNormal">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}}" Margin="7,15,0,15">
|
<SymbolIcon Symbol="{Binding IconId, Converter={StaticResource IntToSymbolConverter}, ConverterParameter=48}" Margin="7,15,0,15">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip Content="{Binding Path={Binding DisplayMemberPath, ElementName=UserControl}}" />
|
<ToolTip Content="{Binding Path={Binding DisplayMemberPath, ElementName=UserControl}}" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using ModernKeePass.Interfaces;
|
using ModernKeePass.Interfaces;
|
||||||
@@ -99,15 +100,13 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
typeof(HamburgerMenuUserControl),
|
typeof(HamburgerMenuUserControl),
|
||||||
new PropertyMetadata(null, (o, args) => { }));
|
new PropertyMetadata(null, (o, args) => { }));
|
||||||
|
|
||||||
public event SelectionChangedEventHandler SelectionChanged;
|
public event EventHandler<SelectionChangedEventArgs> SelectionChanged;
|
||||||
public delegate void SelectionChangedEventHandler(object sender, SelectionChangedEventArgs e);
|
|
||||||
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void Selector_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
SelectionChanged?.Invoke(sender, e);
|
SelectionChanged?.Invoke(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
public event ButtonClickedEventHandler ButtonClicked;
|
public event EventHandler<RoutedEventArgs> ButtonClicked;
|
||||||
public delegate void ButtonClickedEventHandler(object sender, RoutedEventArgs e);
|
|
||||||
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
ButtonClicked?.Invoke(sender, e);
|
ButtonClicked?.Invoke(sender, e);
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Symbols, ElementName=UserControl}" SelectedItem="{Binding SelectedSymbol, ElementName=UserControl, Mode=TwoWay}" Loaded="ComboBox_OnLoaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}">
|
<ComboBox x:Name="ComboBox" ItemsSource="{Binding Symbols, ElementName=UserControl}" SelectedItem="{Binding SelectedSymbol, ElementName=UserControl, Mode=TwoWay}" Loaded="ComboBox_OnLoaded" ItemContainerStyle="{StaticResource MainColorComboBoxItem}" Style="{StaticResource MainColorComboBox}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">
|
||||||
|
@@ -1,7 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
|
using ModernKeePass.Converters;
|
||||||
|
|
||||||
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
||||||
|
|
||||||
@@ -9,7 +11,7 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
{
|
{
|
||||||
public sealed partial class SymbolPickerUserControl
|
public sealed partial class SymbolPickerUserControl
|
||||||
{
|
{
|
||||||
public Symbol[] Symbols { get; }
|
public IEnumerable<Symbol> Symbols { get; }
|
||||||
|
|
||||||
public Symbol SelectedSymbol
|
public Symbol SelectedSymbol
|
||||||
{
|
{
|
||||||
@@ -26,8 +28,8 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
public SymbolPickerUserControl()
|
public SymbolPickerUserControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
var converter = new IntToSymbolConverter();
|
||||||
Symbols = (Symbol[])Enum.GetValues(typeof(Symbol));
|
Symbols = Enum.GetValues(typeof(Symbol)).Cast<Symbol>().Where(s => (int)converter.ConvertBack(s, null, null, string.Empty) != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ComboBox_OnLoaded(object sender, RoutedEventArgs e)
|
private void ComboBox_OnLoaded(object sender, RoutedEventArgs e)
|
||||||
|
@@ -5,26 +5,61 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<Style BasedOn="{StaticResource NoBorderButtonStyle}" TargetType="Button" x:Key="MenuButtonStyle" >
|
||||||
|
<Setter Property="Padding" Value="25,0,25,0" />
|
||||||
|
<Setter Property="Background" Value="{ThemeResource ToggleButtonBackgroundThemeBrush}" />
|
||||||
|
<Setter Property="Height" Value="{StaticResource MenuSize}" />
|
||||||
|
</Style>
|
||||||
|
<Style BasedOn="{StaticResource NoBorderToggleButtonStyle}" TargetType="ToggleButton" x:Key="MenuToggleButtonStyle" >
|
||||||
|
<Setter Property="Padding" Value="25,0,25,0" />
|
||||||
|
<Setter Property="Height" Value="{StaticResource MenuSize}" />
|
||||||
|
</Style>
|
||||||
|
</UserControl.Resources>
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<StackPanel Orientation="Horizontal" Visibility="{Binding OverflowButtonsVisibility, ElementName=UserControl}">
|
<VisualStateManager.VisualStateGroups>
|
||||||
<Button Command="{Binding RestoreCommand, ElementName=UserControl}" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" IsEnabled="{Binding IsRestoreButtonEnabled,ElementName=UserControl}" Click="RestoreButton_Click" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<VisualStateGroup x:Name="VisibilityStates">
|
||||||
|
<VisualState x:Name="Overflowed">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OverflowButtons" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Collapsed">
|
||||||
|
<Storyboard>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="OverflowButtons" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="MoreButton" Storyboard.TargetProperty="Visibility">
|
||||||
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
|
||||||
|
</ObjectAnimationUsingKeyFrames>
|
||||||
|
</Storyboard>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
<StackPanel x:Name="OverflowButtons" Orientation="Horizontal">
|
||||||
|
<Button Command="{Binding RestoreCommand, ElementName=UserControl}" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" Click="RestoreButton_Click" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="Undo">
|
<SymbolIcon Symbol="Undo">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuRestoreButton" RequestedTheme="Dark" />
|
<ToolTip x:Uid="TopMenuRestoreButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Command="{Binding SaveCommand, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<Button Command="{Binding SaveCommand, ElementName=UserControl}" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="Save">
|
<SymbolIcon Symbol="Save">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuSaveButton" RequestedTheme="Dark" />
|
<ToolTip x:Uid="TopMenuSaveButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<Button Visibility="{Binding SortButtonVisibility, ElementName=UserControl}" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="Sort">
|
<SymbolIcon Symbol="Sort">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuSortButton" RequestedTheme="Dark" />
|
<ToolTip x:Uid="TopMenuSortButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
@@ -34,26 +69,26 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Click="EditButton_Click" Style="{StaticResource NoBorderToggleButtonStyle}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<ToggleButton Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Checked="EditButton_Click" Style="{StaticResource MenuToggleButtonStyle}">
|
||||||
<SymbolIcon Symbol="Edit">
|
<SymbolIcon Symbol="Edit">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuEditButton" RequestedTheme="Dark" />
|
<ToolTip x:Uid="TopMenuEditButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Button Command="{Binding DeleteCommand, ElementName=UserControl}" IsEnabled="{Binding IsDeleteButtonEnabled, ElementName=UserControl}" Visibility="{Binding DeleteButtonVisibility, ElementName=UserControl}" Click="DeleteButton_Click" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<Button Command="{Binding DeleteCommand, ElementName=UserControl}" IsEnabled="{Binding IsDeleteButtonEnabled, ElementName=UserControl}" Visibility="{Binding DeleteButtonVisibility, ElementName=UserControl}" Click="DeleteButton_Click" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="Delete">
|
<SymbolIcon Symbol="Delete">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Uid="TopMenuDeleteButton" RequestedTheme="Dark" />
|
<ToolTip x:Uid="TopMenuDeleteButton" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</SymbolIcon>
|
</SymbolIcon>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Button Visibility="{Binding MoreButtonVisibility, ElementName=UserControl}" Style="{StaticResource NoBorderButtonStyle}" Background="{ThemeResource ToggleButtonBackgroundThemeBrush}" Height="{StaticResource MenuSize}" Padding="25,0,25,0">
|
<Button x:Name="MoreButton" Style="{StaticResource MenuButtonStyle}">
|
||||||
<SymbolIcon Symbol="More" />
|
<SymbolIcon Symbol="More" />
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
<MenuFlyout Opening="OverflowFlyout_OnOpening">
|
<MenuFlyout Opening="OverflowFlyout_OnOpening">
|
||||||
<MenuFlyoutItem x:Uid="TopMenuRestoreFlyout" x:Name="RestoreFlyout" Command="{Binding RestoreCommand, ElementName=UserControl}" IsEnabled="{Binding IsRestoreButtonEnabled,ElementName=UserControl}" Click="RestoreButton_Click" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuRestoreFlyout" x:Name="RestoreFlyout" Command="{Binding RestoreCommand, ElementName=UserControl}" Click="RestoreButton_Click" Visibility="{Binding RestoreButtonVisibility, ElementName=UserControl}" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuSaveFlyout" Command="{Binding SaveCommand, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuSaveFlyout" Command="{Binding SaveCommand, ElementName=UserControl}" />
|
||||||
<ToggleMenuFlyoutItem x:Uid="TopMenuEditFlyout" x:Name="EditFlyout" Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Click="EditButton_Click" />
|
<ToggleMenuFlyoutItem x:Uid="TopMenuEditFlyout" x:Name="EditFlyout" Command="{Binding EditCommand, ElementName=UserControl}" IsChecked="{Binding IsEditButtonChecked, ElementName=UserControl, Mode=TwoWay}" Click="EditButton_Click" />
|
||||||
<MenuFlyoutItem x:Uid="TopMenuDeleteFlyout" x:Name="DeleteFlyout" Command="{Binding DeleteCommand, ElementName=UserControl}" Click="DeleteButton_Click" Visibility="{Binding DeleteButtonVisibility, ElementName=UserControl}" IsEnabled="{Binding IsDeleteButtonEnabled, ElementName=UserControl}" />
|
<MenuFlyoutItem x:Uid="TopMenuDeleteFlyout" x:Name="DeleteFlyout" Command="{Binding DeleteCommand, ElementName=UserControl}" Click="DeleteButton_Click" Visibility="{Binding DeleteButtonVisibility, ElementName=UserControl}" IsEnabled="{Binding IsDeleteButtonEnabled, ElementName=UserControl}" />
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using System.Windows.Input;
|
using System;
|
||||||
|
using System.Windows.Input;
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
|
|
||||||
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236
|
||||||
@@ -102,31 +103,7 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
typeof(Visibility),
|
typeof(Visibility),
|
||||||
typeof(TopMenuUserControl),
|
typeof(TopMenuUserControl),
|
||||||
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
|
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
|
||||||
|
|
||||||
public Visibility MoreButtonVisibility
|
|
||||||
{
|
|
||||||
get { return (Visibility)GetValue(MoreButtonVisibilityProperty); }
|
|
||||||
set { SetValue(MoreButtonVisibilityProperty, value); }
|
|
||||||
}
|
|
||||||
public static readonly DependencyProperty MoreButtonVisibilityProperty =
|
|
||||||
DependencyProperty.Register(
|
|
||||||
"MoreButtonVisibility",
|
|
||||||
typeof(Visibility),
|
|
||||||
typeof(TopMenuUserControl),
|
|
||||||
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
|
|
||||||
|
|
||||||
public Visibility OverflowButtonsVisibility
|
|
||||||
{
|
|
||||||
get { return (Visibility)GetValue(OverflowButtonsVisibilityProperty); }
|
|
||||||
set { SetValue(OverflowButtonsVisibilityProperty, value); }
|
|
||||||
}
|
|
||||||
public static readonly DependencyProperty OverflowButtonsVisibilityProperty =
|
|
||||||
DependencyProperty.Register(
|
|
||||||
"OverflowButtonsVisibility",
|
|
||||||
typeof(Visibility),
|
|
||||||
typeof(TopMenuUserControl),
|
|
||||||
new PropertyMetadata(Visibility.Collapsed, (o, args) => { }));
|
|
||||||
|
|
||||||
public Visibility SortButtonVisibility
|
public Visibility SortButtonVisibility
|
||||||
{
|
{
|
||||||
get { return (Visibility)GetValue(SortButtonVisibilityProperty); }
|
get { return (Visibility)GetValue(SortButtonVisibilityProperty); }
|
||||||
@@ -162,26 +139,11 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
typeof(bool),
|
typeof(bool),
|
||||||
typeof(TopMenuUserControl),
|
typeof(TopMenuUserControl),
|
||||||
new PropertyMetadata(false, (o, args) => { }));
|
new PropertyMetadata(false, (o, args) => { }));
|
||||||
|
|
||||||
public bool IsRestoreButtonEnabled
|
|
||||||
{
|
|
||||||
get { return (bool)GetValue(IsRestoreButtonEnabledProperty); }
|
|
||||||
set { SetValue(IsRestoreButtonEnabledProperty, value); }
|
|
||||||
}
|
|
||||||
public static readonly DependencyProperty IsRestoreButtonEnabledProperty =
|
|
||||||
DependencyProperty.Register(
|
|
||||||
"IsRestoreButtonEnabled",
|
|
||||||
typeof(bool),
|
|
||||||
typeof(TopMenuUserControl),
|
|
||||||
new PropertyMetadata(false, (o, args) => { }));
|
|
||||||
|
|
||||||
public event EditButtonClickEventHandler EditButtonClick;
|
public event EventHandler<RoutedEventArgs> EditButtonClick;
|
||||||
public delegate void EditButtonClickEventHandler(object sender, RoutedEventArgs e);
|
public event EventHandler<RoutedEventArgs> DeleteButtonClick;
|
||||||
public event DeleteButtonClickEventHandler DeleteButtonClick;
|
public event EventHandler<RoutedEventArgs> RestoreButtonClick;
|
||||||
public delegate void DeleteButtonClickEventHandler(object sender, RoutedEventArgs e);
|
|
||||||
public event RestoreButtonClickEventHandler RestoreButtonClick;
|
|
||||||
public delegate void RestoreButtonClickEventHandler(object sender, RoutedEventArgs e);
|
|
||||||
|
|
||||||
public TopMenuUserControl()
|
public TopMenuUserControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@@ -215,8 +177,7 @@ namespace ModernKeePass.Views.UserControls
|
|||||||
DeleteFlyout.Visibility = DeleteButtonVisibility;
|
DeleteFlyout.Visibility = DeleteButtonVisibility;
|
||||||
|
|
||||||
EditFlyout.IsChecked = IsEditButtonChecked;
|
EditFlyout.IsChecked = IsEditButtonChecked;
|
||||||
|
|
||||||
RestoreFlyout.IsEnabled = IsRestoreButtonEnabled;
|
|
||||||
RestoreFlyout.Visibility = RestoreButtonVisibility;
|
RestoreFlyout.Visibility = RestoreButtonVisibility;
|
||||||
|
|
||||||
SortEntriesFlyout.Visibility = SortButtonVisibility;
|
SortEntriesFlyout.Visibility = SortButtonVisibility;
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 23 KiB |
@@ -1 +1 @@
|
|||||||
Create new databases, with a password and/or with a new or existing key file
|
Create new databases, with a password and/or with a new or existing key file, and optionally import existing CSV data.
|
@@ -1,8 +1,5 @@
|
|||||||
Entry history feature added
|
Improved search box
|
||||||
App now uses Windows theme color as its base color
|
Changing entry icon creates a new history entry
|
||||||
You can now change entries background and foreground colors
|
Corrected startup crash on some versions of Windows
|
||||||
You can now change groups and entries icons
|
Entry delete button now shows up correctly
|
||||||
Menu has moved from the App Bar to an always visible menu
|
List of icons now only displays valid values
|
||||||
Design improvements
|
|
||||||
Bug corrections
|
|
||||||
KeePassLib version bump to 2.39.1
|
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 25 KiB |
@@ -1 +1 @@
|
|||||||
Creez de nouvelles bases de donnees, en definissant un mot de passe et/ou un fichier de cle existant ou nouveau
|
Creez de nouvelles bases de donnees, en definissant un mot de passe et/ou un fichier de clef existant ou nouveau, et importez optionellement des donnees existantes d'un fichier CSV
|
@@ -1,8 +1,5 @@
|
|||||||
Ajout de la fonctionnalite d'historique des entrees
|
Amelioration de la recherche
|
||||||
L'application utilise la couleur de theme de Windows en tant que couleur principale
|
Changer l'icone d'une entree cree un historique
|
||||||
Il est desormais possible de changer la couleur de fond et de texte des entrees
|
Correction de crash lors du lancement avec certaines versions de Windows
|
||||||
Il est desormais possible de changer l'icone des groupes et des entrees
|
Le bouton de suppression d'une entree apparait bien desormais
|
||||||
Le menu est desormais visible au lieu d'etre dans l'App Bar
|
La liste des icones n'affiche desormais que des valeurs valables
|
||||||
Ameliorations de design
|
|
||||||
Corrections de bugs
|
|
||||||
Version de la KeePassLib passe a 2.39.1
|
|
@@ -3,15 +3,23 @@
|
|||||||
<package id="HockeySDK.Core" version="4.1.6" targetFramework="win81" />
|
<package id="HockeySDK.Core" version="4.1.6" targetFramework="win81" />
|
||||||
<package id="HockeySDK.WINRT" version="4.1.6" targetFramework="win81" />
|
<package id="HockeySDK.WINRT" version="4.1.6" targetFramework="win81" />
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="win81" />
|
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="win81" />
|
<package id="Microsoft.Composition" version="1.0.31" targetFramework="win81" />
|
||||||
|
<package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.1.5" targetFramework="win81" />
|
<package id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.1.7" targetFramework="win81" />
|
||||||
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
|
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
|
||||||
<package id="ModernKeePassLib" version="2.39.1" targetFramework="win81" />
|
<package id="ModernKeePassLib" version="2.39.1" targetFramework="win81" />
|
||||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
||||||
<package id="Portable.BouncyCastle" version="1.8.2" targetFramework="win81" />
|
<package id="Portable.BouncyCastle" version="1.8.3" targetFramework="win81" />
|
||||||
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
|
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
|
||||||
|
<package id="System.Collections.Immutable" version="1.5.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition" version="1.2.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition.AttributedModel" version="1.2.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition.Convention" version="1.2.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition.Hosting" version="1.2.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition.Runtime" version="1.2.0" targetFramework="win81" />
|
||||||
|
<package id="System.Composition.TypedParts" version="1.2.0" targetFramework="win81" />
|
||||||
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="win81" />
|
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="win81" />
|
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="win81" />
|
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="win81" />
|
||||||
@@ -21,6 +29,8 @@
|
|||||||
<package id="System.Net.Requests" version="4.3.0" targetFramework="win81" />
|
<package id="System.Net.Requests" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Reflection" version="4.3.0" targetFramework="win81" />
|
<package id="System.Reflection" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="win81" />
|
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="win81" />
|
||||||
|
<package id="System.Reflection.Metadata" version="1.6.0" targetFramework="win81" />
|
||||||
|
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Runtime" version="4.3.0" targetFramework="win81" />
|
<package id="System.Runtime" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="win81" />
|
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="win81" />
|
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="win81" />
|
||||||
|
@@ -46,7 +46,7 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
{
|
{
|
||||||
_compositeKey = newCompositeKey;
|
_compositeKey = newCompositeKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CreateRecycleBin(string title)
|
public void CreateRecycleBin(string title)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
|
@@ -3,21 +3,24 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using ModernKeePass.Interfaces;
|
using ModernKeePass.Interfaces;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace ModernKeePassApp.Test.Mock
|
namespace ModernKeePassApp.Test.Mock
|
||||||
{
|
{
|
||||||
class RecentServiceMock : IRecentService
|
class RecentServiceMock : IRecentService
|
||||||
{
|
{
|
||||||
|
private Dictionary<string, IStorageItem> _recentItems = new Dictionary<string, IStorageItem>();
|
||||||
|
|
||||||
public int EntryCount => 0;
|
public int EntryCount => 0;
|
||||||
|
|
||||||
public void Add(IStorageItem file, string metadata)
|
public void Add(IStorageItem file, string metadata)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
_recentItems.Add(metadata, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearAll()
|
public void ClearAll()
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
_recentItems.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ObservableCollection<IRecentItem> GetAllFiles(bool removeIfNonExistant = true)
|
public ObservableCollection<IRecentItem> GetAllFiles(bool removeIfNonExistant = true)
|
||||||
@@ -27,7 +30,7 @@ namespace ModernKeePassApp.Test.Mock
|
|||||||
|
|
||||||
public Task<IStorageItem> GetFileAsync(string token)
|
public Task<IStorageItem> GetFileAsync(string token)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return Task.Run(() => _recentItems[token]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -159,12 +159,12 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.2\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
<HintPath>..\packages\Portable.BouncyCastle.1.8.3\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ModernKeePassLib, Version=2.37.0.2000, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="ModernKeePassLib, Version=2.39.1.22027, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\ModernKeePassLib.2.38.2\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
|
<HintPath>..\packages\ModernKeePassLib.2.39.1\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Splat, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Splat, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
@@ -63,9 +63,10 @@ namespace ModernKeePassApp.Test
|
|||||||
{
|
{
|
||||||
var databaseFile = Package.Current.InstalledLocation.GetFileAsync(@"Data\TestDatabase.kdbx")
|
var databaseFile = Package.Current.InstalledLocation.GetFileAsync(@"Data\TestDatabase.kdbx")
|
||||||
.GetAwaiter().GetResult();
|
.GetAwaiter().GetResult();
|
||||||
var openVm = new OpenVm(databaseFile);
|
var openVm = new OpenVm();
|
||||||
Assert.IsTrue(openVm.IsFileSelected);
|
Assert.IsFalse(openVm.IsFileSelected);
|
||||||
Assert.AreEqual("MockDatabase", openVm.Name);
|
openVm.OpenFile(databaseFile, new RecentServiceMock());
|
||||||
|
Assert.AreEqual("TestDatabase.kdbx", openVm.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*[TestMethod]
|
/*[TestMethod]
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
||||||
<package id="ModernKeePassLib" version="2.38.2" targetFramework="win81" />
|
<package id="ModernKeePassLib" version="2.39.1" targetFramework="win81" />
|
||||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
||||||
<package id="Portable.BouncyCastle" version="1.8.2" targetFramework="win81" />
|
<package id="Portable.BouncyCastle" version="1.8.3" targetFramework="win81" />
|
||||||
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
||||||
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="win81" />
|
<package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="win81" />
|
<package id="System.Drawing.Primitives" version="4.3.0" targetFramework="win81" />
|
||||||
|
@@ -23,7 +23,7 @@ namespace ModernKeePassLib.Test.Keys
|
|||||||
"\t\t<Data>";
|
"\t\t<Data>";
|
||||||
|
|
||||||
private const string ExpectedFileEnd = "\t</Key>\r\n" +
|
private const string ExpectedFileEnd = "\t</Key>\r\n" +
|
||||||
"</KeyFile>\r\n";
|
"</KeyFile>";
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestConstruct()
|
public void TestConstruct()
|
||||||
@@ -70,7 +70,7 @@ namespace ModernKeePassLib.Test.Keys
|
|||||||
{
|
{
|
||||||
var fileContents = FileIO.ReadTextAsync(file).GetAwaiter().GetResult();
|
var fileContents = FileIO.ReadTextAsync(file).GetAwaiter().GetResult();
|
||||||
|
|
||||||
Assert.AreEqual(fileContents.Length, 187);
|
Assert.AreEqual(185, fileContents.Length);
|
||||||
Assert.IsTrue(fileContents.StartsWith(ExpectedFileStart));
|
Assert.IsTrue(fileContents.StartsWith(ExpectedFileStart));
|
||||||
Assert.IsTrue(fileContents.EndsWith(ExpectedFileEnd));
|
Assert.IsTrue(fileContents.EndsWith(ExpectedFileEnd));
|
||||||
}
|
}
|
||||||
|
@@ -148,8 +148,12 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.2.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.3.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Portable.BouncyCastle.1.8.2\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
<HintPath>..\packages\Portable.BouncyCastle.1.8.3\lib\netstandard1.0\BouncyCastle.Crypto.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="ModernKeePassLib, Version=2.39.1.22027, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\ModernKeePassLib.2.39.1\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Splat, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="Splat, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
@@ -183,12 +187,6 @@
|
|||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\ModernKeePassLib\ModernKeePass.Lib.csproj">
|
|
||||||
<Project>{2e710089-9559-4967-846c-e763dd1f3acb}</Project>
|
|
||||||
<Name>ModernKeePass.Lib</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="win81" />
|
||||||
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
|
||||||
<package id="ModernKeePassLib" version="2.38.2" targetFramework="win81" />
|
<package id="ModernKeePassLib" version="2.39.1" targetFramework="win81" />
|
||||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />
|
||||||
<package id="Portable.BouncyCastle" version="1.8.2" targetFramework="win81" />
|
<package id="Portable.BouncyCastle" version="1.8.3" targetFramework="win81" />
|
||||||
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
<package id="Splat" version="3.0.0" targetFramework="win81" />
|
||||||
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
|
<package id="System.Collections" version="4.3.0" targetFramework="win81" />
|
||||||
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="win81" />
|
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="win81" />
|
||||||
|
15
README.md
15
README.md
@@ -4,25 +4,28 @@
|
|||||||
**ModernKeePass** is port of the classic Windows application KeePass 2.x for the Windows Store.
|
**ModernKeePass** is port of the classic Windows application KeePass 2.x for the Windows Store.
|
||||||
It does not aim to be feature perfect, but aims at being simple to use and user-friendly.
|
It does not aim to be feature perfect, but aims at being simple to use and user-friendly.
|
||||||
|
|
||||||
You can get it [here](https://www.microsoft.com/fr-fr/store/p/modernkeepass/9mwq48zk8nhv?rtc=1)
|
You can get it [here](https://www.microsoft.com/en-us/store/p/modernkeepass/9mwq48zk8nhv?rtc=1)
|
||||||
|
|
||||||
# Features
|
# Features
|
||||||
- Works on Windows 10, 8.1 and RT
|
- Works on Windows 10, 8.1 and RT
|
||||||
- Read and write support of KDBX files version 2, 3 and 4
|
- Full compatibility with classic KeePass databases: read and write support of KDBX files version 2, 3 and 4
|
||||||
- Open database with password and key file
|
- Open database with password and key file
|
||||||
- Create new databases
|
- Create new databases
|
||||||
- Create, edit and delete groups
|
- Create new key files
|
||||||
- Create, edit and delete entries
|
- Create, edit and delete groups and entries
|
||||||
- Generate passwords for entries
|
- Generate passwords for entries
|
||||||
- Use Recycle Bin
|
- Use Recycle Bin
|
||||||
- Search entries
|
- Search entries
|
||||||
|
- Sort and reorder entries
|
||||||
|
- View entries history
|
||||||
- Use Semantic Zoom to see your entries in a grouped mode
|
- Use Semantic Zoom to see your entries in a grouped mode
|
||||||
- List recently opened databases
|
- List recently opened databases
|
||||||
- Open database from Windows Explorer
|
- Open database from Windows Explorer
|
||||||
- Change database encryption
|
- Change database encryption
|
||||||
- Change database compression
|
- Change database compression
|
||||||
- Change database key derivation
|
- Change database key derivation
|
||||||
- Displays entry colors and icons (set in KeePass)
|
- Displays and change entry colors and icons
|
||||||
|
- Import existing CSV data
|
||||||
|
|
||||||
# Build and Test
|
# Build and Test
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
@@ -33,9 +36,9 @@ You can get it [here](https://www.microsoft.com/fr-fr/store/p/modernkeepass/9mwq
|
|||||||
I'm not the best at creating nice assets, so if anyone would like to contribute some nice icons, it would be awesome :)
|
I'm not the best at creating nice assets, so if anyone would like to contribute some nice icons, it would be awesome :)
|
||||||
Otherwise, there are still many things left to implement:
|
Otherwise, there are still many things left to implement:
|
||||||
- Entry custom fields
|
- Entry custom fields
|
||||||
|
- Entry attachments
|
||||||
- Multi entry selection (for delete, or move)
|
- Multi entry selection (for delete, or move)
|
||||||
- Move entries from a group to another
|
- Move entries from a group to another
|
||||||
- Create key files
|
|
||||||
- Open database from URL (and maybe some clouds?)
|
- Open database from URL (and maybe some clouds?)
|
||||||
|
|
||||||
# Credits
|
# Credits
|
||||||
|
Reference in New Issue
Block a user