[Tapitest] Added tapitest base code and modem tests
[platform/core/csapi/tizenfx.git] / test / Tizen.Tapitest / MainPage.cs
1 using System;
2 using Xamarin.Forms;
3
4 namespace XamarinForTizen.Tizen
5 {
6     public class MainPage : ContentPage
7     {
8         public MainPage()
9         {
10             var commonBtn = new Button
11             {
12                 Text = "Common",
13                 VerticalOptions = LayoutOptions.Start,
14                 HorizontalOptions = LayoutOptions.FillAndExpand
15             };
16             commonBtn.Clicked += CommonBtn_Clicked;
17
18             var modemBtn = new Button
19             {
20                 Text = "Modem",
21                 VerticalOptions = LayoutOptions.Start,
22                 HorizontalOptions = LayoutOptions.FillAndExpand
23             };
24             modemBtn.Clicked += ModemBtn_Clicked;
25             Content = new StackLayout
26             {
27                 VerticalOptions = LayoutOptions.Center,
28                 Children = {
29                         commonBtn, modemBtn
30                     }
31             };
32         }
33
34         private async void ModemBtn_Clicked(object sender, EventArgs e)
35         {
36             await Navigation.PushAsync(new ModemPage());
37         }
38
39         private async void CommonBtn_Clicked(object sender, EventArgs e)
40         {
41             await Navigation.PushAsync(new CommonPage());
42         }
43     }
44 }