protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); App.CurrentActivity = this; SetContentView(Resource.Layout.welcome); // Create your application here viewModel = new WelcomeViewModel(); viewModel.PropertyChanged += HandlePropertyChanged; progressBar = FindViewById<ProgressBar>(Resource.Id.progressBar); buttonPlay = FindViewById<Button>(Resource.Id.button_play); buttonAbout = FindViewById<ImageButton>(Resource.Id.button_about); background = FindViewById<ImageView>(Resource.Id.background); map = FindViewById<QuestMapView>(Resource.Id.map); scrollView = FindViewById<LockableScrollView>(Resource.Id.map_scroll); //scrollView.IsScrollable = true; scrollView.SmoothScrollingEnabled = true; map.SetPins(new [] { MapPinPosition.Center, MapPinPosition.Right, MapPinPosition.Left, MapPinPosition.Center, MapPinPosition.Left, MapPinPosition.Center, MapPinPosition.Right, MapPinPosition.Left, MapPinPosition.Right, MapPinPosition.Center, MapPinPosition.Left, MapPinPosition.Center }); buttonPlay.Click += (sender, args) => { if (viewModel.GameLoaded && viewModel.Game != null && viewModel.Game.Started) { GoToGame(); return; } viewModel.LoadGameCommand.Execute(null); }; buttonAbout.Click += (sender, args) => { StartActivity(new Intent(this, typeof(AboutActivity))); OverridePendingTransition(Resource.Animation.slide_in_left, Resource.Animation.slide_out_left); }; }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); App.CurrentActivity = this; SetContentView(Resource.Layout.welcome); // Create your application here viewModel = new WelcomeViewModel(); viewModel.PropertyChanged += HandlePropertyChanged; progressBar = FindViewById <ProgressBar>(Resource.Id.progressBar); buttonPlay = FindViewById <Button>(Resource.Id.button_play); buttonAbout = FindViewById <ImageButton>(Resource.Id.button_about); background = FindViewById <ImageView>(Resource.Id.background); map = FindViewById <QuestMapView>(Resource.Id.map); scrollView = FindViewById <LockableScrollView>(Resource.Id.map_scroll); //scrollView.IsScrollable = true; scrollView.SmoothScrollingEnabled = true; map.SetPins(new [] { MapPinPosition.Center, MapPinPosition.Right, MapPinPosition.Left, MapPinPosition.Center, MapPinPosition.Left, MapPinPosition.Center, MapPinPosition.Right, MapPinPosition.Left, MapPinPosition.Right, MapPinPosition.Center, MapPinPosition.Left, MapPinPosition.Center }); buttonPlay.Click += (sender, args) => { if (viewModel.GameLoaded && viewModel.Game != null && viewModel.Game.Started) { GoToGame(); return; } viewModel.LoadGameCommand.Execute(null); }; buttonAbout.Click += (sender, args) => { StartActivity(new Intent(this, typeof(AboutActivity))); OverridePendingTransition(Resource.Animation.slide_in_left, Resource.Animation.slide_out_left); }; }