1using CommunityToolkit.Mvvm.ComponentModel;
12 private bool isDisposed;
15 private bool loaded =
false;
24 this.TokenReport = Args?.
Report;
31 await base.OnInitializeAsync();
33 if (this.TokenReport is
null)
34 this.Title =
string.Empty;
37 this.Title = await this.TokenReport.GetTitle();
39 await this.TokenReport.GenerateReportMaui(
this);
42 MainThread.BeginInvokeOnMainThread(() =>
46 ServiceRef.XmppService.NeuroFeatureVariablesUpdated += this.Wallet_VariablesUpdated;
47 ServiceRef.XmppService.NeuroFeatureStateUpdated += this.Wallet_StateUpdated;
53 ServiceRef.XmppService.NeuroFeatureVariablesUpdated -= this.Wallet_VariablesUpdated;
54 ServiceRef.XmppService.NeuroFeatureStateUpdated -= this.Wallet_StateUpdated;
56 this.DeleteTemporaryFiles();
58 return base.OnDisposeAsync();
63 return this.UpdateReport();
68 return this.UpdateReport();
71 private Task UpdateReport()
73 return this.TokenReport?.GenerateReport(
this) ?? Task.CompletedTask;
82 private string? title;
88 private object? report;
94 private TokenReport? tokenReport;
102 GC.SuppressFinalize(
this);
108 protected virtual void Dispose(
bool Disposing)
114 this.DeleteTemporaryFiles();
116 this.isDisposed =
true;
119 private void DeleteTemporaryFiles()
121 this.TokenReport?.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 OnDisposeAsync()
Method called when the view is disposed, and will not be used more. Use this method to unregister eve...
void Dispose()
IDisposable.Dispose
MachineReportViewModel(MachineReportNavigationArgs? Args)
The view model to bind to for when displaying information about the current state of a state-machine.
override async Task OnInitializeAsync()
Method called when view is initialized for the first time. Use this method to implement registration ...
Event arguments events when the current state of a state-machine has changed.
Event arguments events when the variables of a state-machine has changed.