Ejemplo n.º 1
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();
     }
 }
Ejemplo n.º 2
0
 public RegisterPage(MainWindow mainWindow)
 {
     InitializeComponent();
     _mw             = mainWindow;
     _AccountNnumber = GenerateAccountNumber.Method(_mw);
     this.AccountNumberLabelOutput.Content = _AccountNnumber;
     _vm             = new RegisterPageVM(_mw, this);
     _mw.DataContext = _vm;
 }
 public RegisterPage()
 {
     viewModel = new RegisterPageVM(new SQLiteDataService());
     InitializeComponent();
     navbar.button_register.Click    += RegisterTransition;
     navbar.button_login.Click       += ProfileTransition;
     navbar.button_FAQ.Click         += FAQTransition;
     content.buttonCancel.Click      += GoBack;
     content.buttonUploadPhoto.Click += UploadPhoto;
     content.buttonRegister.Click    += Register;
     content.comboGroup.ItemsSource   = viewModel.GetGroups();
 }
Ejemplo n.º 4
0
 public RegisterPageVMTest()
 {
     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 = "******", RepeatPassword = "******"
     };
     vm = new RegisterPageVM();
 }
Ejemplo n.º 5
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();
     }
 }
Ejemplo n.º 6
0
        private void CreateAccountButton_Click(object sender, RoutedEventArgs e)
        {
            RegisterPageVM content = (RegisterPageVM)this.DataContext;

            NavigationService.Navigate(new LoginPage(content.window, content.Username, content.Password));
        }
Ejemplo n.º 7
0
 public RegisterCommand(RegisterPageVM viewModel)
 {
     this.viewModel = viewModel;
 }
Ejemplo n.º 8
0
 public RegisterPage()
 {
     InitializeComponent();
     BindingContext = new RegisterPageVM();
 }