Validation work
This commit is contained in:
@@ -7,11 +7,11 @@
|
|||||||
<StackPanel
|
<StackPanel
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
IsEnabled="{Binding !Active}"
|
||||||
Spacing="12">
|
Spacing="12">
|
||||||
<PersonPicture
|
<PersonPicture
|
||||||
Width="144"
|
Width="144"
|
||||||
Height="144"
|
Height="144"
|
||||||
Margin="0,-144,0,0"
|
|
||||||
DisplayName="{Binding Name}" />
|
DisplayName="{Binding Name}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Text="{Binding Name}"
|
Text="{Binding Name}"
|
||||||
@@ -28,5 +28,9 @@
|
|||||||
</KeyBindingTriggerBehaviour>
|
</KeyBindingTriggerBehaviour>
|
||||||
</Interaction.Behaviors>
|
</Interaction.Behaviors>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
|
<ProgressRing
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsActive="{Binding Active}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using CommunityToolkit.Mvvm.ComponentModel;
|
using CommunityToolkit.Mvvm.ComponentModel;
|
||||||
using CommunityToolkit.Mvvm.Input;
|
using CommunityToolkit.Mvvm.Input;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
using Toolkit.Foundation;
|
using Toolkit.Foundation;
|
||||||
|
|
||||||
namespace Wallet;
|
namespace Wallet;
|
||||||
@@ -22,12 +23,14 @@ public partial class OpenWalletViewModel(IServiceProvider provider,
|
|||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private async Task Invoke()
|
private async Task Invoke()
|
||||||
{
|
{
|
||||||
if (Password is { Length: > 0 })
|
using (await new ActivityLock(this))
|
||||||
{
|
{
|
||||||
if (await Mediator.Handle<ActivateEventArgs<Wallet<string>>,
|
if (Password is { Length: > 0 })
|
||||||
bool>(Activate.As(new Wallet<string>(Password))))
|
|
||||||
{
|
{
|
||||||
Publisher.Publish(Opened.As<Wallet>());
|
if (await Mediator.Handle<ActivateEventArgs<Wallet<string>>, bool>(Activate.As(new Wallet<string>(Password))))
|
||||||
|
{
|
||||||
|
Publisher.Publish(Opened.As<Wallet>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user