1using CommunityToolkit.Mvvm.ComponentModel;
12 private bool isDisposed;
21 this.TokenReport = Args?.
Report;
27 await base.OnInitialize();
30 this.Title =
string.Empty;
37 ServiceRef.XmppService.NeuroFeatureVariablesUpdated += this.Wallet_VariablesUpdated;
38 ServiceRef.XmppService.NeuroFeatureStateUpdated += this.Wallet_StateUpdated;
44 ServiceRef.XmppService.NeuroFeatureVariablesUpdated -= this.Wallet_VariablesUpdated;
45 ServiceRef.XmppService.NeuroFeatureStateUpdated -= this.Wallet_StateUpdated;
47 this.DeleteTemporaryFiles();
49 return base.OnDispose();
52 private Task Wallet_StateUpdated(
object? Sender,
NeuroFeatures.NewStateEventArgs e)
54 return this.UpdateReport();
57 private Task Wallet_VariablesUpdated(
object? Sender,
NeuroFeatures.VariablesUpdatedEventArgs e)
59 return this.UpdateReport();
62 private Task UpdateReport()
73 private string? title;
79 private object? report;
93 GC.SuppressFinalize(
this);
99 protected virtual void Dispose(
bool Disposing)
105 this.DeleteTemporaryFiles();
107 this.isDisposed =
true;
110 private void DeleteTemporaryFiles()
A base class for all view models, inheriting from the BindableObject. NOTE: using this class requir...
Holds navigation parameters specific to a report from a state-machine.
TokenReport? Report
Report to display.
The view model to bind to for when displaying information about the current state of a state-machine.
virtual void Dispose(bool Disposing)
IDisposable.Dispose
override Task OnDispose()
Method called when the view is disposed, and will not be used more. Use this method to unregister eve...
void Dispose()
IDisposable.Dispose
override async Task OnInitialize()
Method called when view is initialized for the first time. Use this method to implement registration ...
MachineReportViewModel(MachineReportNavigationArgs? Args)
The view model to bind to for when displaying information about the current state of a state-machine.
Abstract base class for token reports.
abstract Task< string > GetTitle()
Gets the title of report.
void DeleteTemporaryFiles()
Deletes any temporary files.
async Task GenerateReport(MachineReportViewModel ReportView)
Generates the report.