public AddressPage(UserFirstUpdate user)
 {
     InitializeComponent();
     App.Configuration.InitialAsync(this);
     NavigationPage.SetHasNavigationBar(this, false);
     _model         = new AddressViewModel();
     _helper        = DependencyService.Get <IHelper>();
     _user          = user;
     BindingContext = _model;
     Initialization();
     _metaPivotService = DependencyService.Get <IMetaPivotService>();
 }
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;
        }
Beispiel #3
0
 public AddressPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user             = user;
         _metaPivotService = DependencyService.Get <IMetaPivotService>();
         _helper           = DependencyService.Get <IHelper>();
         Init();
     }
     catch (Exception)
     {
         // Comment
     }
 }
Beispiel #4
0
 public ProfileSetting()
 {
     try
     {
         InitializeComponent();
         _model            = new ProfileSettingViewModel();
         _metaPivotService = DependencyService.Get <IMetaPivotService>();
         Init();
     }
     catch (Exception ex)
     {
         DependencyService.Get <IMessage>().AlertAsync(TextResources.Alert,
                                                       ex.InnerException != null ? ex.InnerException.Message : ex.Message, TextResources.Ok);
     }
 }
 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);
     }
 }
 public ProfileSetting()
 {
     try
     {
         InitializeComponent();
         App.Configuration.InitialAsync(this);
         NavigationPage.SetHasNavigationBar(this, true);
         _model         = new ProfileSettingViewModel();
         BindingContext = _model;
         _model.SetActivityResource();
         LoadForm();
         _metaPivotService = DependencyService.Get <IMetaPivotService>();
     }
     catch (Exception ex)
     {
         DependencyService.Get <IMessage>().AlertAsync(TextResources.Alert,
                                                       ex.InnerException != null ? ex.InnerException.Message : ex.Message, TextResources.Ok);
     }
 }
Beispiel #7
0
        public sealed override async void Init(object obj)
        {
            _model = new MenuPageViewModel(Navigation)
            {
                Title            = TextResources.x4ever,
                Subtitle         = TextResources.x4ever,
                Icon             = TextResources.icon_menu,
                Root             = (RootPage)obj,
                MenuBindCallback = MenuBind
            };
            BindingContext = _model;
            _helper        = DependencyService.Get <IHelper>();
            await _model.GetMenuData();

            await _model.GetProfilePhoto();

            _metaPivotService = DependencyService.Get <IMetaPivotService>();
            _media            = DependencyService.Get <Globals.IMedia>();
        }
        private async void Init(object obj)
        {
            _devicePermissionServices = DependencyService.Get <IDevicePermissionServices>();
            _model = new MenuPageViewModel(Navigation)
            {
                Title            = TextResources.XChallenge,
                Subtitle         = TextResources.XChallenge,
                Icon             = TextResources.icon_menu,
                Root             = (RootPage)obj,
                MenuBindCallback = MenuBind
            };
            BindingContext = this._model;
            _helper        = DependencyService.Get <IHelper>();
            await _model.GetMenuData();

            await _model.GetProfilePhoto();

            _metaPivotService = DependencyService.Get <IMetaPivotService>();
            _media            = DependencyService.Get <Globals.IMedia>();
        }
Beispiel #9
0
        public sealed override async void Init(object obj)
        {
            _devicePermissionServices = DependencyService.Get <IDevicePermissionServices>();
            _model = new MenuGridViewModel(Navigation)
            {
                Title    = TextResources.XChallenge,
                Subtitle = TextResources.XChallenge,
                Icon     = TextResources.icon_menu,
                Root     = (RootPage)obj
            };
            BindingContext = this._model;
            _helper        = DependencyService.Get <IHelper>();
            GridMenu.ItemSelectedHandler += GridMenu_ItemSelectedHandler;
            await _model.BindMenuData();

            await _model.GetProfilePhoto();

            App.Configuration.IsMenuLoaded = true;
            _metaPivotService = DependencyService.Get <IMetaPivotService>();
            _media            = DependencyService.Get <Globals.IMedia>();
        }