Beispiel #1
0
        void Init()
        {
            BackgroundColor              = Constants.BackgroundColor;
            Lbl_FirstName.TextColor      = Constants.MainTextColor;
            Lbl_LastName.TextColor       = Constants.MainTextColor;
            Lbl_Birthdate.TextColor      = Constants.MainTextColor;
            Lbl_Gender.TextColor         = Constants.MainTextColor;
            Lbl_Email.TextColor          = Constants.MainTextColor;
            Lbl_Password.TextColor       = Constants.MainTextColor;
            Lbl_RepeatPassword.TextColor = Constants.MainTextColor;
            ActivitySpinner.IsVisible    = false;
            LoginIcon.HeightRequest      = Constants.LoginIconHeight;
            //check for internet connection
            App.StartCheckIfInternet(Lbl_NoInternet, this);

            //after the firstname is entered, the focus should be on the lastname field
            Entry_FirstName.Completed += (s, e) => Entry_LastName.Focus();
            //after the lastname is entered, the focus should be on the birthday field
            Entry_LastName.Completed += (s, e) => DatePicker_Birthday.Focus();
            //after the birthday is entered, the focus should be on the gender field
            DatePicker_Birthday.DateSelected += (s, e) => Picker_Gender.Focus();
            //after the gender is entered, the focus should be on the email entry field
            Picker_Gender.SelectedIndexChanged += (s, e) => Entry_Email.Focus();
            //after the email is entered, the focus should be on the password entry field
            Entry_Email.Completed += (s, e) => Entry_Password.Focus();
            //after the password is entered, the focus should be on the repeat password entry field
            Entry_Password.Completed += (s, e) => Entry_RepeatPassword.Focus();
            //after the username and the password have been entered, the login function should be triggered
            Entry_RepeatPassword.Completed += (s, e) => RegisterProcedure(s, e);
        }
Beispiel #2
0
 void Init()
 {
     Entry_Username.Completed    += (s, e) => Entry_Password.Focus();
     Entry_Password.Completed    += (s, e) => Entry_Password2.Focus();
     Entry_Password2.Completed   += (s, e) => Entry_Email.Focus();
     Entry_Email.Completed       += (s, e) => Entry_Location.Focus();
     Entry_Location.Completed    += (s, e) => Entry_Contact.Focus();
     Entry_Contact.Completed     += (s, e) => Entry_ProfileName.Focus();
     Entry_ProfileName.Completed += (s, e) => Entry_ProfileName.Focus();
     Entry_ProfileName.Completed += (s, e) => RegisterProcedure(s, e);
 }
Beispiel #3
0
        void Init()
        {
            btnNext.BackgroundColor = Constants.BackgroundTextColor;
            btnNext.TextColor       = Constants.MainTextColor;
            LoginIcon.HeightRequest = Constants.LoginIconHeight;

            Entry_Email.Text       = string.Empty;
            Entry_Familienaam.Text = string.Empty;
            Entry_Password.Text    = string.Empty;
            Entry_Voornaam.Text    = string.Empty;

            Entry_Password.FontSize    = 15.5;
            Entry_Email.FontSize       = 15.5;
            Entry_Voornaam.FontSize    = 15.5;
            Entry_Familienaam.FontSize = 15.5;

            Entry_Voornaam.Completed    += (s, e) => Entry_Familienaam.Focus();
            Entry_Familienaam.Completed += (s, e) => Entry_Email.Focus();
            Entry_Email.Completed       += (s, e) => Entry_Password.Focus();
            Entry_Password.Completed    += (s, e) => NextProcedure(s, e);
        }
Beispiel #4
0
        void Init()
        {
            BackgroundColor        = Constants.BackgroundColor;
            Lbl_Username.TextColor = Constants.MainTextColor;
            Lbl_Password.TextColor = Constants.MainTextColor;
            Lbl_Email.TextColor    = Constants.MainTextColor;
            Lbl_FName.TextColor    = Constants.MainTextColor;
            Lbl_LName.TextColor    = Constants.MainTextColor;


            ActivitySpinner.IsVisible = false;


            //App.StartCheckIfInternet(lbl_NoInternet, this);

            Entry_Username.Completed += (s, e) => Entry_FName.Focus();
            Entry_FName.Completed    += (s, e) => Entry_LName.Focus();
            Entry_LName.Completed    += (s, e) => Entry_Email.Focus();
            Entry_Email.Completed    += (s, e) => Entry_Password.Focus();
            //Entry_Password.IsEnabled = false;
            Entry_Password.Completed += (s, e) => RegisterProcedure(s, e);
        }
