Esempio n. 1
0
        public Inschrijf(entiteiten.Les les)
        {
            Title = les.naam;

            voornaam = new Entry();
            voornaam.HorizontalTextAlignment = TextAlignment.Start;
            voornaam.PlaceholderColor        = Color.Gray;
            voornaam.TextColor   = Color.Black;
            voornaam.Placeholder = "Voornaam";

            achternaam = new Entry();
            achternaam.HorizontalTextAlignment = TextAlignment.Start;
            achternaam.PlaceholderColor        = Color.Gray;
            achternaam.TextColor   = Color.Black;
            achternaam.Placeholder = "Achternaam";

            straatnaam = new Entry();
            straatnaam.HorizontalTextAlignment = TextAlignment.Start;
            straatnaam.PlaceholderColor        = Color.Gray;
            straatnaam.TextColor   = Color.Black;
            straatnaam.Placeholder = "Straatnaam";

            huisnummer = new Entry();
            huisnummer.HorizontalTextAlignment = TextAlignment.Start;
            huisnummer.PlaceholderColor        = Color.Gray;
            huisnummer.TextColor   = Color.Black;
            huisnummer.Keyboard    = Keyboard.Numeric;
            huisnummer.Placeholder = "Huisnr";

            geboortedatum_dag = new Entry();
            geboortedatum_dag.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_dag.PlaceholderColor        = Color.Gray;
            geboortedatum_dag.TextColor   = Color.Black;
            geboortedatum_dag.Keyboard    = Keyboard.Numeric;
            geboortedatum_dag.Placeholder = "DD";

            geboortedatum_maand = new Entry();
            geboortedatum_maand.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_maand.PlaceholderColor        = Color.Gray;
            geboortedatum_maand.TextColor   = Color.Black;
            geboortedatum_maand.Keyboard    = Keyboard.Numeric;
            geboortedatum_maand.Placeholder = "MM";

            geboortedatum_jaar = new Entry();
            geboortedatum_jaar.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_jaar.PlaceholderColor        = Color.Gray;
            geboortedatum_jaar.TextColor   = Color.Black;
            geboortedatum_jaar.Keyboard    = Keyboard.Numeric;
            geboortedatum_jaar.Placeholder = "JJJJ";



            postcode = new Entry();
            postcode.HorizontalTextAlignment = TextAlignment.Start;
            postcode.PlaceholderColor        = Color.Gray;
            postcode.TextColor   = Color.Black;
            postcode.Placeholder = "Postcode";

            woonplaats = new Entry();
            woonplaats.HorizontalTextAlignment = TextAlignment.Start;
            woonplaats.PlaceholderColor        = Color.Gray;
            woonplaats.TextColor   = Color.Black;
            woonplaats.Placeholder = "Woonplaats";

            telefoonnummer = new Entry();
            telefoonnummer.HorizontalTextAlignment = TextAlignment.Start;
            telefoonnummer.PlaceholderColor        = Color.Gray;
            telefoonnummer.TextColor   = Color.Black;
            telefoonnummer.Placeholder = "Telefoonnummer (optioneel)";
            telefoonnummer.Keyboard    = Keyboard.Numeric;

            emailadres = new Entry();
            emailadres.HorizontalTextAlignment = TextAlignment.Start;
            emailadres.PlaceholderColor        = Color.Gray;
            emailadres.TextColor   = Color.Black;
            emailadres.Placeholder = "Emailadres";

            rekeningnummer = new Entry();
            rekeningnummer.HorizontalTextAlignment = TextAlignment.Start;
            rekeningnummer.PlaceholderColor        = Color.Gray;
            rekeningnummer.TextColor   = Color.Black;
            rekeningnummer.Placeholder = "Rekeningnummer (IBAN)";

            rekeninghouder = new Entry();
            rekeninghouder.HorizontalTextAlignment = TextAlignment.Start;
            rekeninghouder.PlaceholderColor        = Color.Gray;
            rekeninghouder.TextColor   = Color.Black;
            rekeninghouder.Placeholder = "Naam rekeninghouder";

            geboortedatum      = new Label();
            geboortedatum.Text = "Geboortedatum";
            geboortedatum.HorizontalOptions = LayoutOptions.Start;
            geboortedatum.TextColor         = Color.Black;
            geboortedatum.VerticalOptions   = LayoutOptions.Center;
            geboortedatum.TextColor         = Color.Gray;
            geboortedatum.FontSize          = 17.5;

            controls.CheckBox machtiging_checkbox = new controls.CheckBox();
            machtiging_checkbox.IsChecked = false;
            machtiging_checkbox.CheckedBackgroundImageSource = "checkbox_background";
            machtiging_checkbox.CheckmarkImageSource         = "checkbox_check";
            machtiging_checkbox.BorderImageSource            = "checkbox_border";
            machtiging_checkbox.Title = "Hiermee machtig ik L-Joy Dancefactory om per kwartaal automatisch de contributie af te laten schrijven.";


            controls.CheckBox algemenevoorwaarden_checkbox = new controls.CheckBox();
            algemenevoorwaarden_checkbox.IsChecked = false;
            algemenevoorwaarden_checkbox.CheckedBackgroundImageSource = "checkbox_background";
            algemenevoorwaarden_checkbox.CheckmarkImageSource         = "checkbox_check";
            algemenevoorwaarden_checkbox.BorderImageSource            = "checkbox_border";
            algemenevoorwaarden_checkbox.Title = "Hiermee verklaar ik akkoord te gaan met de Algemene Voorwaarden van L-Joy dancefactory.*";

            controls.CheckBox nieuwsbrief_checkbox = new controls.CheckBox();
            nieuwsbrief_checkbox.IsChecked = false;
            nieuwsbrief_checkbox.CheckedBackgroundImageSource = "checkbox_background";
            nieuwsbrief_checkbox.CheckmarkImageSource         = "checkbox_check";
            nieuwsbrief_checkbox.BorderImageSource            = "checkbox_border";
            nieuwsbrief_checkbox.Title = "Ik wil de nieuwsbrief en info per email ontvangen.";

            controls.CheckBox fotofilmmateriaal_checkbox = new controls.CheckBox();
            fotofilmmateriaal_checkbox.IsChecked = false;
            fotofilmmateriaal_checkbox.CheckedBackgroundImageSource = "checkbox_background";
            fotofilmmateriaal_checkbox.CheckmarkImageSource         = "checkbox_check";
            fotofilmmateriaal_checkbox.BorderImageSource            = "checkbox_border";
            fotofilmmateriaal_checkbox.Title = "Ik geef toestemming voor het maken van foto en filmmateriaal.";

            btn1 = new Button {
                Margin = new Thickness(0, 0, 0, 7.5), Text = "Schrijf je in", HorizontalOptions = LayoutOptions.FillAndExpand, FontAttributes = FontAttributes.Bold, FontSize = 14, BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };
            btn1.Clicked += async(object sender, EventArgs e) =>
            {
                if (voornaam.Text == null || achternaam.Text == null || straatnaam.Text == null || huisnummer.Text == null || geboortedatum_dag.Text == null || geboortedatum_maand.Text == null || geboortedatum_jaar.Text == null || postcode.Text == null || woonplaats.Text == null || telefoonnummer.Text == null || emailadres.Text == null || rekeningnummer.Text == null || rekeninghouder.Text == null || "".Equals(voornaam.Text) || "".Equals(achternaam.Text) || "".Equals(straatnaam.Text) || "".Equals(huisnummer.Text) || "".Equals(geboortedatum_dag.Text) || "".Equals(geboortedatum_maand.Text) || "".Equals(geboortedatum_jaar.Text) || "".Equals(postcode.Text) || "".Equals(woonplaats.Text) || "".Equals(telefoonnummer.Text) || "".Equals(emailadres.Text) || "".Equals(rekeningnummer.Text) || "".Equals(rekeninghouder.Text))
                {
                    await DisplayAlert("Mislukt!", "Niet alle velden zijn ingevuld.", "Ok");
                }
                else if (!algemenevoorwaarden_checkbox.IsChecked)
                {
                    await DisplayAlert("Mislukt!", "Om in te schrijven moet u akkoord gaan met de algemene voorwaarden.", "Ok");
                }
                else
                {
                    popups.laadscherm scherm = new popups.laadscherm();
                    await Navigation.PushPopupAsync(scherm);

                    await Task.Run(async() =>     // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                    {
                        RestService con = new RestService();
                        result          = await con.lesToevoegen(helper.Settings.IdSettings, les.lesid);
                    });

                    if ("0".Equals(result))
                    {
                        await Task.Run(() =>    // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                        {
                            email.SendMail email = new email.SendMail();
                            //Email naar de gebruiker
                            email.EmailVerzenden("U heeft zich ingeschreven!",
                                                 "U heeft zich succesvol ingeschreven voor " + les.naam + " op " + les.dag + "." + "\r\n" +
                                                 "Wij verwachten u om " + les.tijdstip + " in de les." + "\r\n" + "\r\n" +
                                                 "Met vriendelijke groet," + "\r\n" +
                                                 "L-Joy Dancefactory",
                                                 emailadres.Text, voornaam.Text);

                            //Email naar l-joy
                            email.EmailVerzenden("Inschrijving",
                                                 "Voornaam: " + voornaam.Text + "\r\n" +
                                                 "Achternaam: " + achternaam.Text + "\r\n" +
                                                 "Straatnaam: " + straatnaam.Text + "\r\n" +
                                                 "Huisnummer: " + huisnummer.Text + "\r\n" +
                                                 "Geboortedatum: " + geboortedatum_dag.Text + " - " + geboortedatum_maand.Text + " - " + geboortedatum_jaar.Text + "\r\n" +
                                                 "Postcode: " + postcode.Text + "\r\n" +
                                                 "Woonplaats: " + woonplaats.Text + "\r\n" +
                                                 "Telefoonnummer: " + telefoonnummer.Text + "\r\n" +
                                                 "Email: " + emailadres.Text + "\r\n" +
                                                 "Rekeningnummer: " + rekeningnummer.Text + "\r\n" +
                                                 "Rekeninghouder: " + rekeninghouder.Text + "\r\n" +
                                                 "Les: " + les.naam + "\r\n" +
                                                 "Docent: " + les.docent + "\r\n" +
                                                 "Dag: " + les.dag + "\r\n" +
                                                 "Tijdstip: " + les.tijdstip + "\r\n" +
                                                 "Machtiging: " + machtiging_checkbox.IsChecked + "\r\n" +
                                                 "Info en nieuwsbrief: " + nieuwsbrief_checkbox.IsChecked + "\r\n" +
                                                 "Fotomateriaal: " + fotofilmmateriaal_checkbox.IsChecked);
                        });

                        await Navigation.RemovePopupPageAsync(scherm);
                        await DisplayAlert("Gelukt!", "Je hebt je succesvol ingeschreven.", "Ok");
                    }
                    else
                    {
                        await Navigation.RemovePopupPageAsync(scherm);
                        await DisplayAlert("Mislukt!", "Er is iets fout gegaan, probeer het nog eens.", "Ok");
                    }
                }
            };

            algemenevoorwaarden_link.Clicked += (object sender, EventArgs e) =>
            {
                Navigation.PushPopupAsync(new popups.algemenevoorwaarden());
            };


            Grid sGrid = new Grid();

            sGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(240)
            });
            sGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });

            sGrid.Children.Add(straatnaam, 0, 0);
            sGrid.Children.Add(huisnummer, 1, 0);

            Grid gGrid = new Grid();

            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(150)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });

            gGrid.Children.Add(geboortedatum, 0, 0);
            gGrid.Children.Add(geboortedatum_dag, 1, 0);
            gGrid.Children.Add(geboortedatum_maand, 2, 0);
            gGrid.Children.Add(geboortedatum_jaar, 3, 0);



            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Margin   = new Thickness(10, 10, 10, 10),
                    Children =
                    {
                        new Frame             {
                            Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.FromHex("#FF4081"), Content = new StackLayout{
                                Children =
                                {
                                    new Label {
                                        Text = "Persoonlijke gegevens", HorizontalTextAlignment = TextAlignment.Center, TextColor = Color.White, FontSize = 18, FontAttributes = FontAttributes.Bold
                                    },
                                    new BoxView()
                                    {
                                        Color = Color.White, HeightRequest = 1
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                voornaam
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                achternaam
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                sGrid
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                postcode
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                woonplaats
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                telefoonnummer
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                emailadres
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                gGrid
                                            }
                                        }, HasShadow = true,
                                    }
                                }
                            }, HasShadow = true,
                        },
                        new Frame             {
                            Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.FromHex("#FF4081"), Content = new StackLayout{
                                Children =
                                {
                                    new Label {
                                        Text = "Bankgegevens", HorizontalTextAlignment = TextAlignment.Center, TextColor = Color.White, FontSize = 18, FontAttributes = FontAttributes.Bold
                                    },
                                    new BoxView()
                                    {
                                        Color = Color.White, HeightRequest = 1
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                rekeningnummer
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                rekeninghouder
                                            }
                                        }, HasShadow = true,
                                    }
                                }
                            }, HasShadow = true,
                        },
                        new Frame             {
                            Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.FromHex("#FF4081"), Content = new StackLayout{
                                Children =
                                {
                                    new Label {
                                        Text = "Toestemmingen", HorizontalTextAlignment = TextAlignment.Center, TextColor = Color.White, FontSize = 18, FontAttributes = FontAttributes.Bold
                                    },
                                    new BoxView()
                                    {
                                        Color = Color.White, HeightRequest = 1
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                machtiging_checkbox
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                algemenevoorwaarden_checkbox
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                nieuwsbrief_checkbox
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                fotofilmmateriaal_checkbox
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Label {
                                        Text = "* verplichte velden	", TextColor = Color.White
                                    }
                                }
                            }, HasShadow = true,
                        },
                        algemenevoorwaarden_link,
                        btn1
                    }
                }
            };
        }
