protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			SetContentView (Resource.Layout.signinLayout);
			dataManager = DataManager.Instance;

			SignUpButton = FindViewById<Button> (Resource.Id.signUpButton);
			LogInButton = FindViewById<Button> (Resource.Id.logInButton);
			EmailField = FindViewById<EditText> (Resource.Id.emailField);
			PasswordField = FindViewById<EditText> (Resource.Id.passwordField);

			SignUpButton.Click += (object sender, EventArgs e) => {
				User newUser = new User ();
				newUser.email = EmailField.Text.Trim ();
				newUser.password = PasswordField.Text;
				SignUpUser (newUser);
			};

			LogInButton.Click += (object sender, EventArgs e) => {
				User newUser = new User ();
				newUser.email = EmailField.Text.Trim ();
				newUser.password = PasswordField.Text;
				LogInUser (newUser);
			};
		}
Esempio n. 2
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);
			SetContentView (Resource.Layout.main_activity);
			dataManager = DataManager.Instance;
//			if (dataManager.CurrentUser == null) {
//				StartActivity (new Intent (this, typeof(LoginActivity)));
//			}
			recyclerView = FindViewById<RecyclerView> (Resource.Id.recyclerView);
			mLayoutManager = new LinearLayoutManager (this);
			recyclerView.SetLayoutManager (mLayoutManager);
			ApplyAdapter ();
		}
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			SetContentView (Resource.Layout.detailLayout);

			int selected = Intent.GetIntExtra ("selectKey", 0);

			dataManager = DataManager.Instance;
			detailMovie = dataManager.GetMovieById (selected);

			titleTextView = FindViewById<TextView> (Resource.Id.movieTitle);
			descriptionTextView = FindViewById<TextView> (Resource.Id.description);
			runtimeTextView = FindViewById<TextView> (Resource.Id.runtime);
			actorsListView = FindViewById<ListView> (Resource.Id.actorsList);

			titleTextView.Text = detailMovie.name;
			descriptionTextView.Text = detailMovie.description;
			runtimeTextView.Text = String.Format ("Runtime: {0} seconds", detailMovie.runtime);

			AddActors ();
		}
		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);

			SetContentView (Resource.Layout.actorDetailLayout);

			int selected = Intent.GetIntExtra ("selectKey", 0);

			dataManager = DataManager.Instance;
			detailedActor = dataManager.GetActorById (selected);

			Name = FindViewById<TextView> (Resource.Id.name);
			Description = FindViewById<TextView> (Resource.Id.description);
			DateOfBirth = FindViewById<TextView> (Resource.Id.dateofbirth);
			MoviesList = FindViewById<ListView> (Resource.Id.moviesList);

			Name.Text = detailedActor.name;
			Description.Text = detailedActor.bio;
			DateOfBirth.Text = String.Format ("Born on: {0}", detailedActor.dateofbirth.ToString ("d"));

			AddMovies ();
		}