Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ContractProposalNotificationEvent.cs
5using System.Text;
8
10{
15 {
20 : base()
21 {
22 }
23
29 : base(e)
30 {
31 this.Role = e.Role;
32 this.Message = e.MessageText;
33 this.FromJID = e.FromBareJID;
34 }
35
39 public string? Role { get; set; }
40
44 public string? Message { get; set; }
45
46
50 public string? FromJID { get; set; }
51
55 public override async Task Open()
56 {
57 Contract? Contract = await this.GetContract();
58
59 if (Contract is not null)
60 {
61 ViewContractNavigationArgs Args = new(Contract, false, this.Role, this.Message, this.FromJID);
62
64 }
65 }
66
70 public override async Task<string> GetDescription()
71 {
72 Contract? Contract = await this.GetContract();
73 StringBuilder Result = new();
74
75 Result.Append(ServiceRef.Localizer[nameof(AppResources.ContractProposal)]);
76 Result.Append(", ");
77 Result.Append(this.Role);
78
79 if (Contract is not null)
80 {
81 Result.Append(": ");
82 Result.Append(await ContractModel.GetCategory(Contract));
83 }
84
85 Result.Append('.');
86
87 return Result.ToString();
88 }
89 }
90}
A strongly-typed resource class, for looking up localized strings, etc.
static string ContractProposal
Looks up a localized string similar to Contract proposal.
override async Task< string > GetDescription()
Gets a descriptive text for the category of event.
ContractProposalNotificationEvent(ContractProposalEventArgs e)
Notification event for contract proposals.
Base class that references services in the app.
Definition: ServiceRef.cs:43
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
Class defining a role
Definition: Role.cs:7
string FromBareJID
Bare JID of resource sending the message.
Task GoToAsync(string Route)
Navigates to the specified route and pushes the page onto the navigation stack.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7