public LoginController (IntPtr handle) : base (handle)
		{
			loginViewModel = ServiceContainer.Resolve<LoginViewModel>();

			//Hook up ViewModel events
			loginViewModel.IsBusyChanged += OnIsBusyChanged;
			loginViewModel.IsValidChanged += OnIsValidChanged;
		}
示例#2
0
        /// <summary>
        /// Class constructor
        /// </summary>
        public LoginActivity()
        {
            loginViewModel = ServiceContainer.Resolve<LoginViewModel> ();

            //sets valid changed to show the login button.
            loginViewModel.IsValidChanged += (sender, e) => {
                if (login != null)
                    login.Enabled = loginViewModel.IsValid ? true : false;
            };
        }
        public void SetUp ()
        {
            ServiceContainer.Register<ILoginService> (() => new SampleLoginService ());

            viewModel = new LoginViewModel ();
        }