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;
6
8{
13 {
18 : base()
19 {
20 }
21
26 public SignatureResponseNotificationEvent(SignaturePetitionResponseEventArgs e)
27 : base(e)
28 {
29 this.Response = e.Response;
30 }
31
35 public bool Response { get; set; }
36
40 public override async Task Open()
41 {
42 if (!this.Response || this.Identity is null)
43 {
44 await ServiceRef.UiService.DisplayAlert(ServiceRef.Localizer[nameof(AppResources.Message)],
45 ServiceRef.Localizer[nameof(AppResources.PetitionToViewLegalIdentityWasDenied)],
46 ServiceRef.Localizer[nameof(AppResources.Ok)]);
47 }
48 else
49 await ServiceRef.UiService.GoToAsync(nameof(ViewIdentityPage), new ViewIdentityNavigationArgs(this.Identity));
50 }
51
55 public override Task<string> GetDescription()
56 {
57 StringBuilder Result = new();
58
59 Result.Append(ServiceRef.Localizer[nameof(AppResources.SignatureResponse)]);
60
61 if (this.Identity is not null)
62 {
63 Result.Append(": ");
64 Result.Append(ContactInfo.GetFriendlyName(this.Identity));
65 }
66
67 Result.Append('.');
68
69 return Task.FromResult(Result.ToString());
70 }
71
72 }
73}
Contains information about a contact.
Definition: ContactInfo.cs:21
static async Task< string > GetFriendlyName(CaseInsensitiveString RemoteId)
Gets the friendly name of a remote identity (Legal ID or Bare JID).
Definition: ContactInfo.cs:257
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:31
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:55
static IStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:235
A page to display when the user wants to view an identity.