Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ChatMessageNotificationEvent.cs
1using Microsoft.Maui.Controls.Shapes;
8
10{
15 {
20 : base()
21 {
22 }
23
29 : this(e.FromBareJID)
30 {
31 }
32
37 public ChatMessageNotificationEvent(string RemoteBareJid)
38 : base()
39 {
40 this.Category = RemoteBareJid;
41 this.BareJid = RemoteBareJid;
42 this.Received = DateTime.UtcNow;
43 this.Type = NotificationEventType.Contacts;
44 }
45
49 public string? ReplaceObjectId { get; set; }
50
55 public override Task<Geometry> GetCategoryIcon()
56 {
57 return Task.FromResult(Geometries.PersonPath);
58 }
59
63 public override Task<string> GetDescription()
64 {
66 }
67
71 public override async Task Open()
72 {
74 string LegalId = ContactInfo?.LegalId;
75 string FriendlyName = await this.GetDescription();
76 ChatNavigationArgs Args = new(LegalId, this.BareJid, FriendlyName);
77
78 await ServiceRef.NavigationService.GoToAsync(nameof(ChatPage), Args, BackMethod.Inherited, this.BareJid);
79 }
80 }
81}
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
static Task< ContactInfo > FindByBareJid(string BareJid)
Finds information about a contact, given its Bare JID.
Definition: ContactInfo.cs:221
CaseInsensitiveString LegalId
Legal ID of contact.
Definition: ContactInfo.cs:72
ChatMessageNotificationEvent(string RemoteBareJid)
Contains information about an incoming chat message.
override Task< string > GetDescription()
Gets a descriptive text for the event.
ChatMessageNotificationEvent()
Contains information about an incoming chat message.
override Task< Geometry > GetCategoryIcon()
Gets an icon for the category of event.
ChatMessageNotificationEvent(MessageEventArgs e)
Contains information about an incoming chat message.
Abstract base class of XMPP notification events.
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 class containing SVG Paths for symbols used in the app.
Definition: Geometries.cs:11
static readonly Geometry PersonPath
Person button glyph
Definition: Geometries.cs:559
Holds navigation parameters specific to views displaying a list of contacts.
A page that displays a list of the current user's contacts.
Event arguments for message events.
Task GoToAsync(string Route)
Navigates to the specified route and pushes the page onto the navigation stack.
NotificationEventType
Button on which event is to be displayed.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7