Dialog deferrals
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
Title="Create Wallet"
|
||||
x:DataType="vm:CreateWalletViewModel"
|
||||
CloseButtonText="Cancel"
|
||||
IsPrimaryButtonEnabled="{Binding !Active}"
|
||||
PrimaryButtonText="Create">
|
||||
<StackPanel Width="400">
|
||||
<TextBox
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
x:DataType="vm:WalletNavigationViewModel"
|
||||
Content="{Binding Name}"
|
||||
IsExpanded="{Binding Expanded}"
|
||||
IsSelected="{Binding Selected}"
|
||||
MenuItemsSource="{Binding}"
|
||||
NavigationViewExtension.IsItemInvokedEnabled="True"
|
||||
SelectsOnInvoked="True">
|
||||
@@ -47,6 +48,7 @@
|
||||
<ConditionAction.Condition>
|
||||
<ConditionalExpression ForwardChaining="And">
|
||||
<ComparisonCondition LeftOperand="{Binding Opened}" RightOperand="False" />
|
||||
<ComparisonCondition LeftOperand="{Binding Selected}" RightOperand="True" />
|
||||
</ConditionalExpression>
|
||||
</ConditionAction.Condition>
|
||||
<NavigateAction Region="Main" Route="OpenWallet">
|
||||
@@ -86,12 +88,12 @@
|
||||
</ConditionAction>
|
||||
</AttachedEventTriggerBehaviour>
|
||||
<DataTriggerBehavior Binding="{Binding Opened}" Value="False">
|
||||
<RemoveClassAction ClassName="Closed" />
|
||||
<AddClassAction ClassName="Closed" RemoveIfExists="True" />
|
||||
<RemoveClassAction ClassName="Closed" />
|
||||
<AddClassAction ClassName="Closed" RemoveIfExists="True" />
|
||||
</DataTriggerBehavior>
|
||||
<DataTriggerBehavior Binding="{Binding Opened}" Value="True">
|
||||
<RemoveClassAction ClassName="Opened" />
|
||||
<AddClassAction ClassName="Opened" RemoveIfExists="True" />
|
||||
<RemoveClassAction ClassName="Opened" />
|
||||
<AddClassAction ClassName="Opened" RemoveIfExists="True" />
|
||||
</DataTriggerBehavior>
|
||||
</Interaction.Behaviors>
|
||||
<NavigationViewItem.Styles>
|
||||
|
||||
@@ -22,5 +22,6 @@ public partial class CreateWalletViewModel(IServiceProvider provider,
|
||||
private string password;
|
||||
|
||||
public async Task<bool> Confirm() =>
|
||||
await Mediator.Handle<CreateEventArgs<Wallet<(string, string)>>, bool>(Create.As(new Wallet<(string, string)>((Name, Password))));
|
||||
await Mediator.Handle<CreateEventArgs<Wallet<(string, string)>>,
|
||||
bool>(Create.As(new Wallet<(string, string)>((Name, Password))));
|
||||
}
|
||||
@@ -24,7 +24,8 @@ public partial class OpenWalletViewModel(IServiceProvider provider,
|
||||
{
|
||||
if (Password is { Length: > 0 })
|
||||
{
|
||||
if (await Mediator.Handle<ActivateEventArgs<Wallet<string>>, bool>(Activate.As(new Wallet<string>(Password))))
|
||||
if (await Mediator.Handle<ActivateEventArgs<Wallet<string>>,
|
||||
bool>(Activate.As(new Wallet<string>(Password))))
|
||||
{
|
||||
Publisher.Publish(Opened.As<Wallet>());
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ public class SynchronizeMainViewModelHandler(IPublisher publisher,
|
||||
public Task Handle(SynchronizeEventArgs<IMainNavigationViewModel> args)
|
||||
{
|
||||
bool selected = true;
|
||||
|
||||
foreach (IComponentHost Wallet in Wallets.OrderBy(x => x.Services.GetRequiredService<IConfigurationDescriptor<WalletConfiguration>>()
|
||||
is IConfigurationDescriptor<WalletConfiguration> descriptor ? descriptor.Name : null))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user