Groups sorting now works with new Lib

New database settings improved
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-30 18:56:56 +01:00
parent 33223934e3
commit 7530cf8006
7 changed files with 32 additions and 19 deletions

View File

@@ -328,7 +328,7 @@
<Private>True</Private>
</Reference>
<Reference Include="ModernKeePassLib, Version=2.37.0.2000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModernKeePassLib.2.37.7000\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
<HintPath>..\packages\ModernKeePassLib.2.37.8000\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Splat, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -349,7 +349,6 @@
<Name>BehaviorsXamlSDKManaged</Name>
</SDKReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="appMetadata\en-us\baselisting\description.txt" />
<Content Include="appMetadata\en-us\baselisting\images\Screenshot\description.Entry.txt" />

View File

@@ -119,7 +119,7 @@
DataContext="{Binding DataContext, ElementName=PageRoot}"
RequestedTheme="Dark"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}" AllowDrop="True" Drop="LeftListView_Drop">
Foreground="{ThemeResource DefaultTextForegroundThemeBrush}">
<ListView.Resources>
<DataTemplate x:Name="Collapsed">
<SymbolIcon Symbol="{Binding IconSymbol}" Margin="8,0,0,0">
@@ -144,6 +144,7 @@
<!--<Setter Property="HorizontalContentAlignment" Value="Center" />-->
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="AllowDrop" Value="True"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.HeaderTemplate>
@@ -184,8 +185,7 @@
AllowDrop="True"
CanReorderItems="True"
CanDragItems="True"
DragItemsStarting="GridView_DragItemsStarting"
Drop="GridView_Drop">
DragItemsStarting="GridView_DragItemsStarting">
<interactivity:Interaction.Behaviors>
<core:DataTriggerBehavior Binding="{Binding IsEditMode}" Value="False">
<actions:SetupFocusAction TargetObject="{Binding ElementName=GridView}" />

View File

@@ -1,5 +1,6 @@
using System;
using System.Linq;
using Windows.ApplicationModel.DataTransfer;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
@@ -163,15 +164,7 @@ namespace ModernKeePass.Pages
private void GridView_DragItemsStarting(object sender, DragItemsStartingEventArgs e)
{
e.Cancel = !Model.IsEditMode;
}
private void GridView_Drop(object sender, DragEventArgs e)
{
}
private void LeftListView_Drop(object sender, DragEventArgs e)
{
e.Data.RequestedOperation = DataPackageOperation.Move;
}
}
}

View File

@@ -6,7 +6,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewModels="using:ModernKeePass.ViewModels"
mc:Ignorable="d">
<Page.Resources>
<CollectionViewSource x:Name="KeyDerivations" Source="{Binding FileFormats}" />
</Page.Resources>
@@ -17,6 +16,25 @@
<TextBlock x:Uid="SettingsNewDatabaseDesc" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,0,0,10"/>
<ToggleSwitch x:Uid="SettingsNewDatabaseSample" IsOn="{Binding IsCreateSample, Mode=TwoWay}" />
<TextBlock x:Uid="SettingsNewDatabaseKdf" Style="{StaticResource TextBlockSettingsHeaderStyle}" Margin="5,20,0,10" />
<ComboBox ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding FileFormatVersion, Mode=TwoWay}" />
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ComboBox Grid.Column="1" ItemsSource="{Binding Source={StaticResource KeyDerivations}}" SelectedItem="{Binding FileFormatVersion, Mode=TwoWay}" />
<Button Grid.Column="2" 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 x:Uid="SettingsNewDatabaseKdfMoreInfo" />
</Flyout>
</Button.Flyout>
</Button>
</Grid>
</StackPanel>
</Page>

View File

@@ -262,7 +262,10 @@
<value>Here, you can change some default options when creating a database.</value>
</data>
<data name="SettingsNewDatabaseKdf.Text" xml:space="preserve">
<value>File format</value>
<value>KDBX database file version</value>
</data>
<data name="SettingsNewDatabaseKdfMoreInfo.Text" xml:space="preserve">
<value>Higher is better, but there may be compatibility issues with older applications</value>
</data>
<data name="SettingsNewDatabaseSample.Header" xml:space="preserve">
<value>Create sample data</value>

View File

@@ -201,7 +201,7 @@ namespace ModernKeePass.ViewModels
try
{
_pwGroup.SortSubGroups(false);
Groups = new ObservableCollection<GroupVm>(Groups.Skip(1).OrderBy(g => g.Name));
Groups = new ObservableCollection<GroupVm>(Groups.OrderBy(g => g.Name).ThenBy(g => g._pwGroup == null));
OnPropertyChanged("Groups");
}
catch (Exception e)

View File

@@ -4,7 +4,7 @@
<package id="Microsoft.NETCore.Platforms" version="2.0.1" targetFramework="win81" />
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.2" targetFramework="win81" />
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
<package id="ModernKeePassLib" version="2.37.7000" targetFramework="win81" />
<package id="ModernKeePassLib" version="2.37.8000" targetFramework="win81" />
<package id="NETStandard.Library" version="2.0.1" targetFramework="win81" />
<package id="Portable.BouncyCastle" version="1.8.1.3" targetFramework="win81" />
<package id="Splat" version="2.0.0" targetFramework="win81" />