1using CommunityToolkit.Mvvm.ComponentModel;
2using CommunityToolkit.Mvvm.Input;
8using System.Collections.ObjectModel;
27 this.navigationArguments = Args;
36 await base.OnInitialize();
38 if (this.navigationArguments is not
null)
42 if (this.navigationArguments.Events is not
null)
44 foreach (
TokenEvent Event
in this.navigationArguments.Events)
59 await base.OnDispose();
67 public ObservableCollection<EventItem>
Events {
get; }
73 private string? tokenId;
83 private async Task AddNote()
93 if (Result.HasValue && Result.Value)
105 TokenId = this.TokenId,
106 Timestamp = DateTime.Now
117 TokenId = this.TokenId,
118 Timestamp = DateTime.Now
122 await NewEvent.DoBind();
124 this.
Events.Insert(0, NewEvent);
Base class that references services in the app.
static ILogService LogService
Log service.
static IUiService UiService
Service serializing and managing UI-related tasks.
static IXmppService XmppService
The XMPP service for XMPP communication.
A base class for all view models, inheriting from the BindableObject. NOTE: using this class requir...
Represents a token event.
virtual Task DoBind()
Binds properties
static EventItem Create(TokenEvent Event)
Creates an Event Item view model for a token event.
Holds navigation parameters containing the events of a token.
The view model to bind to for when displaying the events of a token.
TokenEventsViewModel(TokenEventsNavigationArgs? Args)
Creates an instance of the TokenEventsViewModel class.
override async Task OnDispose()
Method called when the view is disposed, and will not be used more. Use this method to unregister eve...
ObservableCollection< EventItem > Events
Events
override async Task OnInitialize()
Method called when view is initialized for the first time. Use this method to implement registration ...
A text note logged on the token.
An xml note logged on the token.
Abstract base class for token events.
Helps with common XML-related tasks.
static bool IsValidXml(string Xml)
Checks if a string is valid XML
abstract class NoteItem(TokenNoteEvent Event)
Represents a token note.
class NoteXmlItem(NoteXml Event)
Represents an XML note on a token.
class NoteTextItem(NoteText Event)
Represents a text note on a token.