Beispiel #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();
        }
Beispiel #2
0
        public UserMilestoneViewModel(INavigation navigation = null) : base(navigation)
        {
            _trackerPivotService  = DependencyService.Get <ITrackerPivotService>();
            _metaPivotService     = DependencyService.Get <IMetaPivotService>();
            _userMilestoneService = DependencyService.Get <IUserMilestoneService>();
            _helper = DependencyService.Get <IHelper>();

            SetPageImageSize();

            ShowBadgeAchievedImage = false;
            BadgeAchievedImage     = "";
            StringFemale           = StringFemaleDefault;
            StringMale             = StringMaleDefault;
            ColorFemale            = ColorMale = ColorGenderDefault;

            ActionType  = ActionType.Check;
            BaseContent = null;

            CurrentWeightMinimumValue = 0;
            CurrentWeightMaximumValue = _converter.DisplayWeightVolume(
                App.Configuration.AppConfig.MAXIMUM_CURRENT_WEIGHT_KG,
                App.Configuration.AppConfig.MAXIMUM_CURRENT_WEIGHT_LB);
            CurrentWeightValue = CurrentWeightMinimumValue;

            UserTrackers   = new List <TrackerPivot>();
            UserMetas      = new MetaPivot();
            WeightLossGoal = 0;
            PreviousWeight = 0;

            GoalAchieved         = false;
            CurrentWeightEnabled = true;
            MilestoneAchieved    = false;
            AchievedContent      = null;
            CurrentTitle         = TextResources.CurrentWeight;
            CurrentSubTitle      = string.Empty;
            IsCurrentSubTitle    = false;
            ImageFront           = ImageDefault;
            ImageSide            = ImageDefault;
            IsGenderRequired     = false;
            TShirtSize           = string.Empty;

            IsAchievedVisible = false;
            IsBasicVisible    = true;

            AboutYourJourney  = ErrorMessage;
            MilestoneExtended = new UserMilestoneExtended();
            Milestones        = new List <Models.Milestone>();
            UserMilestones    = new List <UserMilestone>();
            //ViewComponents = new List<View>();
            AchievedMilestonePercentage = null;
            AchievedMilestone           = null;
        }
 public PersonalInfoPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user                = user;
         _helper              = DependencyService.Get <IHelper>();
         _metaPivotService    = DependencyService.Get <IMetaPivotService>();
         _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
         IsRevised            = false;
         Init();
     }
     catch (Exception ex)
     {
         new ExceptionHandler(TAG, ex);
     }
 }
Beispiel #4
0
 public UploadPhotoPage(UserFirstUpdate user, bool error = false, string message = "")
 {
     InitializeComponent();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _media = DependencyService.Get <IMedia>();
     _devicePermissionServices = DependencyService.Get <IDevicePermissionServices>();
     _model         = new UploadPhotoViewModel();
     _user          = user;
     BindingContext = _model;
     Initialization();
     _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
     _helper = DependencyService.Get <IHelper>();
     if (error)
     {
         _model.SetActivityResource(showError: true,
                                    errorMessage: string.IsNullOrWhiteSpace(message.Trim())
                 ? message.Trim()
                 : _helper.ReturnMessage(message));
     }
 }
 public UploadPhotoPage(UserFirstUpdate user, bool error = false, string message = "")
 {
     try
     {
         InitializeComponent();
         _user = user;
         _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
         _media  = DependencyService.Get <IMedia>();
         _helper = DependencyService.Get <IHelper>();
         Init();
         if (error)
         {
             _model.SetActivityResource(showError: true,
                                        errorMessage: string.IsNullOrWhiteSpace(message.Trim())
                     ? message.Trim()
                     : _helper.ReturnMessage(message));
         }
     }
     catch (Exception ex)
     {
         ClientService.WriteLog(null, ex).GetAwaiter();
     }
 }
Beispiel #6
0
 /// <include file='docs.xml' path='[@name="gridTracker"]/Constructor/*'/>
 public GridTracker()
 {
     _trackerPivotService = DependencyService.Get <ITrackerPivotService>();
 }
 public UserPivotService()
 {
     _trackerPivotService   = DependencyService.Get <ITrackerPivotService>();
     _authenticationService = DependencyService.Get <IAuthenticationService>();
 }