Beispiel #5
0
        public RegisterPage()
        {
            InitializeComponent();
            if (Device.RuntimePlatform == Device.iOS)
            {
                ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("#f37a3f");
                ((NavigationPage)Application.Current.MainPage).BarTextColor       = Color.White;
            }
            SetActivityIndicatorState(false);
            Entry_Registration_Key.Completed  += (s, e) => Entry_Username.Focus();
            Entry_Username.Completed          += (s, e) => Entry_Password.Focus();
            Entry_Password.Completed          += (s, e) => Entry_Password_Confirm.Focus();
            Entry_Password_Confirm.Completed  += (s, e) => Entry_First_Name.Focus();
            Entry_First_Name.Completed        += (s, e) => Entry_Last_Name.Focus();
            Entry_Last_Name.Completed         += (s, e) => GenderPicker.Focus();
            GenderPicker.SelectedIndexChanged += (s, e) =>
            {
                if (GenderPicker.SelectedIndex == -1)
                {
                    return;
                }
                else
                {
                    string profileTypeName = ProfileTypePicker.Items[ProfileTypePicker.SelectedIndex];
                    string profileTypeId   = ProfileTypes[profileTypeName];
                    if (profileTypeId.Equals("interpreter"))
                    {
                        Entry_Email.Focus();
                    }
                    else
                    {
                        NativeLanguagePicker.Focus();
                    }
                }
            };
            NativeLanguagePicker.SelectedIndexChanged += (s, e) => Entry_Email.Focus();
            Entry_Email.Completed        += (s, e) => Entry_Phone_Number.Focus();
            Entry_Phone_Number.Completed += (s, e) => Entry_Address.Focus();
            Entry_Address.Completed      += (s, e) => Entry_City.Focus();
            Entry_City.Completed         += (s, e) => Entry_Province.Focus();
            Entry_Province.Completed     += (s, e) => Entry_Zip_Code.Focus();

            foreach (String profileTypeName in ProfileTypes.Keys)
            {
                ProfileTypePicker.Items.Add(profileTypeName);
            }

            ProfileTypePicker.SelectedIndexChanged += (sender, args) =>
            {
                if (ProfileTypePicker.SelectedIndex == -1)
                {
                    return;
                }
                else
                {
                    string profileTypeName = ProfileTypePicker.Items[ProfileTypePicker.SelectedIndex];
                    string profileTypeId   = ProfileTypes[profileTypeName];
                    RegistrationLabel.IsVisible      = profileTypeId.Equals("interpreter") ? true : false;
                    Entry_Registration_Key.IsVisible = profileTypeId.Equals("interpreter") ? true : false;
                    LanguagePickerLabel.IsVisible    = profileTypeId.Equals("client") ? true : false;
                    NativeLanguagePicker.IsVisible   = profileTypeId.Equals("client") ? true : false;
                }
            };
            foreach (String genderName in Genders.Keys)
            {
                GenderPicker.Items.Add(genderName);
            }

            Languages = new ObservableCollection <LanguageModel>();
            LoadLanguagesAsync();

            this.BindingContext = this;
        }
Beispiel #6
0
        public RegisterPage()
        {
            InitializeComponent();
            SetActivityIndicatorState(false);
            Entry_Registration_Key.Completed  += (s, e) => Entry_Username.Focus();
            Entry_Username.Completed          += (s, e) => Entry_Password.Focus();
            Entry_Password.Completed          += (s, e) => Entry_Password_Confirm.Focus();
            Entry_Password_Confirm.Completed  += (s, e) => Entry_First_Name.Focus();
            Entry_First_Name.Completed        += (s, e) => Entry_Last_Name.Focus();
            Entry_Last_Name.Completed         += (s, e) => GenderPicker.Focus();
            GenderPicker.SelectedIndexChanged += (s, e) =>
            {
                if (GenderPicker.SelectedIndex == -1)
                {
                    return;
                }
                else
                {
                    string profileTypeName = ProfileTypePicker.Items[ProfileTypePicker.SelectedIndex];
                    string profileTypeId   = ProfileTypes[profileTypeName];
                    if (profileTypeId.Equals("interpreter"))
                    {
                        Entry_Email.Focus();
                    }
                    else
                    {
                        NativeLanguagePicker.Focus();
                    }
                }
            };
            NativeLanguagePicker.SelectedIndexChanged += (s, e) => Entry_Email.Focus();
            Entry_Email.Completed        += (s, e) => Entry_Phone_Number.Focus();
            Entry_Phone_Number.Completed += (s, e) => Entry_Address.Focus();
            Entry_Address.Completed      += (s, e) => Entry_City.Focus();
            Entry_City.Completed         += (s, e) => Entry_Province.Focus();
            Entry_Province.Completed     += (s, e) => Entry_Zip_Code.Focus();

            foreach (String profileTypeName in ProfileTypes.Keys)
            {
                ProfileTypePicker.Items.Add(profileTypeName);
            }

            ProfileTypePicker.SelectedIndexChanged += (sender, args) =>
            {
                if (ProfileTypePicker.SelectedIndex == -1)
                {
                    return;
                }
                else
                {
                    string profileTypeName = ProfileTypePicker.Items[ProfileTypePicker.SelectedIndex];
                    string profileTypeId   = ProfileTypes[profileTypeName];
                    Lbl_Registration_Key.IsVisible   = profileTypeId.Equals("interpreter") ? true : false;
                    Entry_Registration_Key.IsVisible = profileTypeId.Equals("interpreter") ? true : false;
                    Lbl_NativeLanguage.IsVisible     = profileTypeId.Equals("client") ? true : false;
                    NativeLanguagePicker.IsVisible   = profileTypeId.Equals("client") ? true : false;
                }
            };
            foreach (String genderName in Genders.Keys)
            {
                GenderPicker.Items.Add(genderName);
            }

            Languages = new ObservableCollection <LanguageModel>();
            LoadLanguagesAsync();

            this.BindingContext = this;
        }