-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppShell.xaml.cs
50 lines (43 loc) · 1.69 KB
/
AppShell.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
40
41
42
43
44
45
46
47
48
49
50
using DiscordToolsApp.Components.Pages;
using DiscordToolsApp.Components.Popups.Common;
namespace DiscordToolsApp
{
public partial class AppShell : Shell
{
public AppShell()
{
InitializeComponent();
Routing.RegisterRoute("MainPage", typeof(MainPage));
Routing.RegisterRoute("TimeStampGeneratorPage", typeof(TimeStampGeneratorPage));
Routing.RegisterRoute("UserLookupPage", typeof(UserLookupPage));
Routing.RegisterRoute("InviteLookupPage", typeof(InviteLookupPage));
Routing.RegisterRoute("TextToEmojiPage", typeof(TextToEmojiPage));
Routing.RegisterRoute("WebhookSendPage", typeof(WebhookSendPage));
Routing.RegisterRoute("PermissionCalculatorPage", typeof(PermissionCalculatorPage));
#if DEBUG
Routing.RegisterRoute("TestPage", typeof(TestPage));
//this.GoToAsync("WebhookSendPage");
#endif
}
protected override bool OnBackButtonPressed()
{
if (Shell.Current.CurrentPage is not MainPage)
{
ApplicationService.ActivePage = "MainPage";
Shell.Current.Navigation.PopAsync(true);
return true;
}
return true;
}
private void Support_Clicked(object sender, EventArgs e)
{
string supportLink = "https://apps.shiroko.dev/supportus/";
Launcher.OpenAsync(supportLink);
}
private void Discord_Clicked(object sender, EventArgs e)
{
string discorInvite = "https://discord.gg/aX4unxzZek";
Browser.OpenAsync(discorInvite, BrowserLaunchMode.SystemPreferred);
}
}
}