1using CommunityToolkit.Mvvm.ComponentModel;
2using CommunityToolkit.Mvvm.Input;
21 this.Remote = Args.
Event?.Remote;
22 this.FriendlyName = Args.
Event?.FriendlyName;
23 this.Timestamp = Args.
Event?.Timestamp;
24 this.TimestampStr = Args.
Event?.TimestampStr;
25 this.Change = Args.
Event?.Change;
26 this.Balance = Args.
Event?.Balance;
27 this.Reserved = Args.
Event?.Reserved;
28 this.Message = Args.
Event?.Message;
29 this.HasMessage = Args.
Event?.HasMessage ??
false;
30 this.MessageIsUri = this.HasMessage && Uri.TryCreate(this.Message, UriKind.Absolute, out _);
31 this.Id = Args.
Event?.TransactionId.ToString();
32 this.Currency = Args.
Event?.Currency;
35 this.ChangeAndCurrency = this.ChangeText +
" " + this.Currency;
38 this.BalanceAndCurrency = this.BalanceText +
" " + this.Currency;
40 this.ReservedText = this.Reserved is
null ? string.Empty :
MoneyToString.
ToString(this.Reserved.Value);
41 this.ReservedAndCurrency = this.ReservedText +
" " + this.Currency;
51 private decimal? change;
57 private string? changeText;
63 private string? changeAndCurrency;
69 private decimal? balance;
75 private string? balanceText;
81 private string? balanceAndCurrency;
87 private decimal? reserved;
93 private string? reservedText;
99 private string? reservedAndCurrency;
105 private string? currency;
111 private DateTime? timestamp;
117 private string? timestampStr;
129 private string? remote;
135 private string? friendlyName;
141 private string? message;
147 private bool hasMessage;
153 private bool messageIsUri;
162 [RelayCommand(CanExecute = nameof(MessageIsUri))]
163 private async Task OpenMessageLink()
165 if (!
string.IsNullOrEmpty(this.Message))
The Application class, representing an instance of the Neuro-Access app.
static Task< bool > OpenUrlAsync(string Url)
Opens an URL in the application.
Converts values to strings.
static string ToString(decimal Money)
Converts a monetary value to a string, removing any round-off errors.
Holds navigation parameters specific to eDaler URIs.
AccountEventItem? Event
Account event
The view model to bind to for when displaying the contents of an account event.
AccountEventViewModel(AccountEventNavigationArgs? Args)
Creates an instance of the AccountEventViewModel class.
A view model that holds the XMPP state.