Ejemplo n.º 1
0
        public ProfileEnhancedViewModel(INavigation navigation = null) : base(navigation)
        {
            _userPivotService    = DependencyService.Get <IUserPivotService>();
            _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
            UserGreeting         = string.Empty;
            JoiningDate          = string.Empty;
            TargetDate           = string.Empty;
            DisplayDetailLink    = TextResources.Details;
            Seperator            = "|";
            YourGoal             = YouLost = ToLoose = GaugeMin = GaugeCurrent = 0;
            GaugeCurrentChange();
            GaugeMax        = 100;
            _imageSizeBadge = App.Configuration.GetImageSizeByID(ImageIdentity.USER_PROFILE_BADGE_ICON);
            if (_imageSizeBadge != null)
            {
                UserBadgeImageHeight = _imageSizeBadge.Height;
                UserBadgeImageWidth  = _imageSizeBadge.Width;
            }

            BadgeAchievedImage     = ImageResizer.ResizeImage(TextResources.Badge_Null, _imageSizeBadge);
            MilestoneRequired      = false;
            ShowTrackerDetail      = false;
            UserDetail             = new UserPivot();
            UserTrackers           = new List <TrackerPivot>();
            UserTrackersDescending = new List <TrackerPivot>();
            YourGoal            = YouLostThisWeek = ToLoose = 0;
            WeightSubmitDetails = TextResources.Weight + " " + TextResources.Submit + " " + TextResources.Details;
            SetPageImageSize();
        }
Ejemplo n.º 2
0
        public sealed override async void Init(object obj = null)
        {
            await App.Configuration.InitialAsync(this);

            NavigationPage.SetHasNavigationBar(this, false);
            _model.SetActivityResource(false, true);
            _userPivotService      = DependencyService.Get <IUserPivotService>();
            _authenticationService = DependencyService.Get <IAuthenticationService>();
            await GetUserInfo();
        }
Ejemplo n.º 3
0
        public ChangePasswordPage()
        {
            InitializeComponent();

            _model            = new ChangePasswordViewModel();
            BindingContext    = _model;
            _userPivotService = DependencyService.Get <IUserPivotService>();
            _helper           = DependencyService.Get <IHelper>();
            Load_Form();
        }
Ejemplo n.º 4
0
 public NewPassword(RequestPasswordViewModel model)
 {
     InitializeComponent();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _model                = model;
     BindingContext        = _model;
     _userPivotService     = DependencyService.Get <IUserPivotService>();
     _helper               = DependencyService.Get <IHelper>();
     buttonSubmit.Clicked += ButtonSubmit_Clicked;
 }
Ejemplo n.º 5
0
 public BasicInfoPage(UserFirstUpdate user)
 {
     InitializeComponent();
     _userPivotService = DependencyService.Get <IUserPivotService>();
     _user             = user;
     _helper           = DependencyService.Get <IHelper>();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _model         = new AccountViewModel();
     BindingContext = _model;
     Initialization();
 }
 public BasicInfoPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user             = user;
         _userPivotService = DependencyService.Get <IUserPivotService>();
         Init();
     }
     catch (Exception)
     {
         // Comment
     }
 }
Ejemplo n.º 7
0
 public ChangePasswordPage()
 {
     try
     {
         InitializeComponent();
         _model            = new ChangePasswordViewModel();
         _userPivotService = DependencyService.Get <IUserPivotService>();
         _helper           = DependencyService.Get <IHelper>();
         Init();
     }
     catch (Exception ex)
     {
         new ExceptionHandler(typeof(ChangePasswordPage).FullName, ex);
     }
 }
        public RequestPasswordPage()
        {
            InitializeComponent();
            App.Configuration.InitialAsync(this);
            NavigationPage.SetHasNavigationBar(this, false);
            _model                = new RequestPasswordViewModel();
            BindingContext        = _model;
            buttonSubmit.Clicked += ButtonSubmit_Clicked;
            _userPivotService     = DependencyService.Get <IUserPivotService>();
            _helper               = DependencyService.Get <IHelper>();
            var tapGotPassword = new TapGestureRecognizer()
            {
                Command = new Command(GoToLogin)
            };

            linkGotPassword.GestureRecognizers.Add(tapGotPassword);
        }
Ejemplo n.º 9
0
 public RegisterPage()
 {
     try
     {
         InitializeComponent();
         App.Configuration.Initial(this);
         NavigationPage.SetHasNavigationBar(this, false);
         _model            = new RegisterViewModel(App.CurrentApp.MainPage.Navigation);
         BindingContext    = _model;
         _userPivotService = DependencyService.Get <IUserPivotService>();
         _helper           = new Helper();
         Init();
     }
     catch (Exception ex)
     {
         var exceptionHandler = new ExceptionHandler(TAG, ex);
     }
 }