-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.cs
54 lines (48 loc) · 1.09 KB
/
App.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
51
52
53
using System;
using Xamarin.Forms;
namespace TD4WApp {
public class App {
public static Page GetMainPage ()
{
var button = new Button {
Text = "TD4W",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
HeightRequest = 200,
WidthRequest = 200,
BackgroundColor = Color.White,
TextColor = Color.Black,
};
button.Clicked += (sender, e) =>
{
DependencyService.Get<IPlayer>().Play(0);
};
var ateam = new Button {
Text = "A-Team",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
HeightRequest = 200,
WidthRequest = 200,
BackgroundColor = Color.Green,
TextColor = Color.Black,
};
ateam.Clicked += async (sender, e) =>
{
DependencyService.Get<IPlayer> ().Play (1);
};
return new ContentPage {
Content = new StackLayout
{
Spacing = 5,
VerticalOptions = LayoutOptions.CenterAndExpand,
Children =
{
button,
ateam,
}
},
BackgroundColor = Color.Black,
};
}
}
}