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;
7
9{
14 {
19 : base()
20 {
21 }
22
27 public ChatMessageNotificationEvent(MessageEventArgs e)
28 : this(e.FromBareJID)
29 {
30 }
31
36 public ChatMessageNotificationEvent(string RemoteBareJid)
37 : base()
38 {
39 this.Category = RemoteBareJid;
40 this.BareJid = RemoteBareJid;
41 this.Received = DateTime.UtcNow;
42 this.Type = NotificationEventType.Contacts;
43 }
44
48 public string? ReplaceObjectId { get; set; }
49
54 public override Task<Geometry> GetCategoryIcon()
55 {
56 return Task.FromResult(Geometries.PersonPath);
57 }
58
62 public override Task<string> GetDescription()
63 {
65 }
66
70 public override async Task Open()
71 {
73 string LegalId = ContactInfo?.LegalId;
74 string FriendlyName = await this.GetDescription();
75 ChatNavigationArgs Args = new(LegalId, this.BareJid, FriendlyName);
76
77 await ServiceRef.UiService.GoToAsync(nameof(ChatPage), Args, BackMethod.Inherited, this.BareJid);
78 }
79 }
80}
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
static Task< ContactInfo > FindByBareJid(string BareJid)
Finds information about a contact, given its Bare JID.
Definition: ContactInfo.cs:220
CaseInsensitiveString LegalId
Legal ID of contact.
Definition: ContactInfo.cs:71
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:31
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:55
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:460
Holds navigation parameters specific to views displaying a list of contacts.
A page that displays a list of the current user's contacts.
Task GoToAsync(string Route, BackMethod BackMethod=BackMethod.Inherited, string? UniqueId=null)
Navigates the AppShell to the specified route, with page arguments to match.
NotificationEventType
Button on which event is to be displayed.
BackMethod
Navigation Back Method
Definition: BackMethod.cs:7