Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SignatureResponseNotificationEvent.cs
1using System.Text;
7
9{
14 {
19 : base()
20 {
21 }
22
28 : base(e)
29 {
30 this.Response = e.Response;
31 }
32
36 public bool Response { get; set; }
37
41 public override async Task Open()
42 {
43 if (!this.Response || this.Identity is null)
44 {
45 await ServiceRef.UiService.DisplayAlert(ServiceRef.Localizer[nameof(AppResources.Message)],
48 }
49 else
50 await ServiceRef.NavigationService.GoToAsync(nameof(ViewIdentityPage), new ViewIdentityNavigationArgs(this.Identity));
51 }
52
56 public override Task<string> GetDescription()
57 {
58 StringBuilder Result = new();
59
60 Result.Append(ServiceRef.Localizer[nameof(AppResources.SignatureResponse)]);
61
62 if (this.Identity is not null)
63 {
64 Result.Append(": ");
65 Result.Append(ContactInfo.GetFriendlyName(this.Identity));
66 }
67
68 Result.Append('.');
69
70 return Task.FromResult(Result.ToString());
71 }
72
73 }
74}
A strongly-typed resource class, for looking up localized strings, etc.
static string Ok
Looks up a localized string similar to OK.
static string PetitionToViewLegalIdentityWasDenied
Looks up a localized string similar to Petition to view identity was denied..
static string SignatureResponse
Looks up a localized string similar to Response to signature request.
static string Message
Looks up a localized string similar to Message.
Contains information about a contact.
Definition: ContactInfo.cs:22
static async Task< string > GetFriendlyName(CaseInsensitiveString RemoteId)
Gets the friendly name of a remote identity (Legal ID or Bare JID).
Definition: ContactInfo.cs:258
override Task< string > GetDescription()
Gets a descriptive text for the category of event.
SignatureResponseNotificationEvent(SignaturePetitionResponseEventArgs e)
Notification event for signature responses.
Base class that references services in the app.
Definition: ServiceRef.cs:43
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:130
static INavigationService NavigationService
The navigation service for navigating between pages.
Definition: ServiceRef.cs:178
static IReportingStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:370
A page to display when the user wants to view an identity.