-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
39 lines (33 loc) · 1.12 KB
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using School_Project.Information;
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
/*
* Started on Thursday, First of June 2021
* by Philipp Kathöfer
*/
namespace School_Project {
public partial class App : Application {
public App() {
bool b = Management.Managers.Init();
InitializeComponent();
try {
MainPage = new MainPage(!b);
} catch(Exception e) {
Error(e);
}
}
private async void Error(Exception e) {
bool b = await MainPage.DisplayAlert("School Project Fehler", "Es gab ein Problem, möchtest Du das Problem Philipp mitteilen?", "Ja", "Nein");
if(b) {
await Xamarin.Essentials.Email.ComposeAsync("Problem mit School Project", $"Hi Philipp, es gab ein Problem mit School Project: {e}", "[email protected]");
}
}
protected override void OnStart() {
}
protected override void OnSleep() {
}
protected override void OnResume() {
}
}
}