Esempio n. 2
0
        public wachtwoordVeranderen(string gebruikersnaam)
        {
            Entry wachtwoordNieuw = new Entry {
                Placeholder = "Nieuw wachtwoord", IsPassword = true
            };
            Entry wachtwoordOpnieuw = new Entry {
                Placeholder = "Nieuw wachtwoord (opnieuw)", IsPassword = true
            };

            Button verzendknop = new Button {
                Text = "Wachtwoord veranderen", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            verzendknop.Clicked += async(object sender, EventArgs e) =>
            {
                if (wachtwoordNieuw.Text.Equals(wachtwoordOpnieuw.Text))
                {
                    popups.laadscherm scherm = new popups.laadscherm();
                    await Navigation.PushPopupAsync(scherm);

                    await Task.Run(async() =>     // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                    {
                        helper.Settings.UsernameSettings = gebruikersnaam;
                        RestService restService          = new RestService();
                        var response = await restService.WachtwoordVeranderenEnActiveren(gebruikersnaam, wachtwoordNieuw.Text);
                        helper.Settings.UsernameSettings = gebruikersnaam;
                        RestService con            = new RestService();
                        helper.Settings.IdSettings = await con.VerkrijgId(gebruikersnaam);
                    });

                    await Navigation.RemovePopupPageAsync(scherm);
                    await DisplayAlert("Gelukt!", "Je wachtwoord is gewijzigd.", "Oké");

                    await PopupNavigation.Instance.PopAsync();

                    Application.Current.MainPage = new NavigationPage(new applicatie.ApplicatieStarter());
                }
                else
                {
                    await DisplayAlert("Mislukt!", "De wachtwoorden die je hebt ingevuld komen niet overeen.", "Ok");
                }
            };
            Button terugknop = new Button {
                Text = "Terug", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            terugknop.Clicked += (object sender, EventArgs e) =>
            {
                PopupNavigation.Instance.PopAsync();
            };

            Content = new StackLayout {
                Margin   = new Thickness(10, 10, 10, 10),
                Children =
                {
                    new Frame             {
                        BackgroundColor = Color.White, CornerRadius = 5, HasShadow = true, VerticalOptions = LayoutOptions.CenterAndExpand,
                        Content         = new StackLayout
                        {
                            Children =
                            {
                                new Label {
                                    Text = "Wachtwoord veranderen", TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, FontSize = 20
                                },
                                new BoxView()
                                {
                                    Color = Color.Black, HeightRequest = 1
                                },

                                wachtwoordNieuw,
                                wachtwoordOpnieuw,
                                verzendknop,
                                terugknop
                            }
                        }
                    }
                }
            };
        }
Esempio n. 3
0
        public wachtwoord()
        {
            Entry gebruikersnaam_of_email = new Entry {
                Placeholder = "Gebruikersnaam of email"
            };

            Button verzendknop = new Button {
                Text = "Wachtwoord opvragen", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            verzendknop.Clicked += async(object sender, EventArgs e) =>
            {
                try
                {
                    popups.laadscherm scherm = new popups.laadscherm();
                    await Navigation.PushPopupAsync(scherm);

                    await Task.Run(async() =>     // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                    {
                        RestService restService = new RestService();
                        nieuwWachtwoord         = genereerWachtwoord();
                        response = await restService.WachtwoordVeranderen(gebruikersnaam_of_email.Text, nieuwWachtwoord);
                    });

                    if (response.Equals("1"))
                    {
                        await DisplayAlert("Mislukt!", "De gebruikersnaam of het email-adres bestaat niet.", "Ok");
                    }
                    else if (response.Equals("2"))
                    {
                        await DisplayAlert("Mislukt!", "Er is iets fout gegaan, probeer het nog eens.", "Ok");
                    }
                    else
                    {
                        email.SendMail mail = new email.SendMail();
                        mail.EmailVerzenden("Nieuw wachtwoord",
                                            "Wij hebben uw wachtwoord gewijzigd." + "\r\n" + "\r\n" +
                                            "Je nieuwe wachtwoord is: " + nieuwWachtwoord + "\r\n" + "\r\n" +
                                            "Heb jij dit nieuwe wachtwoord niet aangevraagd, neem dan contact op met L-Joy Dancefactory. Het telefoonnummer kun je vinden op de site: www.l-joy.nl" + "\r\n" +
                                            "Wanneer je met je nieuwe wachtwoord inlogd, wordt je gevraagd het wachtwoord meteen te veranderen." + "\r\n" + "\r\n" +
                                            "Met vriendelijke groet," + "\r\n" +
                                            "L-Joy Dancefactory", response, gebruikersnaam_of_email.Text);
                        await DisplayAlert("Gelukt!", "Er is een nieuw wachtwoord naar " + response + " gestuurd.", "Ok");
                    }
                    await Navigation.RemovePopupPageAsync(scherm);

                    await PopupNavigation.Instance.PopAsync();
                }
                catch (Exception ex)
                {
                    await DisplayAlert("Gelukt!", ex.ToString(), "Ok");
                }
            };
            Button terugknop = new Button {
                Text = "Terug", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            terugknop.Clicked += (object sender, EventArgs e) =>
            {
                PopupNavigation.Instance.PopAsync();
            };

            Content = new StackLayout {
                Margin   = new Thickness(10, 10, 10, 10),
                Children =
                {
                    new Frame             {
                        BackgroundColor = Color.White, CornerRadius = 5, HasShadow = true, VerticalOptions = LayoutOptions.CenterAndExpand,
                        Content         = new StackLayout
                        {
                            Children =
                            {
                                new Label {
                                    Text = "Wachtwoord vergeten", TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, FontSize = 20
                                },
                                new BoxView()
                                {
                                    Color = Color.Black, HeightRequest = 1
                                },

                                gebruikersnaam_of_email,
                                verzendknop,
                                terugknop
                            }
                        }
                    }
                }
            };
        }
        public wachtwoordVeranderenAccountPagina()
        {
            Entry wachtwoordOud = new Entry {
                Text = "", Placeholder = "Oud wachtwoord", IsPassword = true
            };
            Entry wachtwoordNieuw = new Entry {
                Text = "", Placeholder = "Nieuw wachtwoord", IsPassword = true
            };
            Entry wachtwoordOpnieuw = new Entry {
                Text = "", Placeholder = "Nieuw wachtwoord (opnieuw)", IsPassword = true
            };

            Button verzendknop = new Button {
                Text = "Wachtwoord veranderen", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            verzendknop.Clicked += async(object sender, EventArgs e) =>
            {
                if (!"".Equals(wachtwoordOud.Text) || !"".Equals(wachtwoordNieuw.Text) || !"".Equals(wachtwoordOpnieuw.Text))
                {
                    if (wachtwoordNieuw.Text.Equals(wachtwoordOpnieuw.Text))
                    {
                        popups.laadscherm scherm = new popups.laadscherm();
                        await Navigation.PushPopupAsync(scherm);

                        await Task.Run(async() =>     // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                        {
                            RestService restService = new RestService();
                            response = await restService.WachtwoordVeranderenAccountPagina(helper.Settings.UsernameSettings, wachtwoordNieuw.Text, wachtwoordOud.Text);
                        });

                        await Navigation.RemovePopupPageAsync(scherm);

                        if ("0".Equals(response))
                        {
                            await DisplayAlert("Gelukt!", "Je wachtwoord is gewijzigd.", "Ok");

                            await PopupNavigation.Instance.PopAsync();
                        }
                        else if ("1".Equals(response))
                        {
                            await DisplayAlert("Mislukt!", "Het ingevulde oude wachtwoord is niet juist.", "Ok");
                        }
                        else
                        {
                            await DisplayAlert("Mislukt!", "Er is iets fout gegaan, probeer het nog eens.", "Ok");
                        }
                    }
                    else
                    {
                        await DisplayAlert("Mislukt!", "De ingevulde nieuwe wachtwoorden komen niet overeen.", "Ok");
                    }
                }
                else
                {
                    await DisplayAlert("Mislukt!", "Niet alle velden zijn ingevuld.", "Ok");
                }
            };
            Button terugknop = new Button {
                Text = "Terug", BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };

            terugknop.Clicked += (object sender, EventArgs e) =>
            {
                PopupNavigation.Instance.PopAsync();
            };

            Content = new StackLayout {
                Margin   = new Thickness(10, 10, 10, 10),
                Children =
                {
                    new Frame             {
                        BackgroundColor = Color.White, CornerRadius = 5, HasShadow = true, VerticalOptions = LayoutOptions.CenterAndExpand,
                        Content         = new StackLayout
                        {
                            Children =
                            {
                                new Label {
                                    Text = "Wachtwoord veranderen", TextColor = Color.Black, HorizontalTextAlignment = TextAlignment.Center, FontSize = 20
                                },
                                new BoxView()
                                {
                                    Color = Color.Black, HeightRequest = 1
                                },
                                wachtwoordOud,
                                wachtwoordNieuw,
                                wachtwoordOpnieuw,
                                verzendknop,
                                terugknop
                            }
                        }
                    }
                }
            };
        }
Esempio n. 5
0
        private async void formulierMaken()
        {
            List <entiteiten.Les>    lessen     = new List <entiteiten.Les>();
            List <controls.CheckBox> checkboxes = new List <controls.CheckBox>();

            popups.laadscherm scherm = new popups.laadscherm();
            await Navigation.PushPopupAsync(scherm);

            await Task.Run(async() =>
            {
                RestService con = new RestService();
                lessen          = await con.VerkrijgLessen();
            });

            await Navigation.RemovePopupPageAsync(scherm);


            Grid grid = new Grid();

            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(60)
            });

            for (int i = 0; i < lessen.Count; i++)
            {
                grid.RowDefinitions.Add(new RowDefinition {
                    Height = new GridLength(30)
                });
                Label label = new Label {
                    Text = lessen[i].naam + " " + lessen[i].dag + " " + lessen[i].tijdstip, VerticalOptions = LayoutOptions.Center
                };
                controls.CheckBox checkbox = new controls.CheckBox();
                checkbox.IsChecked = false;
                checkbox.CheckedBackgroundImageSource = "checkbox_background";
                checkbox.CheckmarkImageSource         = "checkbox_check";
                checkbox.BorderImageSource            = "checkbox_border";
                checkbox.Title = "";
                checkboxes.Add(checkbox);
                grid.Children.Add(checkbox, 1, i);
                grid.Children.Add(label, 0, i);
            }



            Content = new StackLayout
            {
                Children =
                {
                    new ScrollView
                    {
                        Content = new StackLayout
                        {
                            Children =
                            {
                                gebruikersnaamLabel,
                                gebruikersnaamEntry,
                                emailLabel,
                                emailEntry,
                                grid,
                                opslaanButton
                            }
                        }
                    }
                }
            };

            opslaanButton.Clicked += async(object sender, EventArgs e) =>
            {
                if (!gebruikersnaamEntry.Text.Equals("") || !emailEntry.Text.Equals(""))
                {
                    scherm = new popups.laadscherm();
                    await Navigation.PushPopupAsync(scherm);

                    await Task.Run(async() =>
                    {
                        RestService restService = new RestService();
                        var wachtwoord          = genereerWachtwoord();
                        var response            = await restService.gebruikerToevoegen(gebruikersnaamEntry.Text, emailEntry.Text, wachtwoord);
                        var id = await restService.VerkrijgId(gebruikersnaamEntry.Text);
                        for (int i = 0; i < lessen.Count; i++)
                        {
                            if (checkboxes[i].IsChecked)
                            {
                                await restService.lesToevoegen(id, lessen[i].lesid);
                            }
                        }
                        if ("Gelukt!".Equals(response))
                        {
                            email.SendMail email = new email.SendMail();
                            email.EmailVerzenden("Uw L-Joy account is aangemaakt",
                                                 "Bedankt voor het aanmelden bij de app van L-Joy Dancefactory! " + "\r\n" +
                                                 "Wij hebben een account voor u aangemaakt:" + "\r\n" + "\r\n" +
                                                 "Gebruikersnaam: " + gebruikersnaamEntry.Text + "\r\n" +
                                                 "Wachtwoord: " + wachtwoord + "\r\n" + "\r\n" +
                                                 "Wij adviseren om meteen in te loggen met uw wachtwoord. U wordt meteen gevraagd om uw wachtwoord aan te passen." + "\r\n" + "\r\n" +
                                                 "Met vriendelijke groet," + "\r\n" +
                                                 "L-Joy Dancefactory", emailEntry.Text, gebruikersnaamEntry.Text);
                        }
                    });

                    await Navigation.RemovePopupPageAsync(scherm);
                    await DisplayAlert("Gelukt!", "Gebruiker aangemaakt!", "Ok");
                }
                else
                {
                    await DisplayAlert("Gebruiker toevoegen", "Gebruikersnaam of email is niet ingevuld", "Ok");
                }
            };
        }
