Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractResponseNotificationEvent.cs
5using System.Text;
8
10{
15 {
20 : base()
21 {
22 }
23
29 : base(e)
30 {
31 this.Response = e.Response;
32 }
33
37 public bool Response { get; set; }
38
42 public override async Task Open()
43 {
44 Contract? Contract = await this.GetContract();
45
46 if (!this.Response || Contract is null)
47 {
50 }
51 else
52 {
53 ViewContractNavigationArgs Args = new(Contract, false);
54
56 }
57 }
58
62 public override async Task<string> GetDescription()
63 {
64 Contract? Contract = await this.GetContract();
65 StringBuilder Result = new();
66
67 Result.Append(ServiceRef.Localizer[nameof(AppResources.ContractResponse)]);
68
69 if (Contract is not null)
70 {
71 Result.Append(": ");
72 Result.Append(await ContractModel.GetCategory(Contract));
73 }
74
75 Result.Append('.');
76
77 return Result.ToString();
78 }
79 }
80}
A strongly-typed resource class, for looking up localized strings, etc.
static string PetitionToViewContractWasDenied
Looks up a localized string similar to Petition to view contract was denied..
static string ContractResponse
Looks up a localized string similar to Response to contract request.
static string Ok
Looks up a localized string similar to OK.
static string Message
Looks up a localized string similar to Message.
override async Task< string > GetDescription()
Gets a descriptive text for the category of event.
ContractResponseNotificationEvent(ContractPetitionResponseEventArgs e)
Notification event for contract petition 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
static async Task< string?> GetCategory(Contract Contract)
Gets the category of a contract
Contains the definition of a contract
Definition: Contract.cs:22
Task GoToAsync(string Route)
Navigates to the specified route and pushes the page onto the navigation stack.
Task< bool > DisplayAlert(string Title, string Message, string? Accept=null, string? Cancel=null)
Displays an alert/message box to the user.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7