This repository was archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainActivity.cs
More file actions
53 lines (46 loc) · 1.54 KB
/
MainActivity.cs
File metadata and controls
53 lines (46 loc) · 1.54 KB
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
using Android.App;
using Android.Widget;
using Android.OS;
using System;
using Maths.Resources.Source;
namespace Maths
{
[Activity(Label = "Maths", MainLauncher = true, Icon = "@drawable/icon", Theme = "@android:style/Theme.DeviceDefault.DialogWhenLarge.NoActionBar")]
public class MainActivity : Activity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView (Resource.Layout.Main);
#region LearnMenuStart
Button mbuttonlearn = FindViewById<Button>(Resource.Id.buttonlearn);
mbuttonlearn.Click += delegate
{
StartActivity(typeof(Learn));
};
#endregion
#region Stats
Button mbuttonstatistics = FindViewById<Button>(Resource.Id.buttonstatistics);
mbuttonstatistics.Click += delegate
{
StartActivity(typeof(Stats));
};
#endregion
#region Info
Button mbuttoninfo = FindViewById<Button>(Resource.Id.buttoninfo);
mbuttoninfo.Click += delegate
{
StartActivity(typeof(Aboutinfo));
};
#endregion
#region Exit an app
Button mbuttonexit = FindViewById<Button>(Resource.Id.buttonexit);
mbuttonexit.Click += delegate
{
System.Environment.Exit(0);
};
#endregion
}
}
}