public MobileFormsTestApp(TestFramework framework, MobileTestOptions options) { App = new MobileTestApp(this, framework, options); MainLabel = new Label { HorizontalTextAlignment = TextAlignment.Start, Text = "Welcome to Xamarin AsyncTests!" }; StatusLabel = new Label { HorizontalTextAlignment = TextAlignment.Start }; StatisticsLabel = new Label { HorizontalTextAlignment = TextAlignment.Start }; RunButton = new Button { Text = "Run", IsEnabled = false }; StopButton = new Button { Text = "Stop", IsEnabled = false }; var buttonLayout = new StackLayout { HorizontalOptions = LayoutOptions.Center, Orientation = StackOrientation.Horizontal, Children = { RunButton, StopButton } }; CategoryPicker = new Picker { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Center, }; CategoryPicker.SelectedIndexChanged += (sender, e) => { if (CategoryChangedEvent != null) { CategoryChangedEvent(this, CategoryPicker.SelectedIndex); } }; Content = new StackLayout { VerticalOptions = LayoutOptions.Center, Orientation = StackOrientation.Vertical, Children = { MainLabel, StatusLabel, StatisticsLabel, buttonLayout, CategoryPicker } }; MainPage = new ContentPage { Content = Content }; RunButton.Clicked += (s, e) => App.Run(); StopButton.Clicked += (sender, e) => App.Stop(); }
public MobileLogger(MobileTestApp app) { MobileApp = app; }