public LoginPage()
        {
            InitializeComponent();
            var loginPageVM = new LoginPageVM(ShowNextPage);

            this.BindingContext = loginPageVM;
        }
Exemplo n.º 2
0
 private void SetbindingContext()
 {
     if (this.GetType() == typeof(MainPage))
     {
         BindingContext = new MainPageVM();
     }
     else if (this.GetType() == typeof(LoginPage))
     {
         BindingContext = new LoginPageVM();
     }
     else if (this.GetType() == typeof(RegisterPage))
     {
         BindingContext = new RegisterPageVM();
     }
     else if (this.GetType() == typeof(AddPet))
     {
         BindingContext = new AddPetVM();
     }
     else if (this.GetType() == typeof(PetsPage))
     {
         BindingContext = new PetsPageVM();
     }
     else if (this.GetType() == typeof(MainDetails))
     {
         BindingContext = new MainDetailsVM();
     }
 }
        public LoginPage(PullRequestTab tab)
        {
            this.Tab       = tab;
            this.ViewModel = new LoginPageVM(tab);

            this.InitializeComponent();
        }
Exemplo n.º 4
0
 public LoginPage()
 {
     //Initialize window with View Model
     VM = new LoginPageVM(ConnectionConfigs.LiveConfig);
     InitializeComponent();
     MainContainer.DataContext = VM;
     this.DataContext          = VM;
 }
Exemplo n.º 5
0
        public LoginPage()
        {
            InitializeComponent();

            ViewModel = new LoginPageVM();

            BindingContext = ViewModel;
        }
Exemplo n.º 6
0
        public LoginPage()
        {
            InitializeComponent();
            LoginVM             = new LoginPageVM(this.Navigation);
            this.BindingContext = LoginVM;

            // iOS Platform
            On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
        }
Exemplo n.º 7
0
 public LoginPage()
 {
     this.VM = new LoginPageVM();
     InitializeComponent();
     Login.Click += async(sender, ev) =>
     {
         await AuthenticateOnlineAsync();
     };
 }
Exemplo n.º 8
0
 public LoginPageVMTest()
 {
     authService     = new Mock <IAuthService>();
     navigateService = new Mock <INavigateService>();
     App.Data        = new DataStorage(It.IsAny <string>())
     {
         AuthService     = authService.Object,
         NavigateService = navigateService.Object
     };
     user = new User {
         Login = "******", Password = "******"
     };
     vm = new LoginPageVM();
 }
Exemplo n.º 9
0
        public LoginPage(string email)
        {
            InitializeComponent();
            Xamarin.Forms.Application.Current.On <Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
            // iOS Platform
            On <Xamarin.Forms.PlatformConfiguration.iOS>().SetUseSafeArea(true);
            LoginVm             = new LoginPageVM(this.Navigation);
            this.BindingContext = LoginVm;

            if (!string.IsNullOrEmpty(email))
            {
                LoginVm.Email = email;
            }
        }
Exemplo n.º 10
0
 private void SetbindingContext()
 {
     if (this.GetType() == typeof(MainPage))
     {
         //BindingContext = Activator.CreateInstance(typeof(MainPageVM));
         BindingContext = new MainPageVM();
     }
     else if (this.GetType() == typeof(LoginPage))
     {
         BindingContext = new LoginPageVM();
     }
     else if (this.GetType() == typeof(RegisterPage))
     {
         BindingContext = new RegisterPageVM();
     }
 }
Exemplo n.º 11
0
 private void SetbindingContext()
 {
     if (this.GetType() == typeof(MainPage))
     {
         BindingContext = new MainPageVM();
     }
     else if (this.GetType() == typeof(LoginPage))
     {
         BindingContext = new LoginPageVM();
     }
     else if (this.GetType() == typeof(SignupPage))
     {
         BindingContext = new SignupPageVM();
     }
     else if (this.GetType() == typeof(SupportPage))
     {
         BindingContext = new SupportPageVM();
     }
     else if (this.GetType() == typeof(SettingsPage))
     {
         BindingContext = new SettingsPageVM();
     }
     else if (this.GetType() == typeof(FavoritesPage))
     {
         BindingContext = new FavoritesPageVM();
     }
     else if (this.GetType() == typeof(DogProfilePage))
     {
         BindingContext = new DogProfilePageVM();
     }
     else if (this.GetType() == typeof(MatchPage))
     {
         BindingContext = new MatchPageVM();
     }
     else if (this.GetType() == typeof(MatchHistoryPage))
     {
         BindingContext = new MatchHistoryPageVM();
     }
 }
Exemplo n.º 12
0
        private void RegisterButton_Click(object sender, RoutedEventArgs e)
        {
            LoginPageVM content = (LoginPageVM)this.DataContext;

            NavigationService.Navigate(new RegisterPage(content.window, content.Username, content.Password));
        }
Exemplo n.º 13
0
 public LoginCommand(LoginPageVM viewModel)
 {
     this.viewModel = viewModel;
 }
Exemplo n.º 14
0
 public LoginVMTest() : base()
 {
     _appUser = null;
     VM       = new LoginPageVM(dbConName);
 }
Exemplo n.º 15
0
 public LoginCmd(LoginPageVM vm)
 {
     VM = vm;
 }
Exemplo n.º 16
0
 public LoginPage()
 {
     InitializeComponent();
     BExit          = true;
     BindingContext = viewModel = new LoginPageVM();
 }