Esempio n. 6
0
        public Login()
        {
            NavigationPage.SetHasNavigationBar(this, false);

            BackgroundImage = "loginbackground.png";

            accountIcon                   = new Image();
            accountIcon.Source            = "account_icon.png";
            accountIcon.HorizontalOptions = LayoutOptions.Center;
            accountIcon.VerticalOptions   = LayoutOptions.Center;
            accountIcon.Aspect            = Aspect.AspectFit;

            passwordIcon                   = new Image();
            passwordIcon.Source            = "password_icon.png";
            passwordIcon.HorizontalOptions = LayoutOptions.Center;
            passwordIcon.VerticalOptions   = LayoutOptions.Center;
            accountIcon.Aspect             = Aspect.AspectFit;


            gebruikersnaam      = new Entry();
            gebruikersnaam.Text = "";
            gebruikersnaam.HorizontalTextAlignment = TextAlignment.Start;
            gebruikersnaam.HorizontalOptions       = LayoutOptions.FillAndExpand;
            gebruikersnaam.VerticalOptions         = LayoutOptions.Center;
            gebruikersnaam.Placeholder             = "Gebruikersnaam";


            wachtwoord      = new Entry();
            wachtwoord.Text = "";
            wachtwoord.HorizontalTextAlignment = TextAlignment.Start;
            wachtwoord.IsPassword        = true;
            wachtwoord.HorizontalOptions = LayoutOptions.FillAndExpand;

            wachtwoord.VerticalOptions = LayoutOptions.Center;

            wachtwoord.Placeholder = "Wachtwoord";

            login_knop                 = new Button();
            login_knop.Text            = "Log in";
            login_knop.TextColor       = Color.White;
            login_knop.BackgroundColor = Color.FromHex("#FF4081");
            login_knop.VerticalOptions = LayoutOptions.Center;
            login_knop.Clicked        += async(object sender, EventArgs e) =>
            {
                try
                {
                    if (!gebruikersnaam.Text.Equals("") && !wachtwoord.Text.Equals(""))
                    {
                        popups.laadscherm scherm = new popups.laadscherm();
                        await Navigation.PushPopupAsync(scherm);

                        await Task.Run(() =>    // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                        {
                            //0 = gebruikersnaam niet gevonden
                            //1 = goed
                            //2 = wachtwoord fout
                            //3 = goed maar eerste keer ingelogd
                            RestService con = new RestService();
                            result          = con.Inloggen(gebruikersnaam.Text, wachtwoord.Text).Result;
                        });

                        await Navigation.RemovePopupPageAsync(scherm);

                        if ("0".Equals(result))
                        {
                            await DisplayAlert("Mislukt!", "De gebruikersnaam die je hebt ingevuld bestaat niet.", "Ok");
                        }
                        else if ("1".Equals(result))
                        {
                            if ("lidian".Equals(gebruikersnaam.Text.ToLower()))
                            {
                                await Navigation.PushModalAsync(new NavigationPage(new applicatie.AdminStarter()));
                            }
                            else
                            {
                                RestService con = new RestService();
                                helper.Settings.IdSettings = await con.VerkrijgId(gebruikersnaam.Text);

                                helper.Settings.UsernameSettings = gebruikersnaam.Text;
                                Application.Current.MainPage     = new NavigationPage(new applicatie.ApplicatieStarter());
                            }
                        }
                        else if ("2".Equals(result))
                        {
                            await DisplayAlert("Mislukt!", "De gebruikersnaam en het wachtwoord komen niet overeen.", "Ok");
                        }
                        else if ("3".Equals(result))
                        {
                            popups.wachtwoordVeranderen wachtwoordVeranderen = new popups.wachtwoordVeranderen(gebruikersnaam.Text);
                            await Navigation.PushPopupAsync(wachtwoordVeranderen);
                        }
                    }
                    else
                    {
                        if (!gebruikersnaam.Text.Equals("") && wachtwoord.Text.Equals(""))
                        {
                            await DisplayAlert("Mislukt!", "Wachtwoord is niet ingevuld.", "Ok");
                        }
                        else if (gebruikersnaam.Text.Equals("") && !wachtwoord.Text.Equals(""))
                        {
                            await DisplayAlert("Mislukt!", "Gebruikersnaam is niet ingevuld.", "Ok");
                        }
                        else
                        {
                            await DisplayAlert("Mislukt!", "Gebruikersnaam en wachtwoord zijn niet ingevuld.", "Ok");
                        }
                    }
                }
                catch (Exception ex)
                {
                    await DisplayAlert("Mislukt!", ex.ToString(), "Ok");
                }
            };

            of = new Label();
            of.HorizontalTextAlignment = TextAlignment.Center;
            of.Text                  = "OF";
            of.FontAttributes        = FontAttributes.Bold;
            of.VerticalTextAlignment = TextAlignment.Center;

            wachtwoordVergeten                         = new Label();
            wachtwoordVergeten.Text                    = "Wachtwoord vergeten?";
            wachtwoordVergeten.FontAttributes          = FontAttributes.Italic;
            wachtwoordVergeten.HorizontalTextAlignment = TextAlignment.Center;
            wachtwoordVergeten.BackgroundColor         = Color.Transparent;
            wachtwoordVergeten.GestureRecognizers.Add(new TapGestureRecognizer
            {
                Command = new Command(() => OnLabelClicked()),
            });



            gast_knop                 = new Button();
            gast_knop.Text            = "Ga door als gast";
            gast_knop.TextColor       = Color.White;
            gast_knop.BackgroundColor = Color.FromHex("#FF4081");
            gast_knop.VerticalOptions = LayoutOptions.Center;
            gast_knop.Clicked        += async(object sender, EventArgs e) =>
            {
                popups.laadscherm scherm = new popups.laadscherm();
                await Navigation.PushPopupAsync(scherm);

                await Navigation.PushAsync(new applicatie.ApplicatieStarter());

                await Navigation.RemovePopupPageAsync(scherm);
            };

            Content = new StackLayout
            {
                Margin          = new Thickness(20, 20, 20, 20),
                VerticalOptions = LayoutOptions.Center,
                Children        =
                {
                    new Frame                   {
                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, VerticalOptions = LayoutOptions.Center, Opacity = 0.9f,
                        Content = new StackLayout{
                            Children =
                            {
                                new StackLayout {
                                    Orientation = StackOrientation.Horizontal,
                                    Children    =
                                    {
                                        accountIcon,
                                        gebruikersnaam
                                    }
                                },
                                new StackLayout {
                                    Orientation = StackOrientation.Horizontal,
                                    Children    =
                                    {
                                        passwordIcon,
                                        wachtwoord
                                    }
                                },
                                login_knop,
                                wachtwoordVergeten,
                                new BoxView()
                                {
                                    Color = Color.Black, HeightRequest = 1
                                },
                                gast_knop
                            }
                        }
                    }
                }
            };
        }
