コード例 #1
0
 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>();
 }
コード例 #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;
        }
コード例 #3
0
 public AddressPage(UserFirstUpdate user)
 {
     try
     {
         InitializeComponent();
         _user             = user;
         _metaPivotService = DependencyService.Get <IMetaPivotService>();
         _helper           = DependencyService.Get <IHelper>();
         Init();
     }
     catch (Exception)
     {
         // Comment
     }
 }
コード例 #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);
     }
 }
コード例 #5
0
 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);
     }
 }
コード例 #6
0
 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);
     }
 }
コード例 #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>();
        }
コード例 #8
0
        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>();
        }
コード例 #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>();
        }