Esempio n. 1
0
        /// <summary>
        ///  データチャート画面遷移
        /// </summary>
        public async Task CommandDataChartAction()
        {
            var check = BasicDataService.GetBasicData();

            if (check != null)
            {
                await ViewModelConst.DataPageNavigation.PushAsync(new DataSelectView());
            }
            else
            {
                await Application.Current.MainPage.DisplayAlert(LanguageUtils.Get(LanguageKeys.Confirm),
                                                                LanguageUtils.Get(LanguageKeys.NotExistBasicData), LanguageUtils.Get(LanguageKeys.OK));

                await ViewModelConst.DataPageNavigation.PushAsync(new InputBasicDataView());
            }
        }
Esempio n. 2
0
        /// <summary>
        ///  基本データのロード
        /// </summary>
        public void LoadBasicData()
        {
            // 基本データを取得
            var model = BasicDataService.GetBasicData();

            if (model != null)
            {
                Name              = model.Name;
                Gender            = ((GenderEnum)model.Gender).ToString();
                Birthday          = model.BirthDay;
                Height            = model.Height;
                BodyWeight        = model.BodyWeight;
                BodyFatPercentage = model.BodyFatPercentage;
                MaxBloodPressure  = model.MaxBloodPressure;
                MinBloodPressure  = model.MinBloodPressure;
                BasalMetabolism   = model.BasalMetabolism;
                switch (model.Gender)
                {
                case (int)GenderEnum.男性:
                    MoveTioRegistBasicDataImageSource = ViewModelConst.ManImage;
                    break;

                case (int)GenderEnum.女性:
                    MoveTioRegistBasicDataImageSource = ViewModelConst.WomanImage;
                    break;

                default:
                    MoveTioRegistBasicDataImageSource = ViewModelConst.PersonImage;
                    break;
                }

                IsVisibleBasicDataValues = true;
            }
            else
            {
                MoveTioRegistBasicDataImageSource = ViewModelConst.PersonImage;
                IsVisibleBasicDataValues          = false;
            }
        }