public ProfileMaintenance(string _number, bool isSocialMediaRegistation = false, UserModel userModel = null)
        {
            NavigationPage.SetHasBackButton(this, false);
            InitializeComponent();
            _isSocialMediaRegistation = isSocialMediaRegistation;
            number = _number;
            ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("890447");
            ((NavigationPage)Application.Current.MainPage).BarTextColor       = Color.White;
            BindingContext = new UserModelStorage();

            int      year     = DateTime.Now.Year;
            DateTime firstDay = new DateTime(year, 1, 1);

            birthdatePicker.SetValue(DatePicker.MaximumDateProperty, DateTime.Now.AddYears(-18));
            birthdatePicker.SetValue(DatePicker.MinimumDateProperty, firstDay.AddYears(-60));
            List <ContentPage> pageList = Children.ToList();

            if (isSocialMediaRegistation)
            {
                userModelMain            = userModel;
                chooseImageButton.Source = userModel.image;
                foreach (var child in Children.ToList())
                {
                    if (child == emailContent)
                    {
                        Children.Remove(child);
                    }
                }
            }
        }
Example #2
0
        public ProfileMaintenance(string _number)
        {
            InitializeComponent();
            number = _number;

            ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.FromHex("98000b");
            ((NavigationPage)Application.Current.MainPage).BarTextColor       = Color.FromHex("fffcf8");
            BindingContext = new UserModelStorage();

            int      year     = DateTime.Now.Year;
            DateTime firstDay = new DateTime(year, 1, 1);

            birthdatePicker.SetValue(DatePicker.MaximumDateProperty, DateTime.Now.AddYears(-18));
            birthdatePicker.SetValue(DatePicker.MinimumDateProperty, firstDay.AddYears(-60));
        }
Example #3
0
 public ImageSelection()
 {
     InitializeComponent();
     BindingContext = new UserModelStorage();
 }