Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
OnboardingHelpViewModel.cs
1using CommunityToolkit.Mvvm.ComponentModel;
2using CommunityToolkit.Mvvm.Input;
5
7{
9 {
11 {
12 this.SupportEmail = "neuro-access@trustanchorgroup.com";
13 }
14
15 [ObservableProperty]
16 private string supportEmail;
17
18 [RelayCommand]
19 private async Task ContactSupport()
20 {
21 string Email = this.SupportEmail;
22 string Subject = ServiceRef.Localizer[nameof(AppResources.SupportEmailSubject)];
23
24 string MailtoUri = $"mailto:{Email}?subject={Uri.EscapeDataString(Subject)}";
25
26 try
27 {
28 if (!await Launcher.OpenAsync(new Uri(MailtoUri)))
29 {
30 await ServiceRef.UiService.DisplayAlert(
32 ServiceRef.Localizer[nameof(AppResources.EmailClientNotAvailable), this.SupportEmail],
34 }
35 }
36 catch (Exception)
37 {
38 await ServiceRef.UiService.DisplayAlert(
40 ServiceRef.Localizer[nameof(AppResources.EmailClientNotAvailable), this.SupportEmail],
42 }
43 }
44 }
45}
A strongly-typed resource class, for looking up localized strings, etc.
static string SupportEmailSubject
Looks up a localized string similar to Recover Account.
static string EmailClientNotAvailable
Looks up a localized string similar to Unable to open email client. Please send an email to {0}....
static string Ok
Looks up a localized string similar to OK.
static string ErrorTitle
Looks up a localized string similar to An error has occurred.
Base class that references services in the app.
Definition: ServiceRef.cs:43
static IUiService UiService
Service serializing and managing UI-related tasks.
Definition: ServiceRef.cs:130
static IReportingStringLocalizer Localizer
Localization service
Definition: ServiceRef.cs:370
Base class for popup view models/>.