Exemplo n.º 1
0
        private void ApplySetting()
        {
            RealmEnv.RealmRank = (RealmEnv.RealmRankEnum)RealmRankPicker.SelectedIndex;
            RealmEnv.TrustRank = TrustRankPicker.SelectedIndex + 1;

            switch (type)
            {
            case RealmEnv.RealmType.Currency:
                RCEnv.CalcEndTime();
                RCEnv.SaveValue();
                break;

            case RealmEnv.RealmType.Friendship:
                RFEnv.CalcEndTime();
                RFEnv.SaveValue();
                break;
            }

            UpdateNotis();

            Navigation.PopAsync();
        }
Exemplo n.º 2
0
        internal override void ApplyValue()
        {
            base.ApplyValue();

            if (int.TryParse(SfUpDown.Text, out int inputValue))
            {
                RFEnv.LastInputTime = DateTime.Now.ToString(AppEnv.DTCulture);
                RFEnv.Bounty        = inputValue; //Convert.ToInt32((double)SfUpDown.Value);
                RFEnv.AddCount      = 0;

                RFEnv.CalcEndTime();
                RFEnv.CalcRF();
                RFEnv.SaveValue();

                notiManager.UpdateNotisTime();
                notiManager.UpdateScheduledNoti <RealmFriendshipNoti>();
            }
            else
            {
                DependencyService.Get <IToast>().Show(AppResources.ValueEdit_ValueError_Message);
            }
        }