Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AppShell.xaml.cs
47using Waher.Events;
48
50{
51 public partial class AppShell : Shell
52 {
53 public AppShell()
54 {
55 try
56 {
57 this.InitializeComponent();
58 this.BindingContext = new AppShellViewModel();
59
60 this.RegisterRoutes();
61 }
62 catch (Exception ex)
63 {
64#if DEBUG
65 ex = Log.UnnestException(ex);
66 App.SendAlert(ex.Message, "text/plain").Wait();
67#endif
68 throw new ArgumentException("Unable to start app.", ex);
69 }
70 }
71
72 private void RegisterRoutes()
73 {
74 // Applications:
75 Routing.RegisterRoute(nameof(ApplicationsPage), typeof(ApplicationsPage));
76 Routing.RegisterRoute(nameof(ApplyIdPage), typeof(ApplyIdPage));
77
78 // Contacts
79 Routing.RegisterRoute(nameof(ChatPage), typeof(ChatPage));
80 Routing.RegisterRoute(nameof(MyContactsPage), typeof(MyContactsPage));
81
82 // Contracts
83 Routing.RegisterRoute(nameof(MyContractsPage), typeof(MyContractsPage));
84 Routing.RegisterRoute(nameof(NewContractPage), typeof(NewContractPage));
85 Routing.RegisterRoute(nameof(ViewContractPage), typeof(ViewContractPage));
86
87 // Identity
88 Routing.RegisterRoute(nameof(TransferIdentityPage), typeof(TransferIdentityPage));
89 Routing.RegisterRoute(nameof(ViewIdentityPage), typeof(ViewIdentityPage));
90
91 // Main
92 Routing.RegisterRoute(nameof(CalculatorPage), typeof(CalculatorPage));
93 Routing.RegisterRoute(nameof(ChangePasswordPage), typeof(ChangePasswordPage));
94 Routing.RegisterRoute(nameof(DurationPage), typeof(DurationPage));
95 Routing.RegisterRoute(nameof(ScanQrCodePage), typeof(ScanQrCodePage));
96 Routing.RegisterRoute(nameof(SettingsPage), typeof(SettingsPage));
97 Routing.RegisterRoute(nameof(VerifyCodePage), typeof(VerifyCodePage));
98 Routing.RegisterRoute(nameof(XmppFormPage), typeof(XmppFormPage));
99
100 // Petitions
101 Routing.RegisterRoute(nameof(PetitionContractPage), typeof(PetitionContractPage));
102 Routing.RegisterRoute(nameof(PetitionIdentityPage), typeof(PetitionIdentityPage));
103 Routing.RegisterRoute(nameof(PetitionPeerReviewPage), typeof(PetitionPeerReviewPage));
104 Routing.RegisterRoute(nameof(PetitionSignaturePage), typeof(PetitionSignaturePage));
105
106 // Signatures
107 Routing.RegisterRoute(nameof(ClientSignaturePage), typeof(ClientSignaturePage));
108 Routing.RegisterRoute(nameof(ServerSignaturePage), typeof(ServerSignaturePage));
109
110 // Things
111 Routing.RegisterRoute(nameof(CanControlPage), typeof(CanControlPage));
112 Routing.RegisterRoute(nameof(CanReadPage), typeof(CanReadPage));
113 Routing.RegisterRoute(nameof(IsFriendPage), typeof(IsFriendPage));
114 Routing.RegisterRoute(nameof(MyThingsPage), typeof(MyThingsPage));
115 Routing.RegisterRoute(nameof(ReadSensorPage), typeof(ReadSensorPage));
116 Routing.RegisterRoute(nameof(ViewClaimThingPage), typeof(ViewClaimThingPage));
117 Routing.RegisterRoute(nameof(ViewThingPage), typeof(ViewThingPage));
118
119 // Wallet
120 Routing.RegisterRoute(nameof(AccountEventPage), typeof(AccountEventPage));
121 Routing.RegisterRoute(nameof(BuyEDalerPage), typeof(BuyEDalerPage));
122 Routing.RegisterRoute(nameof(EDalerReceivedPage), typeof(EDalerReceivedPage));
123 Routing.RegisterRoute(nameof(IssueEDalerPage), typeof(IssueEDalerPage));
124 Routing.RegisterRoute(nameof(MachineReportPage), typeof(MachineReportPage));
125 Routing.RegisterRoute(nameof(MachineVariablesPage), typeof(MachineVariablesPage));
126 Routing.RegisterRoute(nameof(MyTokensPage), typeof(MyTokensPage));
127 Routing.RegisterRoute(nameof(MyEDalerWalletPage), typeof(MyEDalerWalletPage));
128 Routing.RegisterRoute(nameof(MyTokensPage), typeof(MyTokensPage));
129 Routing.RegisterRoute(nameof(PaymentPage), typeof(PaymentPage));
130 Routing.RegisterRoute(nameof(PaymentAcceptancePage), typeof(PaymentAcceptancePage));
131 Routing.RegisterRoute(nameof(PendingPaymentPage), typeof(PendingPaymentPage));
132 Routing.RegisterRoute(nameof(RequestPaymentPage), typeof(RequestPaymentPage));
133 Routing.RegisterRoute(nameof(SellEDalerPage), typeof(SellEDalerPage));
134 Routing.RegisterRoute(nameof(SendPaymentPage), typeof(SendPaymentPage));
135 Routing.RegisterRoute(nameof(ServiceProvidersPage), typeof(ServiceProvidersPage));
136 Routing.RegisterRoute(nameof(TokenDetailsPage), typeof(TokenDetailsPage));
137 Routing.RegisterRoute(nameof(TokenEventsPage), typeof(TokenEventsPage));
138 }
139
143 public static void AppLoaded()
144 {
145 if (Current is AppShell AppShell && AppShell.BindingContext is AppShellViewModel ViewModel)
146 {
147 MainThread.BeginInvokeOnMainThread(async () =>
148 {
149 await ViewModel.DoInitialize();
150 });
151 }
152 }
153 }
154}
The Application class, representing an instance of the Neuro-Access app.
Definition: App.xaml.cs:69
Page allowing the user to apply for a Personal ID.
A page that displays a list of the current user's contacts.
A page that displays a list of the current user's contacts.
A page that displays a list of the current user's contracts.
A page that allows the user to create a new contract.
A page to display when the user wants to transfer an identity.
A page to display when the user wants to view an identity.
static void AppLoaded()
Method called when app has been started and loaded.
A page that allows the user to calculate the value of a numerical input field.
A page that allows the user to duration the value of a numerical input field.
A page to display for scanning of a QR code, either automatically via the camera, or by entering the ...
A page that displays an XMPP Form to the user.
A page to display when the user is asked to petition a contract.
A page to display when the user is asked to petition an identity.
A page to display when the user is asked to review an identity application.
A page to display when the user is asked to petition a signature.
A page that asks the user if a remote entity is allowed to control the device.
A page that asks the user if a remote entity is allowed to read the device.
A page that asks the user if a remote entity is allowed to connect to a device.
A page that displays a list of the current user's things.
A page that displays sensor data from a sensor.
A page that displays information about a thing and allows the user to interact with it.
A page that allows the user to view information about an account event.
A page that allows the user to buy eDaler.
A page that displays information about eDaler received.
A page that allows the user to receive newly issued eDaler.
A page that allows the user to view a state-machine report.
A page that allows the user to view information about the current state of a state-machine.
A page that allows the user to view its tokens.
A page that allows the user to view the contents of its eDaler wallet, pending payments and recent ac...
A page that allows the user to realize payments.
A page that allows the user to accept an offline payment.
A page that allows the user to view information about a pending payment.
A page that displays information about eDaler received.
A page that allows the user to sell eDaler.
A page that allows the user to realize payments.
A page that allows the user to view information about a token.
A page that allows the user to view information about a token.
Static class managing the application event log. Applications and services log events on this static ...
Definition: Log.cs:13
static Exception UnnestException(Exception Exception)
Unnests an exception, to extract the relevant inner exception.
Definition: Log.cs:818