示例#1
0
        //Konstruktor
        public MainPage()
        {
            //Initialisierung der UI (Xaml-Datei). Sollte immer erste Aktion des Konstruktors sein
            InitializeComponent();

            //Initialisierung der Personenliste
            PersonenListe = new List <string>();
            PersonenListe.Add("Rainer Zufall");
            PersonenListe.Add("Anna Nass");

            //Zuweisung der ItemSource des Listviews. Hierdurch werden die Elemente der Liste im ListView angezeigt und die Kutzbindungen
            //aus dem DataTemplate ermöglicht
            LstV_Personen.ItemsSource = PersonenListe;

            //Zuweisung von EventHandlern zu den Completet-Events, damit ein besserer Bedienfluss gegeben ist
            Entry_FirstName.Completed += (s, e) => Entry_LastName.Focus();
            Entry_LastName.Completed  += Btn_Ok_Clicked;

            //Neuzuordnung der verwendetet Culure (Sprache uä.)
            Resource.Culture = new System.Globalization.CultureInfo("de");

            //Zuweisung von Sprachressourcen an UI-Elemente (vgl. Resource.resx und Resource.de.resx)
            Lbl_Loc.Text = Resource.Lbl_String;
            Btn_Loc.Text = Resource.Btn_String;
        }
示例#2
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);
        }
 private void InputInfo()
 {
     Entry_FirstName.Completed   += (s, e) => Entry_LastName.Focus();
     Entry_LastName.Completed    += (s, e) => EntryPhone.Focus();
     EntryPhone.Completed        += (s, e) => Entry_email.Focus();
     Entry_email.Completed       += (s, e) => Entry_Password.Focus();
     Entry_Password.Completed    += (s, e) => Entry_PassConfirm.Focus();
     Entry_PassConfirm.Completed += (s, e) => SignUpProcedure(s, e);
 }