Esempio n. 7
0
        public Proefles(entiteiten.Les les)
        {
            Title = les.naam;

            voornaam = new Entry();
            voornaam.HorizontalTextAlignment = TextAlignment.Start;
            voornaam.PlaceholderColor        = Color.Gray;
            voornaam.TextColor   = Color.Black;
            voornaam.Placeholder = "Voornaam";

            achternaam = new Entry();
            achternaam.HorizontalTextAlignment = TextAlignment.Start;
            achternaam.PlaceholderColor        = Color.Gray;
            achternaam.TextColor   = Color.Black;
            achternaam.Placeholder = "Achternaam";

            straatnaam = new Entry();
            straatnaam.HorizontalTextAlignment = TextAlignment.Start;
            straatnaam.PlaceholderColor        = Color.Gray;
            straatnaam.TextColor   = Color.Black;
            straatnaam.Placeholder = "Straatnaam";

            huisnummer = new Entry();
            huisnummer.HorizontalTextAlignment = TextAlignment.Start;
            huisnummer.PlaceholderColor        = Color.Gray;
            huisnummer.TextColor   = Color.Black;
            huisnummer.Keyboard    = Keyboard.Numeric;
            huisnummer.Placeholder = "Huisnr";

            geboortedatum_dag = new Entry();
            geboortedatum_dag.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_dag.PlaceholderColor        = Color.Gray;
            geboortedatum_dag.TextColor   = Color.Black;
            geboortedatum_dag.Keyboard    = Keyboard.Numeric;
            geboortedatum_dag.Placeholder = "DD";

            geboortedatum_maand = new Entry();
            geboortedatum_maand.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_maand.PlaceholderColor        = Color.Gray;
            geboortedatum_maand.TextColor   = Color.Black;
            geboortedatum_maand.Keyboard    = Keyboard.Numeric;
            geboortedatum_maand.Placeholder = "MM";

            geboortedatum_jaar = new Entry();
            geboortedatum_jaar.HorizontalTextAlignment = TextAlignment.Center;
            geboortedatum_jaar.PlaceholderColor        = Color.Gray;
            geboortedatum_jaar.TextColor   = Color.Black;
            geboortedatum_jaar.Keyboard    = Keyboard.Numeric;
            geboortedatum_jaar.Placeholder = "JJJJ";



            postcode = new Entry();
            postcode.HorizontalTextAlignment = TextAlignment.Start;
            postcode.PlaceholderColor        = Color.Gray;
            postcode.TextColor   = Color.Black;
            postcode.Placeholder = "Postcode";

            woonplaats = new Entry();
            woonplaats.HorizontalTextAlignment = TextAlignment.Start;
            woonplaats.PlaceholderColor        = Color.Gray;
            woonplaats.TextColor   = Color.Black;
            woonplaats.Placeholder = "Woonplaats";

            telefoonnummer = new Entry();
            telefoonnummer.HorizontalTextAlignment = TextAlignment.Start;
            telefoonnummer.PlaceholderColor        = Color.Gray;
            telefoonnummer.TextColor   = Color.Black;
            telefoonnummer.Placeholder = "Telefoonnummer (optioneel)";
            telefoonnummer.Keyboard    = Keyboard.Numeric;

            emailadres = new Entry();
            emailadres.HorizontalTextAlignment = TextAlignment.Start;
            emailadres.PlaceholderColor        = Color.Gray;
            emailadres.TextColor   = Color.Black;
            emailadres.Placeholder = "Emailadres";

            geboortedatum      = new Label();
            geboortedatum.Text = "Geboortedatum";
            geboortedatum.HorizontalOptions = LayoutOptions.Start;
            geboortedatum.TextColor         = Color.Black;
            geboortedatum.VerticalOptions   = LayoutOptions.Center;
            geboortedatum.TextColor         = Color.Gray;
            geboortedatum.FontSize          = 17.5;

            btn1 = new Button {
                Margin = new Thickness(0, 0, 0, 7.5), Text = "Meld je aan", HorizontalOptions = LayoutOptions.FillAndExpand, FontAttributes = FontAttributes.Bold, FontSize = 14, BackgroundColor = Color.FromHex("#FF4081"), TextColor = Color.White
            };
            btn1.Clicked += async(object sender, EventArgs e) =>
            {
                if (voornaam.Text == null || achternaam.Text == null || straatnaam.Text == null || huisnummer.Text == null || geboortedatum_dag.Text == null || geboortedatum_maand.Text == null || geboortedatum_jaar.Text == null || postcode.Text == null || woonplaats.Text == null || telefoonnummer.Text == null || emailadres.Text == null || "".Equals(voornaam.Text) || "".Equals(achternaam.Text) || "".Equals(straatnaam.Text) || "".Equals(huisnummer.Text) || "".Equals(geboortedatum_dag.Text) || "".Equals(geboortedatum_maand.Text) || "".Equals(geboortedatum_jaar.Text) || "".Equals(postcode.Text) || "".Equals(woonplaats.Text) || "".Equals(telefoonnummer.Text) || "".Equals(emailadres.Text))
                {
                    await DisplayAlert("Mislukt!", "Niet alle velden zijn ingevuld.", "Ok");
                }
                else
                {
                    popups.laadscherm scherm = new popups.laadscherm();
                    await Navigation.PushPopupAsync(scherm);

                    await Task.Run(() =>    // by putting this Task.Run only the Activity Indicator is shown otherwise its not shown.  So we have added this.
                    {
                        email.SendMail email = new email.SendMail();
                        //Email naar de gebruiker
                        email.EmailVerzenden("U heeft zich aangemeld voor een proefles!",
                                             "U heeft zich succesvol aangemeld voor een proefles " + les.naam + " op " + les.dag + "." + "\r\n" +
                                             "Wij verwachten u om " + les.tijdstip + " in de les." + "\r\n" + "\r\n" +
                                             "Met vriendelijke groet," + "\r\n" +
                                             "L-Joy Dancefactory",
                                             emailadres.Text, voornaam.Text);

                        //Email naar l-joy
                        email.EmailVerzenden("Aanmelding proefles",
                                             "Voornaam: " + voornaam.Text + "\r\n" +
                                             "Achternaam: " + achternaam.Text + "\r\n" +
                                             "Straatnaam: " + straatnaam.Text + "\r\n" +
                                             "Huisnummer: " + huisnummer.Text + "\r\n" +
                                             "Geboortedatum: " + geboortedatum_dag.Text + "-" + geboortedatum_maand.Text + "-" + geboortedatum_jaar.Text + "\r\n" +
                                             "Postcode: " + postcode.Text + "\r\n" +
                                             "Woonplaats: " + woonplaats.Text + "\r\n" +
                                             "Telefoonnummer: " + telefoonnummer.Text + "\r\n" +
                                             "Email: " + emailadres.Text + "\r\n" +
                                             "Les: " + les.naam + "\r\n" +
                                             "Dag: " + les.dag + "\r\n" +
                                             "Tijdstip: " + les.tijdstip + "\r\n" +
                                             "Docent: " + les.docent);
                    });

                    await Navigation.RemovePopupPageAsync(scherm);
                    await DisplayAlert("Gelukt!", "Je hebt je succesvol ingeschreven voor een proefles.", "Ok");
                }
            };

            Grid sGrid = new Grid();

            sGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(240)
            });
            sGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });

            sGrid.Children.Add(straatnaam, 0, 0);
            sGrid.Children.Add(huisnummer, 1, 0);

            Grid gGrid = new Grid();

            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(150)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });
            gGrid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = new GridLength(1, GridUnitType.Star)
            });

            gGrid.Children.Add(geboortedatum, 0, 0);
            gGrid.Children.Add(geboortedatum_dag, 1, 0);
            gGrid.Children.Add(geboortedatum_maand, 2, 0);
            gGrid.Children.Add(geboortedatum_jaar, 3, 0);



            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Margin   = new Thickness(10, 10, 10, 10),
                    Children =
                    {
                        new Frame             {
                            Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.FromHex("#FF4081"), Content = new StackLayout{
                                Children =
                                {
                                    new Label {
                                        Text = "Persoonlijke gegevens", HorizontalTextAlignment = TextAlignment.Center, TextColor = Color.White, FontSize = 18, FontAttributes = FontAttributes.Bold
                                    },
                                    new BoxView()
                                    {
                                        Color = Color.White, HeightRequest = 1
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                voornaam
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                achternaam
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                sGrid
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                postcode
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                woonplaats
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                telefoonnummer
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                emailadres
                                            }
                                        }, HasShadow = true,
                                    },
                                    new Frame {
                                        Padding = 7.5, CornerRadius = 5, BackgroundColor = Color.White, Content = new StackLayout{
                                            Children =
                                            {
                                                gGrid
                                            }
                                        }, HasShadow = true,
                                    }
                                }
                            }, HasShadow = true,
                        },
                        btn1
                    }
                }
            };
        }