mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00
Created a Settings Service
Created a Recent Service Created a Resources Service Code refactor Updated tests
This commit is contained in:
@@ -394,11 +394,11 @@
|
||||
</AppBarButton>
|
||||
</CommandBar.SecondaryCommands>
|
||||
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}">
|
||||
<!--<interactivity:Interaction.Behaviors>
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=CommandBar}" PropertyName="IsOpen" Value="False" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>-->
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</AppBarToggleButton>
|
||||
<AppBarButton Icon="Undo" Label="Restore" Visibility="{Binding ParentGroup.IsSelected, Converter={StaticResource BooleanToVisibilityConverter}}" IsEnabled="{Binding PreviousGroup, Converter={StaticResource NullToBooleanConverter}}" Click="RestoreButton_Click">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
|
@@ -77,9 +77,9 @@ namespace ModernKeePass.Pages
|
||||
? "Are you sure you want to send this entry to the recycle bin?"
|
||||
: "Are you sure you want to delete this entry?";
|
||||
var text = isRecycleBinEnabled ? "Item moved to the Recycle bin" : "Item permanently removed";
|
||||
MessageDialogService.ShowActionDialog("Warning", message, "Delete", "Cancel", a =>
|
||||
MessageDialogHelper.ShowActionDialog("Warning", message, "Delete", "Cancel", a =>
|
||||
{
|
||||
ToastNotificationService.ShowMovedToast(Model, "Deleting", text);
|
||||
ToastNotificationHelper.ShowMovedToast(Model, "Deleting", text);
|
||||
Model.MarkForDelete();
|
||||
if (Frame.CanGoBack) Frame.GoBack();
|
||||
});
|
||||
@@ -87,7 +87,7 @@ namespace ModernKeePass.Pages
|
||||
|
||||
private void RestoreButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ToastNotificationService.ShowMovedToast(Model, "Restored", "Item returned to its original group");
|
||||
ToastNotificationHelper.ShowMovedToast(Model, "Restored", "Item returned to its original group");
|
||||
if (Frame.CanGoBack) Frame.GoBack();
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace ModernKeePass.Pages
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageDialogService.ShowErrorDialog(ex);
|
||||
MessageDialogHelper.ShowErrorDialog(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -64,11 +64,11 @@
|
||||
</Button.Flyout>
|
||||
</AppBarButton>
|
||||
<AppBarToggleButton Icon="Edit" Label="Edit" IsChecked="{Binding IsEditMode, Mode=TwoWay}">
|
||||
<!--<interactivity:Interaction.Behaviors>
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<core:EventTriggerBehavior EventName="Click">
|
||||
<core:ChangePropertyAction TargetObject="{Binding ElementName=CommandBar}" PropertyName="IsOpen" Value="False" />
|
||||
</core:EventTriggerBehavior>
|
||||
</interactivity:Interaction.Behaviors>-->
|
||||
</interactivity:Interaction.Behaviors>
|
||||
</AppBarToggleButton>
|
||||
<AppBarButton Icon="Undo" Label="Restore" Visibility="{Binding ShowRestore, Converter={StaticResource BooleanToVisibilityConverter}}" IsEnabled="{Binding PreviousGroup, Converter={StaticResource NullToBooleanConverter}}" Click="RestoreButton_Click">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
|
@@ -115,9 +115,9 @@ namespace ModernKeePass.Pages
|
||||
? "Are you sure you want to send the whole group and all its entries to the recycle bin?"
|
||||
: "Are you sure you want to delete the whole group and all its entries?";
|
||||
var text = isRecycleBinEnabled ? "Item moved to the Recycle bin" : "Item permanently removed";
|
||||
MessageDialogService.ShowActionDialog("Warning", message, "Delete", "Cancel", a =>
|
||||
MessageDialogHelper.ShowActionDialog("Warning", message, "Delete", "Cancel", a =>
|
||||
{
|
||||
ToastNotificationService.ShowMovedToast(Model, "Deleting", text);
|
||||
ToastNotificationHelper.ShowMovedToast(Model, "Deleting", text);
|
||||
Model.MarkForDelete();
|
||||
if (Frame.CanGoBack) Frame.GoBack();
|
||||
});
|
||||
@@ -125,7 +125,7 @@ namespace ModernKeePass.Pages
|
||||
|
||||
private void RestoreButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ToastNotificationService.ShowMovedToast(Model, "Restored", "Item returned to its original group");
|
||||
ToastNotificationHelper.ShowMovedToast(Model, "Restored", "Item returned to its original group");
|
||||
if (Frame.CanGoBack) Frame.GoBack();
|
||||
}
|
||||
|
||||
|
@@ -18,7 +18,7 @@ namespace ModernKeePass.Pages
|
||||
|
||||
private void CompositeKeyUserControl_OnValidationChecked(object sender, PasswordEventArgs e)
|
||||
{
|
||||
ToastNotificationService.ShowGenericToast("Composite key", "Database successfully updated.");
|
||||
ToastNotificationHelper.ShowGenericToast("Composite key", "Database successfully updated.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user